X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Ftests%2Ftrustingpolicy-replay;h=2039ec6c243db92b40dae0b15d946cb870e0cde8;hp=4fc3c175bb5383faa81ad29836d13fb757ae2695;hb=a99b94f7071fb3d3db2d679af5a736627ef10102;hpb=b1dad15471a23b4a60a69de34dd4772da8663262 diff --git a/tests/tests/trustingpolicy-replay b/tests/tests/trustingpolicy-replay index 4fc3c175..2039ec6c 100755 --- a/tests/tests/trustingpolicy-replay +++ b/tests/tests/trustingpolicy-replay @@ -4,6 +4,8 @@ set -e t-tstunt-parsechangelog +t-git-config dgit.default.dep14tag no + t-dsd t-policy dgit-repos-policy-trusting t-prep-newpackage example 1.0 @@ -20,16 +22,16 @@ t-dgit build t-dgit push t-rm-dput-dropping -git checkout debian/1.0 +git checkout $tagpfx/1.0 t-dgit build t-dgit push --deliberately-fresh-repo remote="`git config dgit-distro.test-dummy.git-url`/$p.git" -t-expect-fail 'Replay of previously-rewound upload' \ +t-expect-push-fail 'Replay of previously-rewound upload' \ git push "$remote" \ - debian/1.1 \ - debian/1.1~0:refs/dgit/sid + $tagpfx/1.1 \ + $tagpfx/1.1~0:refs/dgit/sid git checkout master @@ -43,11 +45,11 @@ prepare-replay () { # record the tag, which prevents the replays. We are simulating # abortive pushes (since we do want to avoid a situation where # dangerous old signed tags can exist). - t-policy false + t-policy-nonexist t-commit "request with $delib that we will replay" t-dgit build - t-expect-fail "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 @@ -57,17 +59,17 @@ prepare-replay () { attempt-replay () { local mpat=$1 - git show debian/$replayv | grep -e $delib - t-expect-fail "$mpat" \ + git show $tagpfx/$replayv | grep -e $delib + t-expect-push-fail "$mpat" \ git push "$remote" \ - debian/$replayv \ - +debian/$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 -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' @@ -77,7 +79,7 @@ t-commit 'later version to stop not fast forward rewinding' t-dgit build t-dgit push -attempt-replay "does not declare previously tags/debian/$v" +attempt-replay "does not declare previously tags/$tagpfx/$v" echo ok.