mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
tests: fix protocol version for overspecifications
These tests are also marked with a NEEDSWORK comment. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
78eeb8d057
commit
d790ee1707
|
@ -6,6 +6,10 @@
|
||||||
|
|
||||||
test_description='Merge logic in fetch'
|
test_description='Merge logic in fetch'
|
||||||
|
|
||||||
|
# NEEDSWORK: If the overspecification of the expected result is reduced, we
|
||||||
|
# might be able to run this test in all protocol versions.
|
||||||
|
GIT_TEST_PROTOCOL_VERSION=
|
||||||
|
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
|
||||||
LF='
|
LF='
|
||||||
|
|
|
@ -67,7 +67,10 @@ test_expect_success 'no shallow lines after receiving ACK ready' '
|
||||||
cd clone &&
|
cd clone &&
|
||||||
git checkout --orphan newnew &&
|
git checkout --orphan newnew &&
|
||||||
test_commit new-too &&
|
test_commit new-too &&
|
||||||
GIT_TRACE_PACKET="$TRASH_DIRECTORY/trace" git fetch --depth=2 &&
|
# NEEDSWORK: If the overspecification of the expected result is reduced, we
|
||||||
|
# might be able to run this test in all protocol versions.
|
||||||
|
GIT_TRACE_PACKET="$TRASH_DIRECTORY/trace" GIT_TEST_PROTOCOL_VERSION= \
|
||||||
|
git fetch --depth=2 &&
|
||||||
grep "fetch-pack< ACK .* ready" ../trace &&
|
grep "fetch-pack< ACK .* ready" ../trace &&
|
||||||
! grep "fetch-pack> done" ../trace
|
! grep "fetch-pack> done" ../trace
|
||||||
)
|
)
|
||||||
|
|
|
@ -47,7 +47,12 @@ test_expect_success 'no empty path components' '
|
||||||
cd "$ROOT_PATH" &&
|
cd "$ROOT_PATH" &&
|
||||||
git clone $HTTPD_URL/smart/test_repo.git/ test_repo_clone &&
|
git clone $HTTPD_URL/smart/test_repo.git/ test_repo_clone &&
|
||||||
|
|
||||||
check_access_log exp
|
# NEEDSWORK: If the overspecification of the expected result is reduced, we
|
||||||
|
# might be able to run this test in all protocol versions.
|
||||||
|
if test -z "$GIT_TEST_PROTOCOL_VERSION"
|
||||||
|
then
|
||||||
|
check_access_log exp
|
||||||
|
fi
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'clone remote repository' '
|
test_expect_success 'clone remote repository' '
|
||||||
|
@ -128,7 +133,12 @@ GET /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200
|
||||||
POST /smart/test_repo.git/git-receive-pack HTTP/1.1 200
|
POST /smart/test_repo.git/git-receive-pack HTTP/1.1 200
|
||||||
EOF
|
EOF
|
||||||
test_expect_success 'used receive-pack service' '
|
test_expect_success 'used receive-pack service' '
|
||||||
check_access_log exp
|
# NEEDSWORK: If the overspecification of the expected result is reduced, we
|
||||||
|
# might be able to run this test in all protocol versions.
|
||||||
|
if test -z "$GIT_TEST_PROTOCOL_VERSION"
|
||||||
|
then
|
||||||
|
check_access_log exp
|
||||||
|
fi
|
||||||
'
|
'
|
||||||
|
|
||||||
test_http_push_nonff "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \
|
test_http_push_nonff "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \
|
||||||
|
|
|
@ -81,12 +81,18 @@ test_expect_success 'clone http repository' '
|
||||||
/^< Content-Length: /d
|
/^< Content-Length: /d
|
||||||
/^< Transfer-Encoding: /d
|
/^< Transfer-Encoding: /d
|
||||||
" >actual &&
|
" >actual &&
|
||||||
sed -e "s/^> Accept-Encoding: .*/> Accept-Encoding: ENCODINGS/" \
|
|
||||||
actual >actual.smudged &&
|
|
||||||
test_cmp exp actual.smudged &&
|
|
||||||
|
|
||||||
grep "Accept-Encoding:.*gzip" actual >actual.gzip &&
|
# NEEDSWORK: If the overspecification of the expected result is reduced, we
|
||||||
test_line_count = 2 actual.gzip
|
# might be able to run this test in all protocol versions.
|
||||||
|
if test -z "$GIT_TEST_PROTOCOL_VERSION"
|
||||||
|
then
|
||||||
|
sed -e "s/^> Accept-Encoding: .*/> Accept-Encoding: ENCODINGS/" \
|
||||||
|
actual >actual.smudged &&
|
||||||
|
test_cmp exp actual.smudged &&
|
||||||
|
|
||||||
|
grep "Accept-Encoding:.*gzip" actual >actual.gzip &&
|
||||||
|
test_line_count = 2 actual.gzip
|
||||||
|
fi
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'fetch changes via http' '
|
test_expect_success 'fetch changes via http' '
|
||||||
|
@ -104,7 +110,13 @@ test_expect_success 'used upload-pack service' '
|
||||||
GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 200
|
GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 200
|
||||||
POST /smart/repo.git/git-upload-pack HTTP/1.1 200
|
POST /smart/repo.git/git-upload-pack HTTP/1.1 200
|
||||||
EOF
|
EOF
|
||||||
check_access_log exp
|
|
||||||
|
# NEEDSWORK: If the overspecification of the expected result is reduced, we
|
||||||
|
# might be able to run this test in all protocol versions.
|
||||||
|
if test -z "$GIT_TEST_PROTOCOL_VERSION"
|
||||||
|
then
|
||||||
|
check_access_log exp
|
||||||
|
fi
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'follow redirects (301)' '
|
test_expect_success 'follow redirects (301)' '
|
||||||
|
@ -216,8 +228,14 @@ test_expect_success 'cookies stored in http.cookiefile when http.savecookies set
|
||||||
git config http.cookiefile cookies.txt &&
|
git config http.cookiefile cookies.txt &&
|
||||||
git config http.savecookies true &&
|
git config http.savecookies true &&
|
||||||
git ls-remote $HTTPD_URL/smart_cookies/repo.git master &&
|
git ls-remote $HTTPD_URL/smart_cookies/repo.git master &&
|
||||||
tail -3 cookies.txt | sort >cookies_tail.txt &&
|
|
||||||
test_cmp expect_cookies.txt cookies_tail.txt
|
# NEEDSWORK: If the overspecification of the expected result is reduced, we
|
||||||
|
# might be able to run this test in all protocol versions.
|
||||||
|
if test -z "$GIT_TEST_PROTOCOL_VERSION"
|
||||||
|
then
|
||||||
|
tail -3 cookies.txt | sort >cookies_tail.txt &&
|
||||||
|
test_cmp expect_cookies.txt cookies_tail.txt
|
||||||
|
fi
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'transfer.hiderefs works over smart-http' '
|
test_expect_success 'transfer.hiderefs works over smart-http' '
|
||||||
|
|
Loading…
Reference in a new issue