summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-07-05 01:27:09 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-07-05 13:45:17 +0100
commitd7ee18bed9191dc5af495818626f5355d9c1de97 (patch)
treea240bbc93d124e7f386a03f4d25e5f99a8f0ac35 /tests
parent2a7411655b752fddfc8955f2967dbdc504d50451 (diff)
test suite: sourceonlypolicy: New test
Test the fix for #801435. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/tests/sourceonlypolicy38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/tests/sourceonlypolicy b/tests/tests/sourceonlypolicy
new file mode 100755
index 0000000..b0569c3
--- /dev/null
+++ b/tests/tests/sourceonlypolicy
@@ -0,0 +1,38 @@
+#!/bin/bash
+set -e
+. tests/lib
+
+t-tstunt-parsechangelog
+
+t-prep-newpackage example 1.0
+
+cd $p
+revision=1
+
+dgit-with-policy () {
+ local policy=$1; shift
+ t-dgit -cdgit-distro.test-dummy.source-only-uploads=$policy "$@"
+}
+
+t-expect-fail E:'source-only.*entirely NEW' \
+dgit-with-policy not-wholly-new push-source --new
+
+t-expect-fail E:'source-only.*requires \.debs' \
+dgit-with-policy never push-source --new
+
+dgit-with-policy always push-source --new
+
+t-archive-process-incoming sid
+
+t-commit 'Now with binaries'
+
+t-dgit -wgf build
+
+t-expect-fail E:'uploading binaries.*source only' \
+dgit-with-policy always push --new
+
+t-commit 'Source-only not NEW'
+
+dgit-with-policy not-wholly-new push-source --new
+
+t-ok