Code

test smart http fetch and push
[git.git] / t / t5550-http-fetch.sh
index 05b1b62cb66956bca57e1fbacac534993637bdd9..8cfce969bcdac6e2091e635dad9c58ca616e5c3b 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='test fetching over http'
+test_description='test dumb fetching over http via static file'
 . ./test-lib.sh
 
 if test -n "$NO_CURL"; then
@@ -30,7 +30,7 @@ test_expect_success 'create http-accessible bare repository' '
 '
 
 test_expect_success 'clone http repository' '
-       git clone $HTTPD_URL/repo.git clone &&
+       git clone $HTTPD_URL/dumb/repo.git clone &&
        test_cmp file clone/file
 '
 
@@ -53,5 +53,19 @@ test_expect_success 'http remote detects correct HEAD' '
        )
 '
 
+test_expect_success 'fetch packed objects' '
+       cp -R "$HTTPD_DOCUMENT_ROOT_PATH"/repo.git "$HTTPD_DOCUMENT_ROOT_PATH"/repo_pack.git &&
+       cd "$HTTPD_DOCUMENT_ROOT_PATH"/repo_pack.git &&
+       git --bare repack &&
+       git --bare prune-packed &&
+       git clone $HTTPD_URL/dumb/repo_pack.git
+'
+
+test_expect_success 'did not use upload-pack service' '
+       grep '/git-upload-pack' <"$HTTPD_ROOT_PATH"/access.log >act
+       : >exp
+       test_cmp exp act
+'
+
 stop_httpd
 test_done