t: warn against adding non-httpd-specific tests after sourcing 'lib-httpd'

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>

SZEDER Gábor committed Aug 1, 2019 at 17:53 UTC decfe05bb668771fb25a23021b2b33bc7649cd32
8 files changed +24
t/t0410-partial-clone.sh
+3
@@ -518,4 +518,7 @@ test_expect_success 'fetching of missing objects from an HTTP server' '
518 git verify-pack --verbose "$IDX" | grep "$HASH"
519 '
520
521 +# DO NOT add non-httpd-specific tests here, because the last part of this
522 +# test script is only executed when httpd is available and enabled.
523 +
524 test_done
t/t5500-fetch-pack.sh
+3
@@ -920,4 +920,7 @@ test_expect_success 'fetch with --filter=blob:limit=0 and HTTP' '
920 fetch_filter_blob_limit_zero "$HTTPD_DOCUMENT_ROOT_PATH/server" "$HTTPD_URL/smart/server"
921 '
922
923 +# DO NOT add non-httpd-specific tests here, because the last part of this
924 +# test script is only executed when httpd is available and enabled.
925 +
926 test_done
t/t5537-fetch-shallow.sh
+3
@@ -255,4 +255,7 @@ test_expect_success 'shallow fetches check connectivity before writing shallow f
255 git -C client fsck
256 '
257
258 +# DO NOT add non-httpd-specific tests here, because the last part of this
259 +# test script is only executed when httpd is available and enabled.
260 +
261 test_done
t/t5545-push-options.sh
+3
@@ -278,4 +278,7 @@ test_expect_success 'push options keep quoted characters intact (http)' '
278 test_cmp expect "$HTTPD_DOCUMENT_ROOT_PATH"/upstream.git/hooks/pre-receive.push_options
279 '
280
281 +# DO NOT add non-httpd-specific tests here, because the last part of this
282 +# test script is only executed when httpd is available and enabled.
283 +
284 test_done
t/t5601-clone.sh
+3
@@ -739,4 +739,7 @@ test_expect_success 'partial clone using HTTP' '
739 partial_clone "$HTTPD_DOCUMENT_ROOT_PATH/server" "$HTTPD_URL/smart/server"
740 '
741
742 +# DO NOT add non-httpd-specific tests here, because the last part of this
743 +# test script is only executed when httpd is available and enabled.
744 +
745 test_done
t/t5616-partial-clone.sh
+3
@@ -417,4 +417,7 @@ test_expect_success 'tolerate server sending REF_DELTA against missing promisor
417 ! test -e "$HTTPD_ROOT_PATH/one-time-sed"
418 '
419
420 +# DO NOT add non-httpd-specific tests here, because the last part of this
421 +# test script is only executed when httpd is available and enabled.
422 +
423 test_done
t/t5700-protocol-v1.sh
+3
@@ -292,4 +292,7 @@ test_expect_success 'push with http:// using protocol v1' '
292 grep "git< version 1" log
293 '
294
295 +# DO NOT add non-httpd-specific tests here, because the last part of this
296 +# test script is only executed when httpd is available and enabled.
297 +
298 test_done
t/t5702-protocol-v2.sh
+3
@@ -723,4 +723,7 @@ test_expect_success 'when server does not send "ready", expect FLUSH' '
723 test_i18ngrep "expected no other sections to be sent after no .ready." err
724 '
725
726 +# DO NOT add non-httpd-specific tests here, because the last part of this
727 +# test script is only executed when httpd is available and enabled.
728 +
729 test_done