summaryrefslogtreecommitdiff
path: root/t/t5541-http-push.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-11 18:37:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-05-11 18:37:38 (GMT)
commit1f0f5b54baea4a446450c0586aec222a62af3c6f (patch)
tree6129f264e86bebf71eb5a61a79752ee5a180fedb /t/t5541-http-push.sh
parentebfd72c856fd40b226d977164892bcd22979e78e (diff)
parent0cc6330d0c29dcba062e909543f6adf6872622ad (diff)
downloadgit-1f0f5b54baea4a446450c0586aec222a62af3c6f.zip
git-1f0f5b54baea4a446450c0586aec222a62af3c6f.tar.gz
git-1f0f5b54baea4a446450c0586aec222a62af3c6f.tar.bz2
Merge branch 'dm/http-cleanup'
* dm/http-cleanup: t5541-http-push: add test for chunked http-push: refactor curl_easy_setup madness http-push: use const for strings in signatures http: make curl callbacks match contracts from curl header
Diffstat (limited to 't/t5541-http-push.sh')
-rwxr-xr-xt/t5541-http-push.sh18
1 files changed, 16 insertions, 2 deletions
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index d924056..a73c826 100755
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -65,14 +65,16 @@ test_expect_success 'clone remote repository' '
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 'push fails for non-fast-forward refs unmatched by remote he
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