X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=t%2Fall-090-get-subkey-short.t;fp=t%2Fall-090-get-subkey-short.t;h=891a566da73b025e6e9d577f7fe225a466e29035;hb=438bd2cc9821da85d9f396b01bb14c8b770679c0;hp=0000000000000000000000000000000000000000;hpb=5cb3cfdb9d8caa6d7a4a1979c50c46896957b934;p=onak.git diff --git a/t/all-090-get-subkey-short.t b/t/all-090-get-subkey-short.t new file mode 100755 index 0000000..891a566 --- /dev/null +++ b/t/all-090-get-subkey-short.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 0xB9A66E35 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 0xCF3FBAD1 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