From: Jonathan McDowell Date: Wed, 21 Aug 2019 19:07:09 +0000 (+0100) Subject: Add test for blacklisting functionality X-Git-Tag: onak-0.6.0~22 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=b9ea568af87d8b9c4d9afb0819ac20f8e2c3f885;p=onak.git Add test for blacklisting functionality --- diff --git a/t/all-035-blacklist-test.t b/t/all-035-blacklist-test.t new file mode 100755 index 0000000..8a6fb4d --- /dev/null +++ b/t/all-035-blacklist-test.t @@ -0,0 +1,16 @@ +#!/bin/sh +# Check trying to submit a blacklisted key fails + +set -e + +cd ${WORKDIR} +echo 0E3A94C3E83002DAB88CCA1694FA372B2DA8B985 > ${WORKDIR}/blacklist +${BUILDDIR}/onak -b -c $1 add < ${TESTSDIR}/../keys/noodles.key || true +echo '#' > ${WORKDIR}/blacklist +if ! ${BUILDDIR}/onak -c $1 get 0x94FA372B2DA8B985 2>&1 | \ + grep -q 'Key not found'; then + echo "* Did not correctly error on non-existent key" + exit 1 +fi + +exit 0