diff --git a/bin/tests/system/views/clean.sh b/bin/tests/system/views/clean.sh index 894b7ce0f7..d4f2e6084c 100644 --- a/bin/tests/system/views/clean.sh +++ b/bin/tests/system/views/clean.sh @@ -27,6 +27,8 @@ rm -f ns2/internal/K* rm -f ns2/internal/inline.db.jbk rm -f ns2/internal/inline.db.signed rm -f ns2/internal/inline.db.signed.jnl +rm -f ns2/zones.conf +rm -f ns2/db.* ns2/K* rm -f dig.out.external dig.out.internal rm -f ns*/named.lock rm -f ns*/managed-keys.bind* ns*/*.mkeys* diff --git a/bin/tests/system/views/ns2/named3.conf.in b/bin/tests/system/views/ns2/named3.conf.in new file mode 100644 index 0000000000..9e36020708 --- /dev/null +++ b/bin/tests/system/views/ns2/named3.conf.in @@ -0,0 +1,33 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * 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 http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +options { + query-source address 10.53.0.2; + notify-source 10.53.0.2; + transfer-source 10.53.0.2; + port @PORT@; + pid-file "named.pid"; + listen-on { 10.53.0.2; }; + listen-on-v6 { none; }; + recursion no; + notify no; +}; + +key rndc_key { + secret "1234abcd8765"; + algorithm hmac-sha256; +}; + +controls { + inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; }; +}; + +include "zones.conf"; diff --git a/bin/tests/system/views/tests.sh b/bin/tests/system/views/tests.sh index 01ea650652..bb721c4c67 100644 --- a/bin/tests/system/views/tests.sh +++ b/bin/tests/system/views/tests.sh @@ -132,5 +132,46 @@ test "$int" != "$ext" || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` +echo_i "verifying adding of multiple inline zones followed by reconfiguration works" + +[ ! -f ns2/zones.conf ] && touch ns2/zones.conf +copy_setports ns2/named3.conf.in ns2/named.conf + +for i in `seq 1 50`; do + ret=0 + zone_name=`printf "example%03d.com" $i` + +# Add a new zone to the configuration. + cat >> ns2/zones.conf << EOF +zone "${zone_name}" { + type master; + file "db.${zone_name}"; + dnssec-dnskey-kskonly yes; + auto-dnssec maintain; + inline-signing yes; +}; +EOF + +# Create a master file for the zone. + cat > "ns2/db.${zone_name}" < /dev/null + $RNDCCMD 10.53.0.2 reconfig || ret=1 + if [ $ret != 0 ]; then echo_i "failed"; break; fi +done # end for # +status=`expr $status + $ret` + echo_i "exit status: $status" [ $status -eq 0 ] || exit 1