diff --git a/bin/tests/system/catz/tests.sh b/bin/tests/system/catz/tests.sh index e90b606d82..46956a8ed9 100644 --- a/bin/tests/system/catz/tests.sh +++ b/bin/tests/system/catz/tests.sh @@ -2973,6 +2973,58 @@ wait_for_soa @10.53.0.2 dom21.example. dig.out.test$n || ret=1 if [ $ret -ne 0 ]; then echo_i "failed"; fi status=$((status + ret)) +########################################################################## +# GL #5849 + +n=$((n + 1)) +echo_i "Adding a domain token%Xname.example. to primary via RNDC ($n)" +ret=0 +# enough initial content for IXFR response when TXT record is added below +echo "@ 3600 IN SOA . . 1 3600 3600 3600 3600" >ns1/tokenXname.example.db +echo "@ 3600 IN NS invalid." >>ns1/tokenXname.example.db +echo "foo 3600 IN TXT some content here" >>ns1/tokenXname.example.db +echo "bar 3600 IN TXT some content here" >>ns1/tokenXname.example.db +echo "xxx 3600 IN TXT some content here" >>ns1/tokenXname.example.db +echo "yyy 3600 IN TXT some content here" >>ns1/tokenXname.example.db +rndccmd 10.53.0.1 addzone token%Xname.example. in default '{ type primary; file "tokenXname.example.db"; allow-transfer { any; }; allow-update { any; }; notify explicit; also-notify { 10.53.0.4; }; };' || ret=1 +if [ $ret -ne 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + +n=$((n + 1)) +echo_i "checking that token%Xname.example. is now served by primary ($n)" +ret=0 +wait_for_soa @10.53.0.1 token%Xname.example. dig.out.test$n || ret=1 +if [ $ret -ne 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + +nextpart ns4/named.run >/dev/null + +n=$((n + 1)) +echo_i "Adding domain token%Xname.example. to catalog-misc zone ($n)" +ret=0 +$NSUPDATE -d <>nsupdate.out.test$n 2>&1 || ret=1 + server 10.53.0.1 ${PORT} + update add tokenXname.zones.catalog-misc.example. 3600 IN PTR token%Xname.example. + send +END +if [ $ret -ne 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + +n=$((n + 1)) +echo_i "waiting for secondary to sync up ($n)" +ret=0 +wait_for_message ns4/named.run "catz: adding zone 'token%Xname.example' from catalog 'catalog-misc.example'" \ + && wait_for_message ns4/named.run "transfer of 'token%Xname.example/IN' from 10.53.0.1#${PORT}: Transfer status: success" || ret=1 +if [ $ret -ne 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + +n=$((n + 1)) +echo_i "checking that token%Xname.example. is served by secondary ($n)" +ret=0 +wait_for_soa @10.53.0.4 token%Xname.example. dig.out.test$n || ret=1 +if [ $ret -ne 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + ########################################################################## echo_i "exit status: $status" [ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/catz/tests_sh_catz.py b/bin/tests/system/catz/tests_sh_catz.py index 4b68e2f65e..339a8ed8dc 100644 --- a/bin/tests/system/catz/tests_sh_catz.py +++ b/bin/tests/system/catz/tests_sh_catz.py @@ -23,6 +23,7 @@ pytestmark = pytest.mark.extra_artifacts( "ns*/*dom*.example.db", "ns1/check-allow-query.example.db", "ns1/longlong.longlong.long.long.name.example.db", + "ns1/tokenXname.example.db", "ns1/tls1.example.db", "ns2/__catz__*.db", "ns2/named.conf.tmp",