chiark / gitweb /
tests: drs-push-rejects: wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 26 Feb 2014 19:10:07 +0000 (19:10 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 5 Mar 2014 18:29:08 +0000 (18:29 +0000)
tests/tests/drs-push-rejects

index 10c10bf..6098da7 100755 (executable)
@@ -26,9 +26,10 @@ mustfail () {
        fi
 }
 
-mktag1 () {
+prep () {
        local suite=$1
        local csuite=$2
+       cp $tmp/masters/* $tmp/.
        tag_signer='-u Senatus'
        tag_message="$p release $version for $suite ($csuite) [dgit]"
        tag_name=debian/3-2_dummy1
@@ -36,31 +37,36 @@ mktag1 () {
        push_spec2="refs/tags/$tag_name"
        push_spec="$push_spec1 $push_spec2"
 }
-mktag2 () {
+mktag () {
        git tag -f $tag_signer -m "$tag_message" $tag_name "$@"
 }
 
+mkdir $tmp/masters
+cp $tmp/d[dm].* $tmp/masters
 
 version=3-2_dummy1
 
-mktag1 unstable sid
+prep unstable sid
 tag_signer='-a'
-mktag2
+mktag
 mustfail 'missing signature' $push_spec
 
-mktag1 unstable sid
+prep unstable sid
 tag_message='something'
-mktag2
+mktag
 mustfail 'tag message not in expected format' $push_spec
 
-mktag1 unstable sid
-mktag2
+prep unstable sid
+mktag
 
 mustfail 'sid != sponge' HEAD:refs/dgit/sponge $push_spec2
 
+# fixme test --sig-policy-url string
+# fixme cannot test   reject "signature is not of type 00!";
+
 git push origin $push_spec
 
-mktag2
+mktag
 
 mustfail 'not replacing previously-pushed version' $push_spec