From: Pieter Lexis Date: Fri, 30 Sep 2016 11:21:01 +0000 (+0200) Subject: Add tests for #4483 X-Git-Tag: dnsdist-1.1.0-beta2~78^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F4489%2Fhead;p=thirdparty%2Fpdns.git Add tests for #4483 --- diff --git a/regression-tests.recursor/cache-recursorcache-forward/command b/regression-tests.recursor/cache-recursorcache-forward/command new file mode 100755 index 0000000000..62b635eff1 --- /dev/null +++ b/regression-tests.recursor/cache-recursorcache-forward/command @@ -0,0 +1,4 @@ +#!/bin/bash +$SDIG $nameserver 5302 www.arthur.example.net a recurse +sleep 3 +$SDIG $nameserver 5302 www.arthur.example.net a recurse diff --git a/regression-tests.recursor/cache-recursorcache-forward/description b/regression-tests.recursor/cache-recursorcache-forward/description new file mode 100644 index 0000000000..9f1ebe49e8 --- /dev/null +++ b/regression-tests.recursor/cache-recursorcache-forward/description @@ -0,0 +1,2 @@ +#4483 -- Check if we properly cache answers that lie below a forwarded zone, where +we've gotten a referral from said forwarded zone to a lower zone. diff --git a/regression-tests.recursor/cache-recursorcache-forward/expected_result b/regression-tests.recursor/cache-recursorcache-forward/expected_result new file mode 100644 index 0000000000..702663ffd5 --- /dev/null +++ b/regression-tests.recursor/cache-recursorcache-forward/expected_result @@ -0,0 +1,6 @@ +Reply to question for qname='www.arthur.example.net.', qtype=A +Rcode: 0 (No Error), RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0 +0 www.arthur.example.net. IN A 15 192.0.2.2 +Reply to question for qname='www.arthur.example.net.', qtype=A +Rcode: 0 (No Error), RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0 +0 www.arthur.example.net. IN A 12 192.0.2.2 diff --git a/regression-tests.recursor/config.sh b/regression-tests.recursor/config.sh index c8cd305a2d..6cacd01492 100755 --- a/regression-tests.recursor/config.sh +++ b/regression-tests.recursor/config.sh @@ -45,7 +45,7 @@ fi cd configs -for dir in recursor-service recursor-service2 recursor-service3; do +for dir in recursor-service recursor-service2 recursor-service3 recursor-service4; do mkdir -p /tmp/$dir mkdir -p $dir cd $dir @@ -609,3 +609,11 @@ function preresolve(dq) return false end EOF + +cat > recursor-service4/recursor.conf <