summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/tests/drs-push-rejects13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/tests/drs-push-rejects b/tests/tests/drs-push-rejects
index f6b5880..67e0dfb 100755
--- a/tests/tests/drs-push-rejects
+++ b/tests/tests/drs-push-rejects
@@ -37,6 +37,15 @@ mustfail () {
diff $tmp/show-refs.{pre,post}-push
}
+mustsucceed () {
+ reporefs >$tmp/show-refs.pre-push
+ git push origin "$@"
+ reporefs >$tmp/show-refs.post-push
+ if diff $tmp/show-refs.{pre,post}-push >$tmp/show-refs.diff; then
+ fail "no refs updated"
+ fi
+}
+
prep () {
local suite=$1
local csuite=$2
@@ -88,7 +97,7 @@ cp $tmp/dm.gpg $tmp/dd.gpg
mustfail 'key not found in keyrings' $push_spec
prep unstable sid
-git push origin $push_spec # succeeds
+mustsucceed $push_spec # succeeds
mktag
mustfail 'not replacing previously-pushed version' $push_spec
@@ -114,6 +123,6 @@ prep_dm_mangle 'y/0-9/5-90-4/ if m/^fingerprint:/i'
mustfail "not in permissions list although in keyring" $push_spec
prep_dm_mangle ''
-git push origin $push_spec # succeeds
+mustsucceed $push_spec # succeeds
echo ok.