summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-08-17 08:10:29 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-08-17 14:12:24 +0200
commite289907f5e7241034cb0d37055dc2cba4e3a19af (patch)
tree8fef91c97dda2b848d73e5e3a15fe3e9449c48fd /test
parent19fdf93d7363261227811a62157063081b9f1a5d (diff)
allow spaces in fingerprints for 'apt-key del'
Fingerprints tend to be displayed in space-separated octet pairs so be nice and allow delete to remove a key based on such a string rather than requiring that the user is deleting all the spaces manually.
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-apt-key8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/integration/test-apt-key b/test/integration/test-apt-key
index eb5f998cf..759ce1487 100755
--- a/test/integration/test-apt-key
+++ b/test/integration/test-apt-key
@@ -116,6 +116,14 @@ gpg: unchanged: 1' aptkey --fakeroot update
testfailure test -e "${ROOTDIR}/etc/apt/trusted.gpg.d/joesixpack.gpg"
testsuccess cmp "${KEYDIR}/joesixpack.pub" "${ROOTDIR}/etc/apt/trusted.gpg.d/joesixpack.gpg~"
+ msgtest 'Test key removal with' 'spaced fingerprint'
+ cleanplate
+ cp -a "${KEYDIR}/joesixpack.pub" "${ROOTDIR}/etc/apt/trusted.gpg.d/joesixpack.gpg"
+ testsuccess --nomsg aptkey --fakeroot del '34A8 E9D1 8DB3 20F3 67E8 EAA0 5A90 D141 DBAC 8DAE'
+ testempty aptkey list
+ testfailure test -e "${ROOTDIR}/etc/apt/trusted.gpg.d/joesixpack.gpg"
+ testsuccess cmp "${KEYDIR}/joesixpack.pub" "${ROOTDIR}/etc/apt/trusted.gpg.d/joesixpack.gpg~"
+
msgtest 'Test key removal with' 'single key in softlink'
cleanplate
ln -s "$(readlink -f "${KEYDIR}/joesixpack.pub")" "${ROOTDIR}/etc/apt/trusted.gpg.d/joesixpack.gpg"