Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-03-17 13:13:11 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-17 18:40:26 +0300
commitf818f7f725e4a49296e9e28cf3bb26aa8a1bf3ba (patch)
tree9775102a3266f4b02c5d20e0e9fb0c2a91752dc7 /t/t6500-gc.sh
parent003cdf8882fe9a57a056ab91d2dd9088624c01a2 (diff)
fetch+push tests: use "test_hook" and "test_when_finished" pattern
Change the "t5516-fetch-push.sh" test code to make use of the new "test_hook" helper, and to use "test_when_finished" to have tests clean up their own state, instead of relying on subsequent tests to clean the trash directory. Before this each test would have been responsible for cleaning up after a preceding test (which may or may not have run, e.g. if --run or "GIT_SKIP_TESTS" was used), now each test will instead clean up after itself. In order to use both "test_hook" and "test_when_finished" we need to move them out of sub-shells, which requires some refactoring. While we're at it split up the "push with negotiation" test, now the middle of the test doesn't need to "rm event", and since it delimited two halves that were testing two different things the end-state is easier to read and reason about. While changing these lines make the minor change from "-fr" to "-rf" as the "rm" argument, some of them used it already, it's more common in the test suite, and it leaves the end-state of the file with more consistency. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6500-gc.sh')
0 files changed, 0 insertions, 0 deletions