From eb58f0246f0fe0ed4630dadf9ae696b48505e2f8 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Wed, 23 Mar 2016 16:09:36 +0100 Subject: [PATCH] Add lowercase-outgoing tests --- regression-tests.recursor/config.sh | 62 +++++++++++++++---- .../lowercase-outgoing/command | 4 ++ .../lowercase-outgoing/description | 1 + .../lowercase-outgoing/expected_result | 2 + regression-tests.recursor/start.sh | 4 +- regression-tests.recursor/stop.sh | 2 +- 6 files changed, 60 insertions(+), 15 deletions(-) create mode 100755 regression-tests.recursor/lowercase-outgoing/command create mode 100644 regression-tests.recursor/lowercase-outgoing/description create mode 100644 regression-tests.recursor/lowercase-outgoing/expected_result diff --git a/regression-tests.recursor/config.sh b/regression-tests.recursor/config.sh index a3ffc930a5..0d36fcffe1 100755 --- a/regression-tests.recursor/config.sh +++ b/regression-tests.recursor/config.sh @@ -30,34 +30,37 @@ $AUTHRUN EOF chmod +x run-auth -cd configs - -mkdir recursor-service -cd recursor-service if [ \! -x "$PDNSRECURSOR" ] then - echo "Could not find an executable pdns_recursor at \"$PDNSRECURSOR\", check PDNSRECURSOR" - echo "Continuing with configuration anyhow" + echo "Could not find an executable pdns_recursor at \"$PDNSRECURSOR\", check PDNSRECURSOR" + echo "Continuing with configuration anyhow" fi if [ \! -x "$PDNS" ] then - echo "Could not find an executable pdns_server at \"$PDNS\", check PDNS" - echo "Continuing with configuration anyhow" + echo "Could not find an executable pdns_server at \"$PDNS\", check PDNS" + echo "Continuing with configuration anyhow" fi -cat > run < run < hintfile << EOF + cat > hintfile << EOF . 3600 IN NS ns.root. ns.root. 3600 IN A $PREFIX.8 EOF -cd .. + cd .. +done SOA="ns.example.net. hostmaster.example.net. 1 3600 1800 1209600 300" @@ -107,6 +110,8 @@ box.answer-cname-in-local.example.net. 3600 IN NS ns.answer-cname-in-local.examp ns.answer-cname-in-local.example.net. 3600 IN A $PREFIX.22 not-auth-zone.example.net. 3600 IN NS ns.not-auth-zone.example.net. ns.not-auth-zone.example.net. 3600 IN A $PREFIX.23 +lowercase-outgoing.example.net. 3600 IN NS ns.lowercase-outgoing.example.net. +ns.lowercase-outgoing.example.net. 3600 IN A $PREFIX.24 EOF mkdir $PREFIX.11 @@ -419,6 +424,32 @@ host3.auth-zone.example.net. 20 IN CNAME host1.not-auth-zone.example.net. *.wild.auth-zone.example.net. 3600 IN TXT "Hi there!" EOF +mkdir $PREFIX.24 +cat > $PREFIX.24/lowercase-outgoing.example.net.zone < $PREFIX.24/prequery.lua < recursor-service/another-auth-zone.example.net.zone < recursor-service2/recursor.conf </dev/null 2>&1 +$SDIG $nameserver 5300 hOsT.lOwErcAsE-outgoing.example.net a recurse >/dev/null 2>&1 +cat configs/10.0.3.24/questions.txt diff --git a/regression-tests.recursor/lowercase-outgoing/description b/regression-tests.recursor/lowercase-outgoing/description new file mode 100644 index 0000000000..e941b3a350 --- /dev/null +++ b/regression-tests.recursor/lowercase-outgoing/description @@ -0,0 +1 @@ +Test if the recursor indeed lowercases outgoing queries with lowercase-outgoing set diff --git a/regression-tests.recursor/lowercase-outgoing/expected_result b/regression-tests.recursor/lowercase-outgoing/expected_result new file mode 100644 index 0000000000..1d1542e3ce --- /dev/null +++ b/regression-tests.recursor/lowercase-outgoing/expected_result @@ -0,0 +1,2 @@ +hOsT.lOwErcAsE-outgoing.example.net. +host.lowercase-outgoing.example.net. diff --git a/regression-tests.recursor/start.sh b/regression-tests.recursor/start.sh index a27d89829b..45dd0694d7 100755 --- a/regression-tests.recursor/start.sh +++ b/regression-tests.recursor/start.sh @@ -14,9 +14,9 @@ fi cd configs -for dir in $PREFIX.* recursor-service +for dir in $PREFIX.* recursor-service recursor-service2 do supervise $dir & done -sleep 1 \ No newline at end of file +sleep 1 diff --git a/regression-tests.recursor/stop.sh b/regression-tests.recursor/stop.sh index 411b43a847..cc2d8c60cd 100755 --- a/regression-tests.recursor/stop.sh +++ b/regression-tests.recursor/stop.sh @@ -14,7 +14,7 @@ fi cd configs -for dir in $PREFIX.* recursor-service +for dir in $PREFIX.* recursor-service recursor-service2 do svc -d $dir svc -k $dir -- 2.47.2