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.
(cherry picked from commit 16e9ac4710)
This commit is contained in:
parent
cd78f8a9ec
commit
e5d7ab2d8f
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
|
||||
|
|
@ -19,15 +19,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
|
||||
|
||||
touch dnsrps.conf
|
||||
touch dnsrps.cache
|
||||
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ if [ "$MODE" = "native" ]; then
|
|||
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
|
||||
|
|
@ -498,7 +498,7 @@ if [ "$MODE" = "native" ]; then
|
|||
|
||||
$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
|
||||
|
|
@ -515,7 +515,7 @@ if [ "$MODE" = "native" ]; then
|
|||
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