chiark / gitweb /
Tests: Test rejection of removed NEW package
[dgit.git] / tests / tests / debpolicy-newreject
1 #!/bin/bash
2 set -e
3 . tests/lib
4
5 t-debpolicy
6 t-prep-newpackage example 1.0
7
8 cd $p
9
10
11 echo FORBIDDEN >debian/some-file
12 git add debian/some-file
13 git commit -m 'Commit a forbidden thing'
14
15 bad=`git rev-parse HEAD:debian/some-file`
16 t-policy-admin taint --global "$bad" "forbidden for testing"
17
18 t-dgit build
19 t-expect-fail 'forbidden for testing' \
20 t-dgit push --new
21
22 git reset --hard HEAD~
23 git commit --allow-empty -m 'will vanish from NEW'
24 t-dgit build
25 t-dgit push --new
26
27 t-policy-periodic
28
29 # pretend it vanished from new:
30 rm $tmp/incoming/*
31 t-archive-none example
32 touch -d 'last year' $tmp/git/$p.git
33
34 t-policy-periodic
35
36 git commit --allow-empty -m 'should require --deliberately...questionable'
37 t-dgit build
38
39 t-expect-fail 'tag debian/1.0 referred to this object.*all previously pushed versions were found to have been removed' \
40 t-dgit push --new
41
42 echo xxx up to here