diff --git a/bin/tests/system/forward/clean.sh b/bin/tests/system/forward/clean.sh index 6d76bb013c..8473402a13 100644 --- a/bin/tests/system/forward/clean.sh +++ b/bin/tests/system/forward/clean.sh @@ -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 diff --git a/bin/tests/system/forward/ns4/named.conf.in b/bin/tests/system/forward/ns4/named.conf.in index c97823dee0..800b9831a7 100644 --- a/bin/tests/system/forward/ns4/named.conf.in +++ b/bin/tests/system/forward/ns4/named.conf.in @@ -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"; diff --git a/bin/tests/system/forward/tests.sh b/bin/tests/system/forward/tests.sh index b9426997cc..4304dab277 100644 --- a/bin/tests/system/forward/tests.sh +++ b/bin/tests/system/forward/tests.sh @@ -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