From d7ee18bed9191dc5af495818626f5355d9c1de97 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 5 Jul 2018 01:27:09 +0100 Subject: test suite: sourceonlypolicy: New test Test the fix for #801435. Signed-off-by: Ian Jackson --- tests/tests/sourceonlypolicy | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 tests/tests/sourceonlypolicy (limited to 'tests/tests/sourceonlypolicy') 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 -- cgit v1.2.3