aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-16 16:19:43 -0700
committerJunio C Hamano <gitster@pobox.com>2010-06-16 16:19:43 -0700
commit4dd4a09eac9ecb27f051ad0f3447c205c5b50c8b (patch)
tree56699c1cae789f492ec4222839415c612d13654e /t
parent755f0e36bcaaeb1c95726faaccb10da800803570 (diff)
parentd8fab07208abfbe7dc93aea97c5577cdd73266c5 (diff)
downloadgit-4dd4a09eac9ecb27f051ad0f3447c205c5b50c8b.tar.gz
git-4dd4a09eac9ecb27f051ad0f3447c205c5b50c8b.tar.xz
Merge branch 'rc/maint-curl-helper' into maint
* rc/maint-curl-helper: remote-curl: ensure that URLs have a trailing slash http: make end_url_with_slash() public t5541-http-push: add test for URLs with trailing slash Conflicts: remote-curl.c
Diffstat (limited to 't')
-rwxr-xr-xt/t5541-http-push.sh29
1 files changed, 28 insertions, 1 deletions
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index 795dc2bcd..17e1bdc5a 100755
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -34,8 +34,34 @@ test_expect_success 'setup remote repository' '
mv test_repo.git "$HTTPD_DOCUMENT_ROOT_PATH"
'
-test_expect_success 'clone remote repository' '
+cat >exp <<EOF
+GET /smart/test_repo.git/info/refs?service=git-upload-pack HTTP/1.1 200
+POST /smart/test_repo.git/git-upload-pack HTTP/1.1 200
+EOF
+test_expect_success 'no empty path components' '
+ # In the URL, add a trailing slash, and see if git appends yet another
+ # slash.
cd "$ROOT_PATH" &&
+ git clone $HTTPD_URL/smart/test_repo.git/ test_repo_clone &&
+
+ sed -e "
+ s/^.* \"//
+ s/\"//
+ s/ [1-9][0-9]*\$//
+ s/^GET /GET /
+ " >act <"$HTTPD_ROOT_PATH"/access.log &&
+
+ # Clear the log, so that it does not affect the "used receive-pack
+ # service" test which reads the log too.
+ #
+ # We do this before the actual comparison to ensure the log is cleared.
+ echo > "$HTTPD_ROOT_PATH"/access.log &&
+
+ test_cmp exp act
+'
+
+test_expect_success 'clone remote repository' '
+ rm -rf test_repo_clone &&
git clone $HTTPD_URL/smart/test_repo.git test_repo_clone
'
@@ -68,6 +94,7 @@ test_expect_success 'create and delete remote branch' '
'
cat >exp <<EOF
+
GET /smart/test_repo.git/info/refs?service=git-upload-pack HTTP/1.1 200
POST /smart/test_repo.git/git-upload-pack HTTP/1.1 200
GET /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200