5 t-tstunt-parsechangelog
8 t-prep-newpackage example 1.0
13 t-prep-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"
22 t_expect_push_fail_hook+='
23 t-git-objects-not-present "" $bad
27 t-expect-push-fail 'forbidden for testing' \
29 t-git-dir-check enoent
31 git reset --hard start
32 t-commit 'will vanish from NEW'
36 t-git-dir-check secret
39 t-git-dir-check secret
41 # pretend it vanished from new:
43 t-archive-none example
48 t-git-dir-check enoent
50 t-commit 'should require --deliberately...questionable'
53 t-expect-push-fail E:"tag debian/${vanished//./\\.} referred to this object.*all previously pushed versions were found to have been removed" \
55 t-git-dir-check enoent
59 t-dgit push --new --deliberately-include-questionable-history
60 t-git-dir-check secret
63 t-git-dir-check secret
65 t-archive-process-incoming new
69 t-git-dir-check secret
71 oldobj=`git rev-parse HEAD`
72 git reset --hard start
73 t-commit 'should require --deliberately..not-ff'
76 t-expect-push-fail "HEAD is not a descendant of the archive's version" \
80 "Package is in NEW and has not been accepted or rejected yet" \
81 t-dgit --deliberately-TEST-dgit-only-not-fast-forward push
83 t-dgit --deliberately-not-fast-forward push
86 t-expect-push-fail "Not a valid object name" \
87 git cat-file -p $oldobj
90 t-commit 'Still not accepted, will override taint'
93 "Package is in NEW and has not been accepted or rejected yet" \
96 t-dgit push --deliberately-include-questionable-history
98 t-archive-process-incoming sid
100 t-commit 'Check taint is no longer there'
104 git checkout -b stoats debian/$vanished
105 t-commit 'Simulate accidentally building on rejected version'
107 t-expect-push-fail "HEAD is not a descendant of the archive's version" \
110 : "check that uploader can't force it now"
111 t-expect-push-fail "not fast forward on dgit branch" \
112 t-dgit --deliberately-not-fast-forward push
117 'Reason: rewound suite sid; --deliberately-not-fast-forward specified' \