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 t-git-dir-check secret
64 t-git-dir-check secret
66 t-archive-process-incoming new
70 t-git-dir-check secret
72 oldobj=`git rev-parse HEAD`
73 git reset --hard start
74 t-commit 'should require --deliberately..not-ff'
77 t-expect-push-fail "HEAD is not a descendant of the archive's version" \
81 "Package is in NEW and has not been accepted or rejected yet" \
82 t-dgit --deliberately-TEST-dgit-only-not-fast-forward push
84 t-dgit --deliberately-not-fast-forward push
87 t-expect-push-fail "Not a valid object name" \
88 git cat-file -p $oldobj
91 t-commit 'Still not accepted, will override taint'
94 "Package is in NEW and has not been accepted or rejected yet" \
97 t-dgit push --deliberately-include-questionable-history
99 t-archive-process-incoming sid
101 t-commit 'Check taint is no longer there'
105 git checkout -b stoats $tagpfx/$vanished
106 t-commit 'Simulate accidentally building on rejected version'
108 t-expect-push-fail "HEAD is not a descendant of the archive's version" \
111 : "check that uploader can't force it now"
112 t-expect-push-fail "not fast forward on dgit branch" \
113 t-dgit --deliberately-not-fast-forward push
118 'Reason: rewound suite sid; --deliberately-not-fast-forward specified' \