From eb77a89dfd655e12762172bf2acaa48af15d0d0f Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 29 Aug 2024 10:09:34 +1000 Subject: [PATCH] Check that 'provide-zoneversion no;' works --- bin/tests/system/digdelv/ns2/named.conf.in | 1 + bin/tests/system/digdelv/tests.sh | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/bin/tests/system/digdelv/ns2/named.conf.in b/bin/tests/system/digdelv/ns2/named.conf.in index c9fdcd79ab..47b0449ffb 100644 --- a/bin/tests/system/digdelv/ns2/named.conf.in +++ b/bin/tests/system/digdelv/ns2/named.conf.in @@ -36,4 +36,5 @@ zone "example" { zone "example.tld" { type primary; file "example.tld.db"; + provide-zoneversion no; }; diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh index 6122fa1132..60f5e1f022 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -810,6 +810,15 @@ if [ -x "$DIG" ]; then if [ $ret -ne 0 ]; then echo_i "failed"; fi status=$((status + ret)) + n=$((n + 1)) + echo_i "checking dig +zoneversion to a authoritative server with zoneversion disabled ($n)" + ret=0 + dig_with_opts @10.53.0.2 +zoneversion a.example.tld >dig.out.test$n 2>&1 || ret=1 + grep "status: NOERROR" dig.out.test$n >/dev/null || ret=1 + grep "; ZONEVERSION:" dig.out.test$n >/dev/null && ret=1 + if [ $ret -ne 0 ]; then echo_i "failed"; fi + status=$((status + ret)) + if [ $HAS_PYYAML -ne 0 ]; then n=$((n + 1)) echo_i "checking dig +yaml +zoneversion to a authoritative server ($n)"