- xfr-soa-tls, fix unit test for detecting changed zonefile and test

for SOA probe sent over TLS.
This commit is contained in:
W.C.A. Wijngaards 2023-10-19 17:14:56 +02:00
parent bdc787104c
commit 7366fa0c02

View File

@ -4,6 +4,7 @@
# use .tpkg.var.test for in test variable passing # use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test [ -f .tpkg.var.test ] && source .tpkg.var.test
. ../common.sh
PRE="../.." PRE="../.."
# do the test # do the test
echo "> dig www.example.com." echo "> dig www.example.com."
@ -39,8 +40,10 @@ fi
# update the zone # update the zone
mv example.com.zone example.com.zone.old mv example.com.zone example.com.zone.old
mv example.com.zone2 example.com.zone mv example.com.zone2 example.com.zone
touch example.com.zone
kill -1 $AUTH_PID kill -1 $AUTH_PID
wait_server_up nsd.log "serial 4 is updated to 8" #it would need to wait for the line to appear twice.
#wait_server_up nsd.log "zone example.com read with success"
echo "> auth server updated" echo "> auth server updated"
echo "> dig www.example.com." echo "> dig www.example.com."
@ -73,4 +76,12 @@ else
exit 1 exit 1
fi fi
if grep "auth zone example.com. soa probe sent to 127.0.0.1#unbound" unbound.log; then
echo "SOA sent over TLS"
else
echo "SOA not sent over TLS"
echo "Not OK"
exit 1
fi
exit 0 exit 0