X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=t%2Fall-080-get-subkey.t;fp=t%2Fall-080-get-subkey.t;h=ecccdf44e56175220288e26363f6543883d324c7;hb=438bd2cc9821da85d9f396b01bb14c8b770679c0;hp=0000000000000000000000000000000000000000;hpb=5cb3cfdb9d8caa6d7a4a1979c50c46896957b934;p=onak.git diff --git a/t/all-080-get-subkey.t b/t/all-080-get-subkey.t new file mode 100755 index 0000000..ecccdf4 --- /dev/null +++ b/t/all-080-get-subkey.t @@ -0,0 +1,25 @@ +#!/bin/sh +# Check we can retrieve a key by keyid + +set -e + +# Backends should really support this, but the file one is as simple as +# possible, so doesn't. Skip the test for it. +if [ "$1" = "file" ]; then + exit 0 +fi + +cd t +../onak -b -c test.conf add < ../keys/noodles.key +if ! ../onak -c test.conf get 0x045281F1B9A66E35 2> /dev/null | \ + grep -q -- '-----BEGIN PGP PUBLIC KEY BLOCK-----'; then + echo "* Did not correctly retrieve key by subkey id." + exit 1 +fi +if ! ../onak -c test.conf get 0xFF162FC5CF3FBAD1 2> /dev/null | \ + grep -q -- '-----BEGIN PGP PUBLIC KEY BLOCK-----'; then + echo "* Did not correctly retrieve key by subkey id." + exit 1 +fi + +exit 0