14 local wantmsg="$1"; shift
16 git push origin "$@" 2>&1 |tee $tmp/mustfail.txt
20 "0 0") fail "push unexpectedly succeeded: $*" ;;
22 *) fail "tee failed" ;;
24 if ! fgrep "$wantmsg" $tmp/mustfail.txt >/dev/null; then
25 fail "error message not found"
32 cp $tmp/masters/* $tmp/.
33 tag_signer='-u Senatus'
34 tag_message="$p release $version for $suite ($csuite) [dgit]"
35 tag_name=debian/$version
36 push_spec1="HEAD:refs/dgit/$csuite"
37 push_spec2="refs/tags/$tag_name"
38 push_spec="$push_spec1 $push_spec2"
41 git tag -f $tag_signer -m "$tag_message" $tag_name "$@"
45 cp $tmp/d[dm].* $tmp/masters
52 mustfail 'missing signature' $push_spec
55 tag_message='something'
57 mustfail 'tag message not in expected format' $push_spec
61 mustfail 'sid != sponge' HEAD:refs/dgit/sponge $push_spec2
63 # fixme test --sig-policy-url string
64 # fixme cannot test reject "signature is not of type 00!";
68 cp $tmp/dm.gpg $tmp/dd.gpg
69 mustfail 'key not found in keyrings'
72 git push origin $push_spec # succeeds
74 mustfail 'not replacing previously-pushed version' $push_spec
79 next unless m/^fingerprint: 3A82860837A0CD32/i../^$/;
81 tag_signer='-u Populus'
88 prep_dm_mangle 's/allow:/asponge:/i'
89 mustfail 'missing Allow section in permission' $push_spec
91 prep_dm_mangle 's/\bpari-extra\b/sponge/i'
92 mustfail "package $p not allowed for key" $push_spec
94 prep_dm_mangle 'y/0-9/5-90-4/ if m/^fingerprint:/i'
95 mustfail "not in permissions list although in keyring" $push_spec
98 git push origin $push_spec # succeeds