chiark / gitweb /
By default, generate a DEP-14 tag as well as a dgit archive/* tag
[dgit.git] / tests / tests / trustingpolicy-replay
index f2a704317e34154ac2e0e525dfb66af4a8e76d52..2039ec6c243db92b40dae0b15d946cb870e0cde8 100755 (executable)
@@ -4,6 +4,8 @@ set -e
 
 t-tstunt-parsechangelog
 
 
 t-tstunt-parsechangelog
 
+t-git-config dgit.default.dep14tag no
+
 t-dsd
 t-policy dgit-repos-policy-trusting
 t-prep-newpackage example 1.0
 t-dsd
 t-policy dgit-repos-policy-trusting
 t-prep-newpackage example 1.0
@@ -20,7 +22,7 @@ t-dgit build
 t-dgit push
 
 t-rm-dput-dropping
 t-dgit push
 
 t-rm-dput-dropping
-git checkout test-dummy/1.0
+git checkout $tagpfx/1.0
 t-dgit build
 t-dgit push --deliberately-fresh-repo
 
 t-dgit build
 t-dgit push --deliberately-fresh-repo
 
@@ -28,8 +30,8 @@ remote="`git config dgit-distro.test-dummy.git-url`/$p.git"
 
 t-expect-push-fail 'Replay of previously-rewound upload' \
 git push "$remote" \
 
 t-expect-push-fail 'Replay of previously-rewound upload' \
 git push "$remote" \
-       test-dummy/1.1 \
-       test-dummy/1.1~0:refs/dgit/sid
+       $tagpfx/1.1 \
+       $tagpfx/1.1~0:refs/dgit/sid
 
 git checkout master
 
 
 git checkout master
 
@@ -47,7 +49,7 @@ prepare-replay () {
 
        t-commit "request with $delib that we will replay"
        t-dgit build
 
        t-commit "request with $delib that we will replay"
        t-dgit build
-       t-expect-push-fail E:'policy-hook.*No such file or directory' \
+       t-expect-push-fail 'system: No such file or directory' \
        t-dgit push $delib
 
        t-policy dgit-repos-policy-trusting
        t-dgit push $delib
 
        t-policy dgit-repos-policy-trusting
@@ -57,17 +59,17 @@ prepare-replay () {
 
 attempt-replay () {
        local mpat=$1
 
 attempt-replay () {
        local mpat=$1
-       git show test-dummy/$replayv | grep -e $delib
+       git show $tagpfx/$replayv | grep -e $delib
        t-expect-push-fail "$mpat" \
        git push "$remote" \
        t-expect-push-fail "$mpat" \
        git push "$remote" \
-               test-dummy/$replayv \
-               +test-dummy/$replayv~0:refs/dgit/sid
+               $tagpfx/$replayv \
+               +$tagpfx/$replayv~0:refs/dgit/sid
 }
 
 prepare-replay --deliberately-fresh-repo
 
 # simulate some other thing that we shouldn't delete
 }
 
 prepare-replay --deliberately-fresh-repo
 
 # simulate some other thing that we shouldn't delete
-git push $tmp/git/$p.git +master:refs/heads/for-testing
+git push $dgitrepo +master:refs/heads/for-testing
 
 attempt-replay 'does not declare previously heads/for-testing'
 
 
 attempt-replay 'does not declare previously heads/for-testing'
 
@@ -77,7 +79,7 @@ t-commit 'later version to stop not fast forward rewinding'
 t-dgit build
 t-dgit push
 
 t-dgit build
 t-dgit push
 
-attempt-replay "does not declare previously tags/test-dummy/$v"
+attempt-replay "does not declare previously tags/$tagpfx/$v"
 
 
 echo ok.
 
 
 echo ok.