]> the.earth.li Git - onak.git/blobdiff - t/all-036-update-only.t
Add option to only accept updates for existing keys
[onak.git] / t / all-036-update-only.t
diff --git a/t/all-036-update-only.t b/t/all-036-update-only.t
new file mode 100755 (executable)
index 0000000..e0b3027
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+# Check we can't submit a new key when update_only is set
+
+set -e
+
+cd ${WORKDIR}
+cp $1 update-only.ini
+echo update_only=true >> update-only.ini
+${BUILDDIR}/onak -b -c update-only.ini add < ${TESTSDIR}/../keys/noodles.key || true
+rm update-only.ini
+if ! ${BUILDDIR}/onak -c $1 get 0x94FA372B2DA8B985 2>&1 | \
+       grep -q 'Key not found'; then
+       echo "* Did not correctly error on update-only key"
+       exit 1
+fi
+
+exit 0