summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ebaaf31)
raw | patch | inline | side by side (parent: ebaaf31)
author | Tay Ray Chuan <rctay89@gmail.com> | |
Wed, 4 May 2011 17:19:50 +0000 (01:19 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 4 May 2011 20:30:37 +0000 (13:30 -0700) |
Trigger the chunked type of pushing for smart HTTP. This can serve as a
regression test for the issue fixed in 1e41827 (http: clear POSTFIELDS
when initializing a slot).
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
regression test for the issue fixed in 1e41827 (http: clear POSTFIELDS
when initializing a slot).
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5541-http-push.sh | patch | blob | history |
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index 0492877d516b8f33a8fd1555ec77a2aa3b34352c..4b93fa1264a13c7864706b3234e563c122362cc8 100755 (executable)
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
git clone $HTTPD_URL/smart/test_repo.git test_repo_clone
'
-test_expect_success 'push to remote repository' '
+test_expect_success 'push to remote repository (standard)' '
cd "$ROOT_PATH"/test_repo_clone &&
: >path2 &&
git add path2 &&
test_tick &&
git commit -m path2 &&
HEAD=$(git rev-parse --verify HEAD) &&
- git push &&
+ GIT_CURL_VERBOSE=1 git push -v -v 2>err &&
+ ! grep "Expect: 100-continue" err &&
+ grep "POST git-receive-pack ([0-9]* bytes)" err &&
(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
test $HEAD = $(git rev-parse --verify HEAD))
'
@@ -140,5 +142,17 @@ test_expect_success C_LOCALE_OUTPUT 'push fails for non-fast-forward refs unmatc
output
'
+test_expect_success 'push (chunked)' '
+ git checkout master &&
+ test_commit commit path3 &&
+ HEAD=$(git rev-parse --verify HEAD) &&
+ git config http.postbuffer 4 &&
+ test_when_finished "git config --unset http.postbuffer" &&
+ git push -v -v origin $BRANCH 2>err &&
+ grep "POST git-receive-pack (chunked)" err &&
+ (cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
+ test $HEAD = $(git rev-parse --verify HEAD))
+'
+
stop_httpd
test_done