]> the.earth.li Git - onak.git/blobdiff - t/all-020-get.t
Add basic testing infrastructure + initial tests
[onak.git] / t / all-020-get.t
diff --git a/t/all-020-get.t b/t/all-020-get.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