chiark / gitweb /
test suite: Make expect_fsck_fail contain objids
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 5 Jan 2017 15:30:13 +0000 (15:30 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 5 Jan 2017 15:30:13 +0000 (15:30 +0000)
This will make it possible to be stricter.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/lib
tests/tests/drs-push-rejects

index 5fcb6f656b82497e2726638c7ae2523bc5245064..fb9ee38b4ab113e27268a3391ec4bd14ba04d35f 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -350,7 +350,7 @@ t-git-dir-check () {
 }
 
 t-git-fsck () {
-       git fsck --no-dangling --strict || ${expect_fsck_fail-false}
+       git fsck --no-dangling --strict || ${expect_fsck_fail:+true} false
 }
 
 t-fscks () {
index dee14b86fe68f14cea98137ef22a03991471b046..79d02b225738514635d629da4d9c17f0e87ca530 100755 (executable)
@@ -84,6 +84,8 @@ for h in object type tag; do
     git update-ref refs/tags/$tag_name $badtag
 
     mustfail 'multiple headers '$h' in signed tag object' $push_spec
+
+    expect_fsck_fail+=" $badtag"
   done
 done
 
@@ -145,6 +147,7 @@ badcommit=$(
        perl -pe 's/^committer.*\n//' | \
        git hash-object -w -t commit --stdin
 )
+expect_fsck_fail+=" $badcommit"
 git checkout -b broken $badcommit
 prep unstable sid
 mktag
@@ -203,7 +206,4 @@ mustfail "not in permissions list although in keyring" $push_spec
 prep_dm_mangle ''
 mustsucceed $push_spec # succeeds
 
-# we generate some junk, so we must tolerate git-fsck complaining
-expect_fsck_fail=true
-
 t-ok