File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,8 +34,34 @@ test_expect_success 'setup remote repository' '
3434 mv test_repo.git "$HTTPD_DOCUMENT_ROOT_PATH"
3535'
3636
37- test_expect_success ' clone remote repository' '
37+ cat > exp << EOF
38+ GET /smart/test_repo.git/info/refs?service=git-upload-pack HTTP/1.1 200
39+ POST /smart/test_repo.git/git-upload-pack HTTP/1.1 200
40+ EOF
41+ test_expect_failure ' no empty path components' '
42+ # In the URL, add a trailing slash, and see if git appends yet another
43+ # slash.
3844 cd "$ROOT_PATH" &&
45+ git clone $HTTPD_URL/smart/test_repo.git/ test_repo_clone &&
46+
47+ sed -e "
48+ s/^.* \"//
49+ s/\"//
50+ s/ [1-9][0-9]*\$//
51+ s/^GET /GET /
52+ " >act <"$HTTPD_ROOT_PATH"/access.log &&
53+
54+ # Clear the log, so that it does not affect the "used receive-pack
55+ # service" test which reads the log too.
56+ #
57+ # We do this before the actual comparison to ensure the log is cleared.
58+ echo > "$HTTPD_ROOT_PATH"/access.log &&
59+
60+ test_cmp exp act
61+ '
62+
63+ test_expect_success ' clone remote repository' '
64+ rm -rf test_repo_clone &&
3965 git clone $HTTPD_URL/smart/test_repo.git test_repo_clone
4066'
4167
@@ -68,6 +94,7 @@ test_expect_success 'create and delete remote branch' '
6894'
6995
7096cat > exp << EOF
97+
7198GET /smart/test_repo.git/info/refs?service=git-upload-pack HTTP/1.1 200
7299POST /smart/test_repo.git/git-upload-pack HTTP/1.1 200
73100GET /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200
You can’t perform that action at this time.
0 commit comments