From: Aram Sargsyan Date: Mon, 24 Jul 2023 11:26:05 +0000 (+0000) Subject: Test catz member zone fail-safe recreation X-Git-Tag: v9.19.16~26^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b2e84371d3743463536dc04d864b8746eab12595;p=thirdparty%2Fbind9.git Test catz member zone fail-safe recreation 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. --- diff --git a/bin/tests/system/catz/tests.sh b/bin/tests/system/catz/tests.sh index c67e0de956c..8964c3ac31f 100644 --- a/bin/tests/system/catz/tests.sh +++ b/bin/tests/system/catz/tests.sh @@ -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))