From 7316012e29f3e0def3b9378a67efc9864b385916 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 16:42:11 -1000 Subject: Expect working pages beside a notes ref at a blob The loop asserted only absences, so a 404 or any error but the die text passed, and the final 404 is also what a name that resolves to nothing gets. --- tests/t0303-robustness.sh | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index f14d9dd..65fbb53 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -856,18 +856,15 @@ test_expect_success 'a notes ref that names no tree is passed over' ' blob=$(echo not-a-tree | git -C repos/dates hash-object -w --stdin) && git -C repos/dates update-ref refs/notes/commits $blob && git -C repos/dates update-ref refs/notes/signatures/tar $blob && - { - echo "snapshots=tar" && - cat datesrc - } >notesrc && - for q in "url=dates/" "url=dates/log/" "url=dates/refs/" "url=dates/tree/" \ - "url=dates/snapshot/dates-base.tar.asc" + cgitrc_repo notesrc dates snapshots=tar && + for q in "url=dates/" "url=dates/log/" "url=dates/refs/" "url=dates/tree/" do - cgit_rc notesrc "$q" >tmp 2>err && - ! grep "Unable to complete" tmp && - ! grep "notes tree" err || return 1 + cgit_ok notesrc "$q" >tmp || return 1 done && - grep "^Status: 404" tmp + cgit_rc notesrc "url=dates/snapshot/dates-base.tar.asc" >tmp 2>err && + test_grep "^Status: 404" tmp && + test_grep "
No signature for dates-base.tar
" tmp && + test_grep ! "notes tree" err ' # A scanned repository names its own default branch, which the index stats -- cgit 2.12.1