]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
test logging of key maintenance events
authorEvan Hunt <each@isc.org>
Mon, 21 Jan 2019 06:21:16 +0000 (22:21 -0800)
committerEvan Hunt <each@isc.org>
Thu, 31 Jan 2019 20:18:55 +0000 (12:18 -0800)
bin/tests/system/autosign/tests.sh

index cf14a00de40b4e6c7985327f2eed01107160e6c8..69798cb5d366a751fe6e960ed4cf9a0ffe265d6a 100755 (executable)
@@ -1467,5 +1467,20 @@ n=`expr $n + 1`
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
+echo_i "checking key maintenance events were logged correctly ($n)"
+ret=0
+pub=`grep "DNSKEY .* is now published" ns1/named.run | wc -l`
+[ "$pub" -eq 6 ] || ret=1
+act=`grep "DNSKEY .* is now active" ns1/named.run | wc -l`
+[ "$act" -eq 5 ] || ret=1
+rev=`grep "DNSKEY .* is now revoked" ns1/named.run | wc -l`
+[ "$rev" -eq 1 ] || ret=1
+inac=`grep "DNSKEY .* is now inactive" ns1/named.run | wc -l`
+[ "$inac" -eq 1 ] || ret=1
+del=`grep "DNSKEY .* is now deleted" ns1/named.run | wc -l`
+[ "$del" -eq 1 ] || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
+
 echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1