]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t: warn against adding non-httpd-specific tests after sourcing 'lib-httpd'
authorSZEDER Gábor <szeder.dev@gmail.com>
Thu, 1 Aug 2019 15:53:09 +0000 (17:53 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 2 Aug 2019 16:35:57 +0000 (09:35 -0700)
We have a couple of test scripts that are not completely
httpd-specific, but do run a few httpd-specific tests at the end.
These test scripts source 'lib-httpd.sh' somewhere mid-script, which
then skips all the rest of the test script if the dependencies for
running httpd tests are not fulfilled.

As the previous two patches in this series show, already on two
occasions non-httpd-specific tests were appended at the end of such
test scripts, and, consequently, they were skipped as well when httpd
tests couldn't be run.

Add a comment at the end of these test scripts to warn against adding
non-httpd-specific tests at the end, in the hope that they will help
prevent similar issues in the future.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0410-partial-clone.sh
t/t5500-fetch-pack.sh
t/t5537-fetch-shallow.sh
t/t5545-push-options.sh
t/t5601-clone.sh
t/t5616-partial-clone.sh
t/t5700-protocol-v1.sh
t/t5702-protocol-v2.sh

index 5bd892f2f7a90ac9e35993c137e0addd10d17bde..6415063980b49985b25d351f5c0079f44ad92533 100755 (executable)
@@ -518,4 +518,7 @@ test_expect_success 'fetching of missing objects from an HTTP server' '
        git verify-pack --verbose "$IDX" | grep "$HASH"
 '
 
+# DO NOT add non-httpd-specific tests here, because the last part of this
+# test script is only executed when httpd is available and enabled.
+
 test_done
index 1c71c0ec770cd54505f65bf83eca91f153cdf785..8210f63d41edbea01dffaae37282436846d3974b 100755 (executable)
@@ -920,4 +920,7 @@ test_expect_success 'fetch with --filter=blob:limit=0 and HTTP' '
        fetch_filter_blob_limit_zero "$HTTPD_DOCUMENT_ROOT_PATH/server" "$HTTPD_URL/smart/server"
 '
 
+# DO NOT add non-httpd-specific tests here, because the last part of this
+# test script is only executed when httpd is available and enabled.
+
 test_done
index 66f0b64d39273d9e2f6ae5c74e195e50e4b712c5..97a67728ca9b9a16f81fb278f44fd3412383c154 100755 (executable)
@@ -255,4 +255,7 @@ test_expect_success 'shallow fetches check connectivity before writing shallow f
        git -C client fsck
 '
 
+# DO NOT add non-httpd-specific tests here, because the last part of this
+# test script is only executed when httpd is available and enabled.
+
 test_done
index 6d1d59c9b1af8c1ca7d6e78c8a589395ff971338..04b34c4de19f858c530e6944822d778c26391a72 100755 (executable)
@@ -278,4 +278,7 @@ test_expect_success 'push options keep quoted characters intact (http)' '
        test_cmp expect "$HTTPD_DOCUMENT_ROOT_PATH"/upstream.git/hooks/pre-receive.push_options
 '
 
+# DO NOT add non-httpd-specific tests here, because the last part of this
+# test script is only executed when httpd is available and enabled.
+
 test_done
index 37d76808d4a74b101f0606fc7a114fed6a8afa91..4a3b901f067c2cb024247f2dc9299a6215939019 100755 (executable)
@@ -739,4 +739,7 @@ test_expect_success 'partial clone using HTTP' '
        partial_clone "$HTTPD_DOCUMENT_ROOT_PATH/server" "$HTTPD_URL/smart/server"
 '
 
+# DO NOT add non-httpd-specific tests here, because the last part of this
+# test script is only executed when httpd is available and enabled.
+
 test_done
index b91ef548f86b0e250b8fdcd1b8b764c780218931..565254558f362397270bcf13bd3566993e1b0f50 100755 (executable)
@@ -417,4 +417,7 @@ test_expect_success 'tolerate server sending REF_DELTA against missing promisor
        ! test -e "$HTTPD_ROOT_PATH/one-time-sed"
 '
 
+# DO NOT add non-httpd-specific tests here, because the last part of this
+# test script is only executed when httpd is available and enabled.
+
 test_done
index 7c9511c593c175b5065970b75319c6da03d68b31..2571eb90b7656cf2237a90806b79f14ab204d90c 100755 (executable)
@@ -292,4 +292,7 @@ test_expect_success 'push with http:// using protocol v1' '
        grep "git< version 1" log
 '
 
+# DO NOT add non-httpd-specific tests here, because the last part of this
+# test script is only executed when httpd is available and enabled.
+
 test_done
index 011b81d4fc27805c90f5371632c3844011f707af..fbddd0aea9340827899c766c7235226f5a4823a6 100755 (executable)
@@ -723,4 +723,7 @@ test_expect_success 'when server does not send "ready", expect FLUSH' '
        test_i18ngrep "expected no other sections to be sent after no .ready." err
 '
 
+# DO NOT add non-httpd-specific tests here, because the last part of this
+# test script is only executed when httpd is available and enabled.
+
 test_done