mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Add a statistics channel check in the forward system test
Check that the fix in the previous commit works and that the
'ServerQuota' counter in the statistics channel is still unset
after a SERVFAIL result in a 'forward only' zone.
(cherry picked from commit 81b3c5d908)
This commit is contained in:
parent
ef344cbd5e
commit
8f617d7971
3 changed files with 12 additions and 0 deletions
|
|
@ -14,6 +14,7 @@
|
|||
#
|
||||
# Clean up after forward tests.
|
||||
#
|
||||
rm -f ./statschannel.out.*
|
||||
rm -f ./dig.out.*
|
||||
rm -f ./*/named.conf
|
||||
rm -f ./*/named.memstats
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ options {
|
|||
minimal-responses yes;
|
||||
};
|
||||
|
||||
statistics-channels { inet 10.53.0.4 port @EXTRAPORT1@ allow { localhost; }; };
|
||||
|
||||
zone "." {
|
||||
type hint;
|
||||
file "root.db";
|
||||
|
|
|
|||
|
|
@ -107,6 +107,15 @@ grep "SERVFAIL" dig.out.$n.f2 >/dev/null || ret=1
|
|||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
# GL#1793
|
||||
n=$((n + 1))
|
||||
echo_i "checking that the 'serverquota' counter isn't increased because of the SERVFAIL in the previous check ($n)"
|
||||
ret=0
|
||||
"${CURL}" "http://10.53.0.4:${EXTRAPORT1}/json/v1" 2>/dev/null >statschannel.out.$n
|
||||
grep -F "ServerQuota" statschannel.out.$n >/dev/null && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
n=$((n + 1))
|
||||
echo_i "checking for negative caching of forwarder response ($n)"
|
||||
# prime the cache, shutdown the forwarder then check that we can
|
||||
|
|
|
|||
Loading…
Reference in a new issue