diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-07-15 09:42:37 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-07-15 09:42:37 +0200 |
commit | 35555c1826da5df9f2c06a74f2e91be843ad8142 (patch) | |
tree | 9127cb9461a2de987748600c08682f7051ba12b7 /test/integration | |
parent | cec8c646c79e40d928464b08a6f2e3ea62bb1611 (diff) | |
parent | 4b42f43bed369817398b6c8d538f08e5bf6dff76 (diff) |
merged from donkult
Diffstat (limited to 'test/integration')
-rwxr-xr-x | test/integration/test-bug-596498-trusted-unsigned-repo | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/integration/test-bug-596498-trusted-unsigned-repo b/test/integration/test-bug-596498-trusted-unsigned-repo new file mode 100755 index 000000000..6ebc4a3bb --- /dev/null +++ b/test/integration/test-bug-596498-trusted-unsigned-repo @@ -0,0 +1,47 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +buildsimplenativepackage 'cool' 'i386' '1.0' 'unstable' + +setupaptarchive + +aptgetupdate() { + rm -rf rootdir/var/lib/apt/ rootdir/var/cache/apt/*.bin + aptget update -qq +} + +PKGTEXT="$(aptget install cool --assume-no -d | head -n 7)" +DEBFILE='rootdir/etc/apt/sources.list.d/apt-test-unstable-deb.list' + +testequal "$PKGTEXT +Download complete and in download only mode" aptget install cool --assume-no -d + +sed -i -e 's#deb#deb [trusted=no]#' $DEBFILE +aptgetupdate + +testequal "$PKGTEXT +WARNING: The following packages cannot be authenticated! + cool +Install these packages without verification [y/N]? N +E: Some packages could not be authenticated" aptget install cool --assume-no -d + +find aptarchive/ \( -name 'Release.gpg' -o -name 'InRelease' \) -delete +sed -i -e 's#deb \[trusted=no\]#deb#' $DEBFILE +aptgetupdate + +testequal "$PKGTEXT +WARNING: The following packages cannot be authenticated! + cool +Install these packages without verification [y/N]? N +E: Some packages could not be authenticated" aptget install cool --assume-no -d + +sed -i -e 's#deb#deb [trusted=yes]#' $DEBFILE +aptgetupdate + +testequal "$PKGTEXT +Download complete and in download only mode" aptget install cool --assume-no -d |