summaryrefslogtreecommitdiff
path: root/tests/tests/trustingpolicy-replay
blob: f6053aaffa51272c8f2038846333174128115467 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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