]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
doth test: extend with HTTP endpoints reconfiguration check
authorArtem Boldariev <artem@boldariev.com>
Mon, 27 Jun 2022 13:23:26 +0000 (16:23 +0300)
committerArtem Boldariev <artem@boldariev.com>
Tue, 28 Jun 2022 12:43:19 +0000 (15:43 +0300)
This commit add a check which verifies that HTTP endpoints are being
picked up properly by the BIND instance on a reconfiguration.

bin/tests/system/doth/tests.sh

index 45170aba4a847ecc2f6b4ba556e5e8f77ef6849f..35f679981444267a93b9780af67df8283339de09 100644 (file)
@@ -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