chiark / gitweb /
Merge tag dgit/2.14 into `defence in dgit-repos-server' branch
[dgit.git] / tests / tests / drs-push-rejects
index f829dc91bbef4372f0b240f2c00be5c063d632ba..dee14b86fe68f14cea98137ef22a03991471b046 100755 (executable)
@@ -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