Diff options
| -rwxr-xr-x | 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 "<div class=.error.>No signature for dates-base.tar</div>" tmp && + test_grep ! "notes tree" err ' # A scanned repository names its own default branch, which the index stats |
