From 076ef5c84d05a564ed8031ced310336b3b331dfe Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Sun, 24 Apr 2011 21:56:36 -0700 Subject: [PATCH 1/1] Add a test for key fetching by SKS hash New test to check we can correctly retrieve a key by SKS hash using the onak CLI tool. --- t/all-050-get-hash.t | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 t/all-050-get-hash.t diff --git a/t/all-050-get-hash.t b/t/all-050-get-hash.t new file mode 100755 index 0000000..4913134 --- /dev/null +++ b/t/all-050-get-hash.t @@ -0,0 +1,20 @@ +#!/bin/sh +# Check we can index a key by SKS hash + +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 hget 81929DAE08B8F80888DA524923B93067 2> /dev/null | \ + grep -q -- '-----BEGIN PGP PUBLIC KEY BLOCK-----'; then + echo "* Did not correctly retrieve key by text" + exit 1 +fi + +exit 0 -- 2.39.5