]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-key
make the keyring locations in apt-key configurable
[apt.git] / test / integration / test-apt-key
CommitLineData
80f3aeb0
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6
7setupenvironment
8configarchitecture 'amd64'
9
10msgtest 'Check that paths in list output are not' 'double-slashed'
11aptkey list 2>&1 | grep -q '//' && msgfail || msgpass
12
13msgtest 'Check that paths in finger output are not' 'double-slashed'
14aptkey finger 2>&1 | grep -q '//' && msgfail || msgpass
15
16echo 'APT::Key::ArchiveKeyring "./keys/joesixpack.pub";
17APT::Key::RemovedKeys "./keys/rexexpired.pub";' > rootdir/etc/apt/apt.conf.d/aptkey.conf
18
19aptkey list | grep '^pub' > aptkey.list
20testfileequal ./aptkey.list 'pub 2048R/DBAC8DAE 2010-08-18'
21
22testequal 'gpg: key DBAC8DAE: "Joe Sixpack (APT Testcases Dummy) <joe@example.org>" not changed
23gpg: Total number processed: 1
24gpg: unchanged: 1' aptkey --fakeroot update
25
26aptkey list | grep '^pub' > aptkey.list
27testfileequal ./aptkey.list 'pub 2048R/DBAC8DAE 2010-08-18'
28
29testsuccess aptkey --fakeroot add ./keys/rexexpired.pub
30
31aptkey list | grep '^pub' > aptkey.list
32testfileequal ./aptkey.list 'pub 2048R/27CE74F9 2013-07-12 [expired: 2013-07-13]
33pub 2048R/DBAC8DAE 2010-08-18'
34
35msgtest 'Execute update again to trigger removal of' 'Rex Expired key'
36testsuccess --nomsg aptkey --fakeroot update
37
38aptkey list | grep '^pub' > aptkey.list
39testfileequal ./aptkey.list 'pub 2048R/DBAC8DAE 2010-08-18'