From 69e1d3804e809e7d3252cd38182bbab412f17edd Mon Sep 17 00:00:00 2001 From: Artem Boldariev Date: Mon, 27 Jun 2022 16:23:26 +0300 Subject: [PATCH] doth test: extend with HTTP endpoints reconfiguration check This commit add a check which verifies that HTTP endpoints are being picked up properly by the BIND instance on a reconfiguration. (cherry picked from commit 7822670d0f2c7bc8e592aacb627dfc2c7de13d21) --- bin/tests/system/doth/tests.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/bin/tests/system/doth/tests.sh b/bin/tests/system/doth/tests.sh index 45170aba4a..35f6799814 100644 --- a/bin/tests/system/doth/tests.sh +++ b/bin/tests/system/doth/tests.sh @@ -627,6 +627,25 @@ grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status + ret)) +n=$((n + 1)) +echo_i "doing rndc reconfig to see if HTTP endpoints have gotten reconfigured ($n)" +ret=0 +# 'sed -i ...' is not portable. Sigh... +sed 's/\/dns-query/\/dns-query-test/g' "ns4/named.conf" > "ns4/named.conf.sed" +mv -f "ns4/named.conf.sed" "ns4/named.conf" +rndc_reconfig ns4 10.53.0.4 60 +retry_quiet 15 wait_for_tlsctx_update_ns4 || ret=1 +if [ $ret != 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + +n=$((n + 1)) +echo_i "checking DoH query (POST) to verify HTTP endpoint reconfiguration ($n)" +ret=0 +dig_with_https_opts +https='/dns-query-test' @10.53.0.4 example SOA > dig.out.test$n +grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1 +if [ $ret != 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + n=$((n + 1)) echo_i "checking DoT query (with TLS verification enabled) ($n)" ret=0