Merge branch 'ep/use-git-trace-curl-in-tests'
Update a few tests that used to use GIT_CURL_VERBOSE to use the newer GIT_TRACE_CURL. * ep/use-git-trace-curl-in-tests: t5551-http-fetch-smart.sh: use the GIT_TRACE_CURL environment var t5550-http-fetch-dumb.sh: use the GIT_TRACE_CURL environment var test-lib.sh: preserve GIT_TRACE_CURL from the environment t5541-http-push-smart.sh: use the GIT_TRACE_CURL environment var
This commit is contained in:
commit
930b67ebd7
@ -74,7 +74,7 @@ test_expect_success 'push to remote repository (standard)' '
|
|||||||
test_tick &&
|
test_tick &&
|
||||||
git commit -m path2 &&
|
git commit -m path2 &&
|
||||||
HEAD=$(git rev-parse --verify HEAD) &&
|
HEAD=$(git rev-parse --verify HEAD) &&
|
||||||
GIT_CURL_VERBOSE=1 git push -v -v 2>err &&
|
GIT_TRACE_CURL=true git push -v -v 2>err &&
|
||||||
! grep "Expect: 100-continue" err &&
|
! grep "Expect: 100-continue" err &&
|
||||||
grep "POST git-receive-pack ([0-9]* bytes)" err &&
|
grep "POST git-receive-pack ([0-9]* bytes)" err &&
|
||||||
(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
|
(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
|
||||||
|
@ -263,15 +263,15 @@ check_language () {
|
|||||||
>expect
|
>expect
|
||||||
;;
|
;;
|
||||||
?*)
|
?*)
|
||||||
echo "Accept-Language: $1" >expect
|
echo "=> Send header: Accept-Language: $1" >expect
|
||||||
;;
|
;;
|
||||||
esac &&
|
esac &&
|
||||||
GIT_CURL_VERBOSE=1 \
|
GIT_TRACE_CURL=true \
|
||||||
LANGUAGE=$2 \
|
LANGUAGE=$2 \
|
||||||
git ls-remote "$HTTPD_URL/dumb/repo.git" >output 2>&1 &&
|
git ls-remote "$HTTPD_URL/dumb/repo.git" >output 2>&1 &&
|
||||||
tr -d '\015' <output |
|
tr -d '\015' <output |
|
||||||
sort -u |
|
sort -u |
|
||||||
sed -ne '/^Accept-Language:/ p' >actual &&
|
sed -ne '/^=> Send header: Accept-Language:/ p' >actual &&
|
||||||
test_cmp expect actual
|
test_cmp expect actual
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,8 +295,8 @@ ja;q=0.95, zh;q=0.94, sv;q=0.93, pt;q=0.92, nb;q=0.91, *;q=0.90" \
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'git client does not send an empty Accept-Language' '
|
test_expect_success 'git client does not send an empty Accept-Language' '
|
||||||
GIT_CURL_VERBOSE=1 LANGUAGE= git ls-remote "$HTTPD_URL/dumb/repo.git" 2>stderr &&
|
GIT_TRACE_CURL=true LANGUAGE= git ls-remote "$HTTPD_URL/dumb/repo.git" 2>stderr &&
|
||||||
! grep "^Accept-Language:" stderr
|
! grep "^=> Send header: Accept-Language:" stderr
|
||||||
'
|
'
|
||||||
|
|
||||||
stop_httpd
|
stop_httpd
|
||||||
|
@ -43,12 +43,21 @@ cat >exp <<EOF
|
|||||||
< Content-Type: application/x-git-upload-pack-result
|
< Content-Type: application/x-git-upload-pack-result
|
||||||
EOF
|
EOF
|
||||||
test_expect_success 'clone http repository' '
|
test_expect_success 'clone http repository' '
|
||||||
GIT_CURL_VERBOSE=1 git clone --quiet $HTTPD_URL/smart/repo.git clone 2>err &&
|
GIT_TRACE_CURL=true git clone --quiet $HTTPD_URL/smart/repo.git clone 2>err &&
|
||||||
test_cmp file clone/file &&
|
test_cmp file clone/file &&
|
||||||
tr '\''\015'\'' Q <err |
|
tr '\''\015'\'' Q <err |
|
||||||
sed -e "
|
sed -e "
|
||||||
s/Q\$//
|
s/Q\$//
|
||||||
/^[*] /d
|
/^[*] /d
|
||||||
|
/^== Info:/d
|
||||||
|
/^=> Send header, /d
|
||||||
|
/^=> Send header:$/d
|
||||||
|
/^<= Recv header, /d
|
||||||
|
/^<= Recv header:$/d
|
||||||
|
s/=> Send header: //
|
||||||
|
s/= Recv header://
|
||||||
|
/^<= Recv data/d
|
||||||
|
/^=> Send data/d
|
||||||
/^$/d
|
/^$/d
|
||||||
/^< $/d
|
/^< $/d
|
||||||
|
|
||||||
@ -261,9 +270,9 @@ test_expect_success CMDLINE_LIMIT \
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'large fetch-pack requests can be split across POSTs' '
|
test_expect_success 'large fetch-pack requests can be split across POSTs' '
|
||||||
GIT_CURL_VERBOSE=1 git -c http.postbuffer=65536 \
|
GIT_TRACE_CURL=true git -c http.postbuffer=65536 \
|
||||||
clone --bare "$HTTPD_URL/smart/repo.git" split.git 2>err &&
|
clone --bare "$HTTPD_URL/smart/repo.git" split.git 2>err &&
|
||||||
grep "^> POST" err >posts &&
|
grep "^=> Send header: POST" err >posts &&
|
||||||
test_line_count = 2 posts
|
test_line_count = 2 posts
|
||||||
'
|
'
|
||||||
|
|
||||||
|
@ -89,6 +89,7 @@ unset VISUAL EMAIL LANGUAGE COLUMNS $("$PERL_PATH" -e '
|
|||||||
UNZIP
|
UNZIP
|
||||||
PERF_
|
PERF_
|
||||||
CURL_VERBOSE
|
CURL_VERBOSE
|
||||||
|
TRACE_CURL
|
||||||
));
|
));
|
||||||
my @vars = grep(/^GIT_/ && !/^GIT_($ok)/o, @env);
|
my @vars = grep(/^GIT_/ && !/^GIT_($ok)/o, @env);
|
||||||
print join("\n", @vars);
|
print join("\n", @vars);
|
||||||
|
Loading…
Reference in New Issue
Block a user