summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-key
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2017-03-19 14:27:49 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2017-06-26 23:31:15 +0200
commita8b19aeeb885596912fd8b03e082866b897688fd (patch)
tree6786b291f3b45159cd1e878fbeb3c665f7cd471d /test/integration/test-apt-key
parent5f930f65438b30a87e0c8a47150dd0dbf414750e (diff)
Call update from apt-key test for a strange path test
We setup a "horrible" environment in the apt-key testcase to check all kinds of things, but we really should be making also at least a simple apt update call, as that in turn will call apt-key which is how apt-key is used in the non-testcase world, so that calling should be able to deal with such environments as well. Gbp-Dch: Ignore
Diffstat (limited to 'test/integration/test-apt-key')
-rwxr-xr-xtest/integration/test-apt-key13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/integration/test-apt-key b/test/integration/test-apt-key
index 4fd1510a2..13afff995 100755
--- a/test/integration/test-apt-key
+++ b/test/integration/test-apt-key
@@ -12,8 +12,13 @@ TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
+chmod o+x "${TMPWORKINGDIRECTORY}/.."
configarchitecture 'amd64'
+insertpackage 'unstable' 'bar' 'i386' '1'
+insertsource 'unstable' 'foo' 'all' '1'
+setupaptarchive --no-update
+
# start from a clean plate again
cleanplate() {
rm -rf "${ROOTDIR}/etc/apt/trusted.gpg.d/" "${ROOTDIR}/etc/apt/trusted.gpg"
@@ -249,6 +254,10 @@ gpg: unchanged: 1' aptkey --fakeroot update
chmod 000 "${ROOTDIR}/etc/apt/trusted.gpg.d/unreadablekey.${EXT}"
testwarning --nomsg aptkey --quiet --readonly verify "${SIGNATURE}.gpg" "${SIGNATURE}"
testwarning aptkey list
+ # check that apt users see warnings, too
+ rm -rf "${ROOTDIR}/var/lib/apt/lists"
+ testwarning apt update
+
chmod 644 "${ROOTDIR}/etc/apt/trusted.gpg.d/unreadablekey.${EXT}"
rm -f "${ROOTDIR}/etc/apt/trusted.gpg.d/unreadablekey.${EXT}"
fi
@@ -275,6 +284,10 @@ gpg: unchanged: 1' aptkey --fakeroot update
msgtest 'Test verify fails on' 'bad file'
testfailure --nomsg aptkey --quiet --readonly verify "${SIGNATURE}.gpg" "${SIGNATURE}2"
+
+ # try to perform an entire update with this gpgv
+ rm -rf "${ROOTDIR}/var/lib/apt/lists"
+ testsuccess apt update -o Test::Dir="${ROOTDIR}"
done
rm -f "${ROOTDIR}/etc/apt/apt.conf.d/00gpgvcmd"