Skip to content

Commit decfe05

Browse files
szedergitster
authored andcommitted
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>
1 parent 7f005b0 commit decfe05

File tree

8 files changed

+24
-0
lines changed

8 files changed

+24
-0
lines changed

t/t0410-partial-clone.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,4 +518,7 @@ test_expect_success 'fetching of missing objects from an HTTP server' '
518518
git verify-pack --verbose "$IDX" | grep "$HASH"
519519
'
520520

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+
521524
test_done

t/t5500-fetch-pack.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -920,4 +920,7 @@ test_expect_success 'fetch with --filter=blob:limit=0 and HTTP' '
920920
fetch_filter_blob_limit_zero "$HTTPD_DOCUMENT_ROOT_PATH/server" "$HTTPD_URL/smart/server"
921921
'
922922

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+
923926
test_done

t/t5537-fetch-shallow.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,4 +255,7 @@ test_expect_success 'shallow fetches check connectivity before writing shallow f
255255
git -C client fsck
256256
'
257257

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+
258261
test_done

t/t5545-push-options.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,4 +278,7 @@ test_expect_success 'push options keep quoted characters intact (http)' '
278278
test_cmp expect "$HTTPD_DOCUMENT_ROOT_PATH"/upstream.git/hooks/pre-receive.push_options
279279
'
280280

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+
281284
test_done

t/t5601-clone.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,4 +739,7 @@ test_expect_success 'partial clone using HTTP' '
739739
partial_clone "$HTTPD_DOCUMENT_ROOT_PATH/server" "$HTTPD_URL/smart/server"
740740
'
741741

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+
742745
test_done

t/t5616-partial-clone.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,4 +417,7 @@ test_expect_success 'tolerate server sending REF_DELTA against missing promisor
417417
! test -e "$HTTPD_ROOT_PATH/one-time-sed"
418418
'
419419

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+
420423
test_done

t/t5700-protocol-v1.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,4 +292,7 @@ test_expect_success 'push with http:// using protocol v1' '
292292
grep "git< version 1" log
293293
'
294294

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+
295298
test_done

t/t5702-protocol-v2.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,4 +723,7 @@ test_expect_success 'when server does not send "ready", expect FLUSH' '
723723
test_i18ngrep "expected no other sections to be sent after no .ready." err
724724
'
725725

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+
726729
test_done

0 commit comments

Comments
 (0)