diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-05-31 15:37:30 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-05-31 16:06:00 +0100 |
commit | c1e9b51c128cde4b5359618c28405981d690127e (patch) | |
tree | 0765cf003d02e1f2a4bf1cf7fbf440ace3f1998e /tests/tests/trustingpolicy-replay | |
parent | 0e6fdb25bacae95c16679692426b5ce7c2b150d9 (diff) |
Test suite: add some replay prevention tests
Diffstat (limited to 'tests/tests/trustingpolicy-replay')
-rwxr-xr-x | tests/tests/trustingpolicy-replay | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/tests/trustingpolicy-replay b/tests/tests/trustingpolicy-replay new file mode 100755 index 0000000..f6053aa --- /dev/null +++ b/tests/tests/trustingpolicy-replay @@ -0,0 +1,34 @@ +#!/bin/bash +set -e +. tests/lib + +t-tstunt-parsechangelog + +t-policy dgit-repos-policy-trusting +t-prep-newpackage example 1.0 + +cd $p +revision=1 +git tag start + +t-dgit build +t-dgit push --new + +t-commit 'Prep v2 which will be rewound' +t-dgit build +t-dgit push + +t-rm-dput-dropping +git checkout debian/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' \ +git push "$remote" \ + debian/1.1 \ + debian/1.1~0:refs/dgit/sid + +echo ok. +echo xxx want to check replay prevention insufficient proofs in tag |