From: Artem Boldariev Date: Mon, 27 Jun 2022 13:23:26 +0000 (+0300) Subject: doth test: extend with HTTP endpoints reconfiguration check X-Git-Tag: v9.19.3~21^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7822670d0f2c7bc8e592aacb627dfc2c7de13d21;p=thirdparty%2Fbind9.git 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. --- diff --git a/bin/tests/system/doth/tests.sh b/bin/tests/system/doth/tests.sh index 45170aba4a8..35f67998144 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