Use rndc_reload in tests, make sure that reload is complete before continuing

This commit is contained in:
Witold Kręcicki
2018-12-11 12:59:11 +01:00
parent 517449e0e6
commit 6d50138405
32 changed files with 102 additions and 101 deletions

View File

@@ -543,12 +543,12 @@ EOF
addr 127.0.0.17 "a4-4.tld2 -b $ns1" # 17 client-IP address trigger
nxdomain a7-1.tld2 # 18 slave policy zone (RT34450)
cp ns2/blv2.tld2.db.in ns2/bl.tld2.db
$RNDCCMD $ns2 reload bl.tld2 | sed 's/^/ns2 /' | cat_i
rndc_reload ns2 $ns2 bl.tld2
ck_soa 2 bl.tld2 $ns3
nochange a7-1.tld2 # 19 PASSTHRU
sleep 1 # ensure that a clock tick has occured so that named will do the reload
cp ns2/blv3.tld2.db.in ns2/bl.tld2.db
$RNDCCMD $ns2 reload bl.tld2 | sed 's/^/ns2 /' | cat_i
rndc_reload ns2 $ns2 bl.tld2
ck_soa 3 bl.tld2 $ns3
nxdomain a7-1.tld2 # 20 slave policy zone (RT34450)
end_group
@@ -780,7 +780,7 @@ EOF
echo_i "checking that going from an empty policy zone works (${t})"
nsd $ns5 add '*.x.servfail.policy2.' x.servfail.policy2.
sleep 1
$RNDCCMD $ns7 reload policy2 | sed 's/^/ns7 /' | cat_i
rndc_reload ns7 $ns7 policy2
$DIG z.x.servfail -p ${PORT} @$ns7 > dig.out.${t}
grep NXDOMAIN dig.out.${t} > /dev/null || setret "failed"