From e350308a786ac5234f7f11dc7328699ac51dda89 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 17:41:42 -1000 Subject: Give each robustness test a fixture of its own repos/rob took commits, refs, tags, a repack and a moved HEAD from test after test, so what a test checked hung on the ones before it. A test that changes a repository, or needs one in a shape of its own, now builds it, and rob is only read. The tests that leaned on a config or a scanned repository an earlier test left build their own too. --- tests/t0303-robustness.sh | 249 ++++++++++++++++++++++++++-------------------- 1 file changed, 143 insertions(+), 106 deletions(-) diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 7fa06da..f7409f1 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -7,6 +7,9 @@ test_description='Check the audit regressions' . ./setup.sh +# The tests that only read a repository share rob, and each test that changes +# one, or needs one in a shape of its own, builds it, so what a test finds +# does not hang on the tests that ran before it. test_expect_success 'set up a repository and a config to vary' ' mkrepo repos/rob 3 && sha=$(git -C repos/rob rev-parse HEAD~1) && @@ -32,9 +35,14 @@ test_expect_success 'a repository without a path answers 404' ' # The index dates a repository from files under its path, and one without a # path has none, whatever sits in the working directory. test_expect_success 'a repository without a path has no age on the index' ' + { + echo "virtual-root=/" && + echo "cache-size=0" && + echo "repo.url=nopath" + } >nopathagerc && mkdir -p "(null)/refs/heads" && >"(null)/refs/heads/master" && - cgit_ok nopathrc "url=" >tmp && + cgit_ok nopathagerc "url=" >tmp && test_grep ">nopath" tmp && test_grep "" tmp && test_grep ! "