Add inline-signing with $INCLUDE test

Add a test case for inline-signing for a zone with an $INCLUDE
statement. There is already a test for a missing include file, this
one adds a test for a zone with an include file that does exist.

Test if the record in the included file is loaded.
This commit is contained in:
Matthijs Mekking
2021-03-19 15:21:17 +01:00
parent bb01030252
commit 6463ee0f40
3 changed files with 49 additions and 0 deletions

View File

@@ -961,6 +961,30 @@ $DIFF dig.out.ns3.test$n.1 dig.out.ns3.test$n.2 > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "check inline-signing with an include file ($n)"
ret=0
$DIG $DIGOPTS +short @10.53.0.3 master SOA > dig.out.ns3.test$n.1 || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
sleep 1
nextpart ns3/named.run > /dev/null
cp ns3/master7.db.in ns3/master.db
rndc_reload ns3 10.53.0.3
_includefile_loaded() {
$DIG $DIGOPTS @10.53.0.3 f.master A > dig.out.ns3.test$n
grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || return 1
grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || return 1
grep "10\.0\.0\.7" dig.out.ns3.test$n > /dev/null || return 1
return 0
}
retry_quiet 10 _includefile_loaded
# Sanity check: the SOA record should be changed
$DIG $DIGOPTS +short @10.53.0.3 master SOA > dig.out.ns3.test$n.2 || ret=1
$DIFF dig.out.ns3.test$n.1 dig.out.ns3.test$n.2 > /dev/null && ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "test add/del zone combinations ($n)"
ret=0