]> the.earth.li Git - onak.git/blob - t/all-036-update-only.t
Add option to only accept updates for existing keys
[onak.git] / t / all-036-update-only.t
1 #!/bin/sh
2 # Check we can't submit a new key when update_only is set
3
4 set -e
5
6 cd ${WORKDIR}
7 cp $1 update-only.ini
8 echo update_only=true >> update-only.ini
9 ${BUILDDIR}/onak -b -c update-only.ini add < ${TESTSDIR}/../keys/noodles.key || true
10 rm update-only.ini
11 if ! ${BUILDDIR}/onak -c $1 get 0x94FA372B2DA8B985 2>&1 | \
12         grep -q 'Key not found'; then
13         echo "* Did not correctly error on update-only key"
14         exit 1
15 fi
16
17 exit 0