chiark / gitweb /
Tests: Check that --deliberately-include-questionable-history actually works
[dgit.git] / tests / tests / debpolicy-newreject
index de01a53b329cbb7d89a75fd3f295e37e093e3cf1..bf9824ac9cb82130bae41c78cde4864d3e1f6403 100755 (executable)
@@ -2,10 +2,8 @@
 set -e
 . tests/lib
 
-export DGIT_DRS_DEBUG=1
-
 t-debpolicy
-t-prep-newpackage pari-extra 3.1
+t-prep-newpackage example 1.0
 
 cd $p
 
@@ -21,4 +19,26 @@ t-dgit build
 t-expect-fail 'forbidden for testing' \
 t-dgit push --new
 
+git reset --hard HEAD~
+git commit --allow-empty -m 'will vanish from NEW'
+t-dgit build
+t-dgit push --new
+
+t-policy-periodic
+
+# pretend it vanished from new:
+rm $tmp/incoming/*
+t-archive-none example
+touch -d 'last year' $tmp/git/$p.git
+
+t-policy-periodic
+
+git commit --allow-empty -m 'should require --deliberately...questionable'
+t-dgit build
+
+t-expect-fail 'tag debian/1.0 referred to this object.*all previously pushed versions were found to have been removed' \
+t-dgit push --new
+
+t-dgit push --new --deliberately-include-questionable-history
+
 echo xxx up to here