]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add a check for the 'first refresh' data in rndc status
authorAram Sargsyan <aram@isc.org>
Fri, 10 Nov 2023 11:33:40 +0000 (11:33 +0000)
committerAram Sargsyan <aram@isc.org>
Mon, 5 Feb 2024 17:41:14 +0000 (17:41 +0000)
Check that 'rndc status' correctly indicates the expected number
of the secondary zones which have the 'first refresh' flag set.

bin/tests/system/statschannel/tests.sh

index f8ba35cf367121dfa851313252ae6ffc95c5c2fa..29ff9079fae7cd88bb67141ff5ad896dabec9b6b 100644 (file)
@@ -689,6 +689,13 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 n=$((n + 1))
 
+echo_i "Checking that there are no 'first refresh' zones in ns3 ($n)"
+ret=0
+$RNDCCMD 10.53.0.3 status | grep -E '^xfers first refresh: 0$' >/dev/null || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+n=$((n + 1))
+
 echo_i "Transfering zones from ns1 to ns3 in slow mode ($n)"
 ret=0
 i=0
@@ -739,10 +746,17 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 n=$((n + 1))
 
+echo_i "Checking that there is one 'first refresh' zone in ns3 ($n)"
+ret=0
+$RNDCCMD 10.53.0.3 status | grep -E '^xfers first refresh: 1$' >/dev/null || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+n=$((n + 1))
+
 if [ $PERL_JSON ]; then
   echo_i "Checking zone transfer transports ($n)"
   ret=0
-  cp xfrins.json.j$((n - 1)) xfrins.json.j$n
+  cp xfrins.json.j$((n - 2)) xfrins.json.j$n
   $PERL xfrins-json.pl xfrins.json.j$n example >xfrins.example.format$n
   echo "soatransport: UDP" >xfrins.example.expect$n
   echo "transport: TCP" >>xfrins.example.expect$n