summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-key
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-03-06 10:16:59 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-03-06 10:16:59 +0100
commit031a3f254a2a73b2843ead28a2481b63ec1d7244 (patch)
treee33504bce7356362b37d033dfb22626040a60ef4 /test/integration/test-apt-key
parentc97ae2a00f41febb9558b5e6ef08019b93dcefac (diff)
add test for apt-key 0xKEY and use parameter expansion
Fixed in f7bd44bae0d7cb7f9838490b5eece075da83899e already, but the commit misses the Closes tag and while we are at it we can add a simple regression test and micro-optimize it a bit. Thanks: James McCoy for the suggestion. Closes: 816691
Diffstat (limited to 'test/integration/test-apt-key')
-rwxr-xr-xtest/integration/test-apt-key11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/integration/test-apt-key b/test/integration/test-apt-key
index 907824db1..82b64963c 100755
--- a/test/integration/test-apt-key
+++ b/test/integration/test-apt-key
@@ -85,6 +85,17 @@ gpg: unchanged: 1' aptkey --fakeroot update
testfailure test -e rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg
testsuccess cmp keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg~
+ msgtest 'Test key removal with' 'different key specs'
+ cleanplate
+ cp -a keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg
+ cp -a keys/marvinparanoid.pub rootdir/etc/apt/trusted.gpg.d/marvinparanoid.gpg
+ testsuccess --nomsg aptkey --fakeroot del 0xDBAC8DAE 528144E2
+ testempty aptkey list
+ testfailure test -e rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg
+ testsuccess cmp keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg~
+ testfailure test -e rootdir/etc/apt/trusted.gpg.d/marvinparanoid.gpg
+ testsuccess cmp keys/marvinparanoid.pub rootdir/etc/apt/trusted.gpg.d/marvinparanoid.gpg~
+
msgtest 'Test key removal with' 'long key ID'
cleanplate
cp -a keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg