Use jinja2 templates in transport-change test

- Replace named*.conf.in files with jinja2 templates.
- When applying the files use plain cp command to copy the rendered
  files.
This commit is contained in:
Nicki Křížek 2025-12-05 15:23:25 +01:00
parent 9d3279a542
commit 0f37603b1a
10 changed files with 12 additions and 12 deletions

View file

@ -61,45 +61,45 @@ reconfig_server() {
config_file="$1"
shift
echo_i "$message"
copy_setports "ns1/$config_file" "ns1/named.conf"
cp "ns1/$config_file" "ns1/named.conf"
rndc_reconfig ns1 10.53.0.1
}
run_dig_multitest_expect_success "$testing: a UDP query over Do53"
run_dig_multitest_expect_success "$testing: a TCP query over Do53" +tcp
reconfig_server "reconfiguring the server to use PROXYv2" named-proxy.conf.in
reconfig_server "reconfiguring the server to use PROXYv2" named-proxy.conf
run_dig_multitest_expect_success "$testing: a UDP query for Do53 over PROXYv2" +proxy
run_dig_multitest_expect_success "$testing: a TCP query for Do53 over PROXYv2" +tcp +proxy
reconfig_server "reconfiguring the server to use TLS/DoT" named-tls.conf.in
reconfig_server "reconfiguring the server to use TLS/DoT" named-tls.conf
run_dig_multitest_expect_success "$testing: a query over TLS/DoT" +tls
reconfig_server "reconfiguring the server to use TLS/DoT over encrypted PROXYv2" named-tls-proxy-encrypted.conf.in
reconfig_server "reconfiguring the server to use TLS/DoT over encrypted PROXYv2" named-tls-proxy-encrypted.conf
run_dig_multitest_expect_success "$testing: a query over TLS/DoT over encrypted PROXYv2" +tls +proxy
reconfig_server "reconfiguring the server to use TLS/DoT over plain PROXYv2" named-tls-proxy-plain.conf.in
reconfig_server "reconfiguring the server to use TLS/DoT over plain PROXYv2" named-tls-proxy-plain.conf
run_dig_multitest_expect_success "$testing: a query over TLS/DoT over plain PROXYv2" +tls +proxy +proxy-plain
reconfig_server "reconfiguring the server to use HTTPS/DoH" named-https.conf.in
reconfig_server "reconfiguring the server to use HTTPS/DoH" named-https.conf
run_dig_multitest_expect_success "$testing: a query over HTTPS/DoH" +https
reconfig_server "reconfiguring the server to use HTTPS/DoH over encrypted PROXYv2" named-https-proxy-encrypted.conf.in
reconfig_server "reconfiguring the server to use HTTPS/DoH over encrypted PROXYv2" named-https-proxy-encrypted.conf
run_dig_multitest_expect_success "$testing: a query over HTTPS/DoH over encrypted PROXYv2" +https +proxy
reconfig_server "reconfiguring the server to use HTTPS/DoH over plain PROXYv2" named-https-proxy-plain.conf.in
reconfig_server "reconfiguring the server to use HTTPS/DoH over plain PROXYv2" named-https-proxy-plain.conf
run_dig_multitest_expect_success "$testing: a query over HTTPS/DoH over plain PROXYv2" +https +proxy +proxy-plain
reconfig_server "reconfiguring the server to use plain HTTP/DoH" named-http-plain.conf.in
reconfig_server "reconfiguring the server to use plain HTTP/DoH" named-http-plain.conf
run_dig_multitest_expect_success "$testing: a query over plain HTTP/DoH" +http-plain
reconfig_server "reconfiguring the server to use plain HTTP/DoH over PROXYv2" named-http-plain-proxy.conf.in
reconfig_server "reconfiguring the server to use plain HTTP/DoH over PROXYv2" named-http-plain-proxy.conf
run_dig_multitest_expect_success "$testing: a query over plain HTTP/DoH over PROXYv2" +http-plain +proxy
reconfig_server "reconfiguring the server back to use TLS/DoT" named-tls.conf.in
reconfig_server "reconfiguring the server back to use TLS/DoT" named-tls.conf
run_dig_multitest_expect_success "$testing: a query over TLS/DoT" +tls
reconfig_server "reconfiguring the server back to use HTTPS/DoH" named-https.conf.in
reconfig_server "reconfiguring the server back to use HTTPS/DoH" named-https.conf
run_dig_multitest_expect_success "$testing: a query over HTTPS/DoH" +https
echo_i "exit status: $status"