]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check 'rndc retransfer' of primary error message
authorMark Andrews <marka@isc.org>
Wed, 9 Dec 2020 06:01:26 +0000 (17:01 +1100)
committerMark Andrews <marka@isc.org>
Wed, 27 Jan 2021 21:43:03 +0000 (08:43 +1100)
bin/tests/system/rndc/tests.sh

index a4a120e9e4fe5e8d8850134a5b19fc386080b0b7..e71e07029c8f8ab6895aa39ef222426c710b1023 100644 (file)
@@ -677,5 +677,16 @@ lines=`cat rndc.out.test$n | wc -l`
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
+n=`expr $n + 1`
+echo_i "check 'rndc retransfer' of primary error message ($n)"
+ret=0
+$RNDCCMD 10.53.0.2 retransfer nil > rndc.out.test$n 2>&1 && ret=1
+grep "rndc: 'retransfer' failed: failure" rndc.out.test$n > /dev/null || ret=1
+grep "retransfer: inappropriate zone type: primary" rndc.out.test$n > /dev/null || ret=1
+lines=`cat rndc.out.test$n | wc -l`
+[ ${lines:-0} -eq 2 ] || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
+
 echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1