]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Test catz member zone fail-safe recreation
authorAram Sargsyan <aram@isc.org>
Mon, 24 Jul 2023 11:26:05 +0000 (11:26 +0000)
committerOndřej Surý <ondrej@isc.org>
Mon, 24 Jul 2023 17:49:14 +0000 (19:49 +0200)
The catz module has a fail-safe code to recreate a member zone
that was expected to exist but was not found.

Improve a test case where the fail-safe code is expected to execute
to check that the log message exists.

Add a test case where the fail-safe code is not expected to execute
to check that the log message does not exist.

bin/tests/system/catz/tests.sh

index c67e0de956c304f7e42a1dcdf7fd2683005f3382..8964c3ac31f33f16b09dd88ec8f2c526d4c6c928 100644 (file)
@@ -2017,7 +2017,9 @@ status=$((status+ret))
 n=$((n+1))
 echo_i "waiting for secondary to sync up ($n)"
 ret=0
+wait_for_message ns2/named.run  "catz: zone 'dom16.example' was expected to exist but can not be found, will be restored" || ret=1
 wait_for_message ns2/named.run  "catz: update_from_db: new zone merged" || ret=1
+wait_for_message ns2/named.run  "catz: catalog1.example: reload done: success" || ret=1
 if [ $ret -ne 0 ]; then echo_i "failed"; fi
 status=$((status+ret))
 
@@ -2029,6 +2031,13 @@ grep "192.0.2.1" dig.out.test$n > /dev/null || ret=1
 if [ $ret -ne 0 ]; then echo_i "failed"; fi
 status=$((status+ret))
 
+n=$((n+1))
+echo_i "checking that dom8.example. was not accidentally deleted during the configuration ($n)"
+ret=0
+_wait_for_message ns2/named.run "catz: zone 'dom8.example' was expected to exist but can not be found, will be restored" && ret=1
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status+ret))
+
 nextpart ns2/named.run >/dev/null
 
 n=$((n+1))