diff options
author | Michael Vogt <mvo@debian.org> | 2014-05-30 14:47:56 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-06-02 08:53:09 +0200 |
commit | a3f1d60cb75ab83f63a52a43c056a4752c8fdeb2 (patch) | |
tree | 00acd57805d51fe2422fe6b0d5bc4fcbaca6247e /test | |
parent | 7adaab0430308a17f1db279f0ebbed8068dd4308 (diff) |
Show unauthenticated warning for source packages as well
This will show the same unauthenticated warning for source packages
as for binary packages and will not download a source package if
it is unauthenticated. This can be overridden with
--allow-unauthenticated
Closes: #749795
Diffstat (limited to 'test')
-rwxr-xr-x | test/integration/test-apt-get-source-authenticated | 31 |
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 100755 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 |