diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-07-05 01:27:09 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-07-05 13:45:17 +0100 |
commit | d7ee18bed9191dc5af495818626f5355d9c1de97 (patch) | |
tree | a240bbc93d124e7f386a03f4d25e5f99a8f0ac35 /tests/tests/sourceonlypolicy | |
parent | 2a7411655b752fddfc8955f2967dbdc504d50451 (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/tests/sourceonlypolicy')
-rwxr-xr-x | tests/tests/sourceonlypolicy | 38 |
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 |