Use jinja2 templates in nsupdate test

- Merge ns1/tls.options.in into ns1/named.conf.j2 and render it
  conditionally. Also conditionally include the additional
  ns1/tls.conf.j2 which is always rendered.
- Use multiple templates for ns7 and replace the copy_setports.
- Use jinja2 template for verylarge.in as well.
This commit is contained in:
Nicki Křížek
2025-12-05 17:04:16 +01:00
parent 9fc446b6f5
commit 54c95d6966
16 changed files with 13 additions and 40 deletions

View File

@@ -93,7 +93,7 @@ path = [
"bin/tests/system/nsupdate/CA/index.txt.attr",
"bin/tests/system/nsupdate/CA/serial",
"bin/tests/system/nsupdate/commandlist",
"bin/tests/system/nsupdate/verylarge.in",
"bin/tests/system/nsupdate/verylarge.j2",
"bin/tests/system/org.isc.bind.system.plist",
"bin/tests/system/pipelined/input",
"bin/tests/system/pipelined/inputb",

View File

@@ -11,7 +11,9 @@
* information regarding copyright ownership.
*/
{% if FEATURE_FIPS_DH == "1" %}
include "tls.conf";
{% endif %}
options {
query-source address 10.53.0.1;
@@ -27,7 +29,15 @@ options {
minimal-responses no;
update-quota 1;
dnssec-validation no;
include "tls.options";
{% if FEATURE_FIPS_DH == "1" %}
tls-port @TLSPORT@;
listen-on tls ephemeral { 10.53.0.1; };
listen-on port @EXTRAPORT1@ tls tls-forward-secrecy { 10.53.0.1; };
listen-on port @EXTRAPORT2@ tls tls-forward-secrecy-mutual-tls { 10.53.0.1; };
listen-on port @EXTRAPORT3@ tls tls-expired { 10.53.0.1; };
{% endif %}
};
acl named-acl {

View File

@@ -1,18 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
tls-port @TLSPORT@;
listen-on tls ephemeral { 10.53.0.1; };
listen-on port @EXTRAPORT1@ tls tls-forward-secrecy { 10.53.0.1; };
listen-on port @EXTRAPORT2@ tls tls-forward-secrecy-mutual-tls { 10.53.0.1; };
listen-on port @EXTRAPORT3@ tls tls-expired { 10.53.0.1; };

View File

@@ -13,25 +13,6 @@
. ../conf.sh
if $FEATURETEST --have-fips-dh; then
copy_setports ns1/tls.conf.in ns1/tls.conf
copy_setports ns1/tls.options.in ns1/tls.options
else
: >ns1/tls.conf
: >ns1/tls.options
fi
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
copy_setports ns3/named.conf.in ns3/named.conf
copy_setports ns5/named.conf.in ns5/named.conf
copy_setports ns6/named.conf.in ns6/named.conf
copy_setports ns7/named1.conf.in ns7/named.conf
copy_setports ns8/named.conf.in ns8/named.conf
copy_setports ns9/named.conf.in ns9/named.conf
copy_setports ns10/named.conf.in ns10/named.conf
copy_setports verylarge.in verylarge
cp -f ns1/example1.db ns1/example.db
sed 's/example.nil/other.nil/g' ns1/example1.db >ns1/other.db
sed 's/example.nil/unixtime.nil/g' ns1/example1.db >ns1/unixtime.db

View File

@@ -2464,7 +2464,7 @@ EOF
status=1
}
copy_setports ns7/named2.conf.in ns7/named.conf
cp ns7/named2.conf ns7/named.conf
rndc_reload ns7 10.53.0.7
n=$((n + 1))