5 t-tstunt-parsechangelog
8 t-prep-newpackage example 1.0
13 t-dgit setup-mergechangelogs
15 echo FORBIDDEN >debian/some-file
16 git add debian/some-file
17 t-commit 'Commit a forbidden thing'
19 bad=`git rev-parse HEAD:debian/some-file`
20 t-policy-admin taint --global "$bad" "forbidden for testing"
21 t-policy-admin taint --global "$bad" "forbidden for testing - again"
23 t_expect_push_fail_hook+='
24 t-git-objects-not-present "" $bad
28 t-expect-push-fail 'forbidden for testing' \
30 t-git-dir-check enoent
32 git reset --hard start
33 t-commit 'will vanish from NEW'
37 t-git-dir-check secret
40 t-git-dir-check secret
42 # pretend it vanished from new:
44 t-archive-none example
49 t-git-dir-check enoent
51 t-commit 'should require --deliberately...questionable'
54 t-expect-push-fail E:"tag $tagpfx/${vanished//./\\.} referred to this object.*all previously pushed versions were found to have been removed" \
56 t-git-dir-check enoent
60 t-dgit push --new --deliberately-include-questionable-history \
61 --force-reusing-version
62 t-git-dir-check secret
65 t-git-dir-check secret
67 t-archive-process-incoming new
71 t-git-dir-check secret
73 oldobj=`git rev-parse HEAD`
74 git reset --hard start
75 t-commit 'should require --deliberately..not-ff'
78 t-expect-push-fail "HEAD is not a descendant of the archive's version" \
82 "Package is in NEW and has not been accepted or rejected yet" \
83 t-dgit --deliberately-TEST-dgit-only-not-fast-forward push
85 t-dgit --deliberately-not-fast-forward --force-reusing-version push
88 t-expect-push-fail "Not a valid object name" \
89 git cat-file -p $oldobj
92 t-commit 'Still not accepted, will override taint'
95 "Package is in NEW and has not been accepted or rejected yet" \
98 t-dgit push --deliberately-include-questionable-history \
99 --force-reusing-version
101 t-archive-process-incoming sid
103 t-commit 'Check taint is no longer there'
107 git checkout -b stoats $tagpfx/$vanished
108 t-commit 'Simulate accidentally building on rejected version'
110 t-expect-push-fail "HEAD is not a descendant of the archive's version" \
113 : "check that uploader can't force it now"
114 t-expect-push-fail "not fast forward on dgit branch" \
115 t-dgit --deliberately-not-fast-forward push
120 'Reason: rewound suite sid; --deliberately-not-fast-forward specified' \
121 t-dgit --force-reusing-version push