mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 07:40:00 -04:00
Check serve-stale behavior with a cold cache
Ensure that serve-stale works as expected when returning stale answers is enabled, the authoritative server does not respond, and there is no cached answer available.
This commit is contained in:
parent
893ab37ce7
commit
27cfe83a38
1 changed files with 11 additions and 0 deletions
|
|
@ -383,6 +383,17 @@ grep "syntax error" rndc.out.test$n > /dev/null || ret=1
|
|||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "flush cache, re-enable serve-stale and query again ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.1 flushtree example > rndc.out.test$n.1 2>&1 || ret=1
|
||||
$RNDCCMD 10.53.0.1 serve-stale on > rndc.out.test$n.2 2>&1 || ret=1
|
||||
$DIG -p ${PORT} @10.53.0.1 data.example TXT > dig.out.test$n
|
||||
grep "status: SERVFAIL" dig.out.test$n > /dev/null || ret=1
|
||||
grep "ANSWER: 0," dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "enable responses from authoritative server ($n)"
|
||||
ret=0
|
||||
|
|
|
|||
Loading…
Reference in a new issue