mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Use jinja2 templates in rpzrecurse test
- Change ns2 header into jinja2 template. - Keep the various ns2 config files as non-templates, same for the named.default.conf to be consistent. - Symlink the ns2/named.default.conf as a jinja2 template to pick a starting config. It is rendered as a template to avoid an error when the test would overwrite a git-tracked file. - Use jinja2 templates for the ns3 files, keep named1.conf around because it's needed later in the test to restore the config. Symlink it to `ns3/named.conf.j2` to select a default config.
This commit is contained in:
parent
54c95d6966
commit
16e9ac4710
10 changed files with 5 additions and 12 deletions
1
bin/tests/system/rpzrecurse/ns2/named.conf.j2
Symbolic link
1
bin/tests/system/rpzrecurse/ns2/named.conf.j2
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
named.default.conf
|
||||
1
bin/tests/system/rpzrecurse/ns3/named.conf.j2
Symbolic link
1
bin/tests/system/rpzrecurse/ns3/named.conf.j2
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
named1.conf.j2
|
||||
|
|
@ -17,15 +17,6 @@ set -e
|
|||
|
||||
$PERL testgen.pl
|
||||
|
||||
copy_setports ns1/named.conf.in ns1/named.conf
|
||||
|
||||
copy_setports ns2/named.conf.header.in ns2/named.conf.header
|
||||
copy_setports ns2/named.default.conf ns2/named.conf
|
||||
|
||||
copy_setports ns3/named1.conf.in ns3/named.conf
|
||||
|
||||
copy_setports ns4/named.conf.in ns4/named.conf
|
||||
|
||||
# setup policy zones for a 64-zone test
|
||||
i=1
|
||||
while test $i -le 64; do
|
||||
|
|
|
|||
|
|
@ -448,7 +448,7 @@ p1=$((t2 - t1))
|
|||
echo_i "elapsed time $p1 seconds"
|
||||
|
||||
$RNDC -c ../_common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} flush
|
||||
copy_setports ns3/named2.conf.in ns3/named.conf
|
||||
cp ns3/named2.conf ns3/named.conf
|
||||
nextpart ns3/named.run >/dev/null
|
||||
$RNDC -c ../_common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} reload >/dev/null
|
||||
wait_for_log 20 "rpz: policy: reload done" ns3/named.run || ret=1
|
||||
|
|
@ -466,7 +466,7 @@ status=$((status + ret))
|
|||
|
||||
$RNDC -c ../_common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} flush
|
||||
# restore original named.conf
|
||||
copy_setports ns3/named1.conf.in ns3/named.conf
|
||||
cp ns3/named1.conf ns3/named.conf
|
||||
nextpart ns3/named.run >/dev/null
|
||||
$RNDC -c ../_common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} reload >/dev/null
|
||||
wait_for_log 20 "rpz: policy: reload done" ns3/named.run || ret=1
|
||||
|
|
@ -483,7 +483,7 @@ p1=$((t2 - t1))
|
|||
echo_i "elapsed time $p1 seconds"
|
||||
|
||||
$RNDC -c ../_common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} flush
|
||||
copy_setports ns3/named3.conf.in ns3/named.conf
|
||||
cp ns3/named3.conf ns3/named.conf
|
||||
nextpart ns3/named.run >/dev/null
|
||||
$RNDC -c ../_common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} reload >/dev/null
|
||||
wait_for_log 20 "rpz: policy: reload done" ns3/named.run || ret=1
|
||||
|
|
|
|||
Loading…
Reference in a new issue