summaryrefslogtreecommitdiff
path: root/tests/tests
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-01-05 13:47:40 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2017-01-05 13:47:40 +0000
commit7a47622fe7b1a2d1db2f3cb917926e93c683dc2a (patch)
treee1dde493a094b7367932853153418e2a0e60d37e /tests/tests
parent82da82e49b4ae7143bf9fdb582fcb46e1446a2e4 (diff)
test suite: Test bad commit defence in drs-push-rejects
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/tests')
-rwxr-xr-xtests/tests/drs-push-rejects12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/tests/drs-push-rejects b/tests/tests/drs-push-rejects
index f87cbdc..7b7c5f3 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