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.
This commit is contained in:
Aram Sargsyan
2023-07-24 11:26:05 +00:00
committed by Ondřej Surý
parent 48714a9c1d
commit b2e84371d3

View 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))