Merge branch 'tg/t5551-with-curl-7.61.1'

Test update.

* tg/t5551-with-curl-7.61.1:
  t5551: compare sorted cookies files
  t5551: move setup code inside test_expect blocks
This commit is contained in:
Junio C Hamano 2018-10-16 16:16:00 +09:00
commit 52472c20d2

View file

@ -23,7 +23,8 @@ test_expect_success 'create http-accessible bare repository' '
setup_askpass_helper setup_askpass_helper
cat >exp <<EOF test_expect_success 'clone http repository' '
cat >exp <<-\EOF &&
> GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 > GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1
> Accept: */* > Accept: */*
> Accept-Encoding: ENCODINGS > Accept-Encoding: ENCODINGS
@ -42,7 +43,6 @@ cat >exp <<EOF
< Cache-Control: no-cache, max-age=0, must-revalidate < Cache-Control: no-cache, max-age=0, must-revalidate
< Content-Type: application/x-git-upload-pack-result < Content-Type: application/x-git-upload-pack-result
EOF EOF
test_expect_success 'clone http repository' '
GIT_TRACE_CURL=true 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 |
@ -96,13 +96,13 @@ test_expect_success 'fetch changes via http' '
test_cmp file clone/file test_cmp file clone/file
' '
cat >exp <<EOF test_expect_success 'used upload-pack service' '
cat >exp <<-\EOF &&
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
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
test_expect_success 'used upload-pack service' '
check_access_log exp check_access_log exp
' '
@ -203,19 +203,19 @@ test_expect_success 'dumb clone via http-backend respects namespace' '
test_cmp expect actual test_cmp expect actual
' '
cat >cookies.txt <<EOF test_expect_success 'cookies stored in http.cookiefile when http.savecookies set' '
cat >cookies.txt <<-\EOF &&
127.0.0.1 FALSE /smart_cookies/ FALSE 0 othername othervalue 127.0.0.1 FALSE /smart_cookies/ FALSE 0 othername othervalue
EOF EOF
cat >expect_cookies.txt <<EOF sort >expect_cookies.txt <<-\EOF &&
127.0.0.1 FALSE /smart_cookies/ FALSE 0 othername othervalue 127.0.0.1 FALSE /smart_cookies/ FALSE 0 othername othervalue
127.0.0.1 FALSE /smart_cookies/repo.git/info/ FALSE 0 name value 127.0.0.1 FALSE /smart_cookies/repo.git/info/ FALSE 0 name value
EOF EOF
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 >cookies_tail.txt && tail -3 cookies.txt | sort >cookies_tail.txt &&
test_cmp expect_cookies.txt cookies_tail.txt test_cmp expect_cookies.txt cookies_tail.txt
' '