chiark / gitweb /
dgit-repos-server: some better error msgs, more tests
[dgit.git] / tests / tests / drs-push-rejects
index fa3b53044b7d4d9ab10bbedd58787f808e310298..aa092bc81ee7eb73f05cc22a87af78f762d066a6 100755 (executable)
@@ -97,7 +97,17 @@ cp $tmp/dm.gpg $tmp/dd.gpg
 mustfail 'key not found in keyrings' $push_spec
 
 prep unstable sid
+mktag HEAD~
+mustfail 'tag refers to wrong commit' $push_spec
+
+prep unstable sid
+mktag HEAD~:
+mustfail 'tag refers to wrong kind of object' $push_spec
+
+prep unstable sid
+mktag
 mustsucceed $push_spec # succeeds
+
 mktag
 mustfail 'not replacing previously-pushed version' $push_spec
 
@@ -113,6 +123,10 @@ prep_dm_mangle () {
 git checkout v2
 version=3-2_dummy2
 
+prep_dm_mangle ''
+perl -i.bak -ne 'print if 1..s/(pari-extra).*\n/$1/' $tmp/dm.txt
+mustfail '' $push_spec # malformed (truncated) dm.txt; don't care about msg
+
 prep_dm_mangle 's/allow:/asponge:/i'
 mustfail 'missing Allow section in permission' $push_spec