mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
Add serve-stale test settings after flush
Add a test case to ensure that after 'rndc flush', the serve-stale settings are not reset.
This commit is contained in:
parent
cd837f4e40
commit
0f593fd70a
@ -2533,6 +2533,14 @@ rndc_reload ns3 10.53.0.3
|
|||||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
status=$((status+ret))
|
status=$((status+ret))
|
||||||
|
|
||||||
|
n=$((n+1))
|
||||||
|
echo_i "check 'rndc serve-stale status' ($n)"
|
||||||
|
ret=0
|
||||||
|
$RNDCCMD 10.53.0.3 serve-stale status > rndc.out.test$n 2>&1 || ret=1
|
||||||
|
grep '_default: stale cache enabled; stale answers enabled (stale-answer-ttl=3 max-stale-ttl=3600 stale-refresh-time=4)' rndc.out.test$n > /dev/null || ret=1
|
||||||
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
|
status=$((status+ret))
|
||||||
|
|
||||||
# Flush the cache to ensure the example/NS RRset cached during previous tests
|
# Flush the cache to ensure the example/NS RRset cached during previous tests
|
||||||
# does not override the authoritative delegation found in the root zone.
|
# does not override the authoritative delegation found in the root zone.
|
||||||
n=$((n+1))
|
n=$((n+1))
|
||||||
@ -2542,6 +2550,15 @@ $RNDCCMD 10.53.0.3 flush > rndc.out.test$n 2>&1 || ret=1
|
|||||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
status=$((status+ret))
|
status=$((status+ret))
|
||||||
|
|
||||||
|
# Test that after flush, serve-stale configuration is not reset.
|
||||||
|
n=$((n+1))
|
||||||
|
echo_i "check serve-stale configuration is not reset after flush ($n)"
|
||||||
|
ret=0
|
||||||
|
$RNDCCMD 10.53.0.3 serve-stale status > rndc.out.test$n 2>&1 || ret=1
|
||||||
|
grep '_default: stale cache enabled; stale answers enabled (stale-answer-ttl=3 max-stale-ttl=3600 stale-refresh-time=4)' rndc.out.test$n > /dev/null || ret=1
|
||||||
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
|
status=$((status+ret))
|
||||||
|
|
||||||
# Query name server with low fetch limits. The authoritative server (ans2) is
|
# Query name server with low fetch limits. The authoritative server (ans2) is
|
||||||
# not responding. Sending queries for multiple names in the 'example' zone
|
# not responding. Sending queries for multiple names in the 'example' zone
|
||||||
# in parallel causes the fetch limit for that zone (set to 1) to be
|
# in parallel causes the fetch limit for that zone (set to 1) to be
|
||||||
|
Loading…
x
Reference in New Issue
Block a user