t5703: run all non-httpd-specific tests before sourcing 'lib-httpd.sh'
commit7f005b0f483a507d3c7b353f4753ac3fece88bc0
authorSZEDER Gábor <szeder.dev@gmail.com>
Thu, 1 Aug 2019 15:53:08 +0000 (1 17:53 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 1 Aug 2019 18:39:06 +0000 (1 11:39 -0700)
treed66b6b6872b9193223df5410ff8f54720c2f71aa
parent12b1826609d5c309336ffd9f56e42abaf8d96cef
t5703: run all non-httpd-specific tests before sourcing 'lib-httpd.sh'

't5703-upload-pack-ref-in-want.sh' sources 'lib-httpd.sh' near the end
to run a couple of httpd-specific tests, but 'lib-httpd.sh' skips all
the rest of the test script if the dependencies for running httpd
tests are not fulfilled.  However, the last six tests in 't5703' are
not httpd-specific, but they are skipped as well when httpd tests
can't be run.

Move these six tests earlier in the test script, before 'lib-httpd.sh'
is sourced, so they will be run even when httpd tests aren't.  Note
that this is not merely a pure code movement, because the setup test
case for the httpd tests needed an additional 'rm -rf
"$LOCAL_PRISTINE"' to clean up a directory left behind by the moved
non-httpd-specific tests.

Also add a comment at the end of this test script to warn against
adding non-httpd-specific tests at the end, in the hope that it 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/t5703-upload-pack-ref-in-want.sh