summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-get-source-authenticated
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-09-17 14:10:27 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-09-17 14:10:27 +0200
commit7567b2abe424451e01d6e55c3fd14d37a4c150bf (patch)
tree140849a75c0e63b7c4b051fdd9401404b56e667b /test/integration/test-apt-get-source-authenticated
parent4a76005710ac71bf286828d22104904cfa0a4db7 (diff)
merge 0.9.7.9+deb7u2 upload
Diffstat (limited to 'test/integration/test-apt-get-source-authenticated')
-rw-r--r--test/integration/test-apt-get-source-authenticated31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/integration/test-apt-get-source-authenticated b/test/integration/test-apt-get-source-authenticated
new file mode 100644
index 000000000..2cee13923
--- /dev/null
+++ b/test/integration/test-apt-get-source-authenticated
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Regression test for debian bug #749795. Ensure that we fail with
+# a error if apt-get source foo will download a source that comes
+# from a unauthenticated repository
+#
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture "i386"
+
+# a "normal" package with source and binary
+buildsimplenativepackage 'foo' 'all' '2.0'
+
+setupaptarchive --no-update
+
+APTARCHIVE=$(readlink -f ./aptarchive)
+rm -f $APTARCHIVE/dists/unstable/*Release*
+
+# update without authenticated InRelease file
+testsuccess aptget update
+
+# this all should fail
+testfailure aptget install -y foo
+testfailure aptget source foo
+
+# allow overriding the warning
+testsuccess aptget source --allow-unauthenticated foo