summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib2
-rwxr-xr-xtests/tests/drs-push-rejects15
2 files changed, 16 insertions, 1 deletions
diff --git a/tests/lib b/tests/lib
index 579ddda..5fcb6f6 100644
--- a/tests/lib
+++ b/tests/lib
@@ -350,7 +350,7 @@ t-git-dir-check () {
}
t-git-fsck () {
- git fsck --no-dangling --strict
+ git fsck --no-dangling --strict || ${expect_fsck_fail-false}
}
t-fscks () {
diff --git a/tests/tests/drs-push-rejects b/tests/tests/drs-push-rejects
index f829dc9..dee14b8 100755
--- a/tests/tests/drs-push-rejects
+++ b/tests/tests/drs-push-rejects
@@ -139,6 +139,18 @@ mktag
mustfail 'tag name in tag is wrong' \
refs/tags/$tagpfx/wombat:refs/tags/$tagpfx/$version $push_spec1
+echo ====
+badcommit=$(
+ git cat-file commit HEAD | \
+ perl -pe 's/^committer.*\n//' | \
+ git hash-object -w -t commit --stdin
+)
+git checkout -b broken $badcommit
+prep unstable sid
+mktag
+mustfail "corrupted object $badcommit" $push_spec
+
+git checkout dgit/sid
prep unstable sid
mktag
mustsucceed $push_spec # succeeds
@@ -191,4 +203,7 @@ 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