]> the.earth.li Git - onak.git/commitdiff
Use full key id in key id retrieval test + add separate short key id test
authorJonathan McDowell <noodles@earth.li>
Sat, 9 Nov 2013 19:17:21 +0000 (11:17 -0800)
committerJonathan McDowell <noodles@earth.li>
Sat, 9 Nov 2013 19:17:21 +0000 (11:17 -0800)
t/all-020-get.t
t/all-070-get-short.t [new file with mode: 0755]

index 8adaa3f43693f9bbe9a4d5797a5275f24ee54390..a96f8961cb5c8cb312f28757dc9a5a4ca24b8a02 100755 (executable)
@@ -5,7 +5,7 @@ set -e
 
 cd t
 ../onak -b -c test.conf add < ../keys/noodles.key
-if ! ../onak -c test.conf get 0x2DA8B985 2> /dev/null | \
+if ! ../onak -c test.conf get 0x94FA372B2DA8B985 2> /dev/null | \
        grep -q -- '-----BEGIN PGP PUBLIC KEY BLOCK-----'; then
        echo "* Did not correctly retrieve key by keyid."
        exit 1
diff --git a/t/all-070-get-short.t b/t/all-070-get-short.t
new file mode 100755 (executable)
index 0000000..8adaa3f
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Check we can retrieve a key by keyid
+
+set -e
+
+cd t
+../onak -b -c test.conf add < ../keys/noodles.key
+if ! ../onak -c test.conf get 0x2DA8B985 2> /dev/null | \
+       grep -q -- '-----BEGIN PGP PUBLIC KEY BLOCK-----'; then
+       echo "* Did not correctly retrieve key by keyid."
+       exit 1
+fi
+
+exit 0