X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/f99a02461efe5183a00d5e73da197b85f93cf57a..57f7fb6511fcc7c55ee7a88475d15385093c048e:/test/integration/test-apt-key-net-update diff --git a/test/integration/test-apt-key-net-update b/test/integration/test-apt-key-net-update index 4b38cd9b5..990fb5ad2 100755 --- a/test/integration/test-apt-key-net-update +++ b/test/integration/test-apt-key-net-update @@ -1,8 +1,8 @@ #!/bin/sh set -e -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" setupenvironment configarchitecture "i386" @@ -16,28 +16,33 @@ mkdir -p usr/share/keyrings install -m0644 keys/test-master-keyring.pub usr/share/keyrings echo "APT::Key::MasterKeyring \"${TMPWORKINGDIRECTORY}/usr/share/keyrings/test-master-keyring.pub\";" >> ./aptconfig.conf -# setup archive-keyring +# setup archive-keyring mkdir -p aptarchive/ubuntu/project install -m0644 keys/test-archive-keyring.pub aptarchive/ubuntu/project/ -echo 'APT::Key::ArchiveKeyringURI "http://localhost:8080/ubuntu/project/test-archive-keyring.pub";' >> ./aptconfig.conf +echo "APT::Key::ArchiveKeyringURI \"http://localhost:${APTHTTPPORT}/ubuntu/project/test-archive-keyring.pub\";" >> ./aptconfig.conf echo 'APT::Key::Net-Update-Enabled "1";' >> ./aptconfig.conf # test against the "real" webserver -testequal 'Checking for new archive signing keys now +testsuccess aptkey --fakeroot net-update +testequalor2 'Checking for new archive signing keys now gpg: key F68C85A3: public key "Test Automatic Archive Signing Key " imported gpg: Total number processed: 1 -gpg: imported: 1 (RSA: 1)' aptkey --fakeroot net-update +gpg: imported: 1 (RSA: 1)' 'Checking for new archive signing keys now +gpg: key F68C85A3: public key "Test Automatic Archive Signing Key " imported +gpg: Total number processed: 1 +gpg: imported: 1' cat rootdir/tmp/testsuccess.output +testaptkeys 'oldarchive' 'newarchive' # now try a different one -# setup archive-keyring +# setup archive-keyring mkdir -p aptarchive/ubuntu/project install -m0644 keys/marvinparanoid.pub aptarchive/ubuntu/project/ -echo 'APT::Key::ArchiveKeyringURI "http://localhost:8080/ubuntu/project/marvinparanoid.pub";' >> ./aptconfig.conf +echo "APT::Key::ArchiveKeyringURI \"http://localhost:${APTHTTPPORT}/ubuntu/project/marvinparanoid.pub\";" >> ./aptconfig.conf echo 'APT::Key::Net-Update-Enabled "1";' >> ./aptconfig.conf # test against the "real" webserver -testequal "Checking for new archive signing keys now -Key 'E8525D47528144E2' not added. It is not signed with a master key" aptkey --fakeroot net-update - +testsuccessequal "Checking for new archive signing keys now +Key 'DE66AECA9151AFA1877EC31DE8525D47528144E2' not added. It is not signed with a master key" aptkey --fakeroot net-update +testaptkeys 'oldarchive' 'newarchive'