chiark / gitweb /
Split brain: dgit-repos-server: Permit pushing maintainer tag too
[dgit.git] / tests / tests / drs-push-rejects
index 3a709472efdb2b3fada31f544cf78eab6db03ee1..6f2797a04fbbb49bffefc4b99278657bc3f3cbca 100755 (executable)
@@ -5,7 +5,7 @@ set -e
 t-drs
 t-git-none
 
-p=pari-extra
+t-select-package pari-extra
 t-worktree drs
 
 cd $p
@@ -31,12 +31,13 @@ prep () {
        cp $tmp/masters/* $tmp/.
        tag_signer='-u Senatus'
        tag_message="$p release $version for $suite ($csuite) [dgit]"
-       tag_name=debian/$version
+       tag_name=$tagpfx/$version
        push_spec1="HEAD:refs/dgit/$csuite"
        push_spec2="refs/tags/$tag_name"
        push_spec="$push_spec1 $push_spec2"
 }
 mktag () {
+       t-git-next-date
        git tag -f $tag_signer -m "$tag_message" $tag_name "$@"
 }
 
@@ -101,7 +102,8 @@ mustfail 'push is missing tag ref update' $push_spec1
 mustfail 'push is missing head ref update' +$push_spec2
 mustfail 'pushing unexpected ref' $push_spec HEAD:refs/wombat
 mustfail 'pushing multiple heads' $push_spec HEAD:refs/dgit/wombat
-mustfail 'pushing multiple tags' $push_spec HEAD:refs/tags/debian/wombat
+mustfail E:'pushing multiple tags|pushing too many similar tags' \
+       $push_spec HEAD:refs/tags/$tagpfx/wombat
 
 prep unstable sid
 mktag
@@ -128,11 +130,11 @@ mktag HEAD~:
 mustfail 'tag refers to wrong kind of object' $push_spec
 
 prep unstable sid
-tag_name=debian/wombat
+tag_name=$tagpfx/wombat
 mktag
-#git update-ref debian/$version debian/wombat
+#git update-ref $tagpfx/$version $tagpfx/wombat
 mustfail 'tag name in tag is wrong' \
-       refs/tags/debian/wombat:refs/tags/debian/$version $push_spec1
+       refs/tags/$tagpfx/wombat:refs/tags/$tagpfx/$version $push_spec1
 
 prep unstable sid
 mktag