From e2f470bebb3a0c107bc4ac86c6920c21e50e83e0 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Thu, 8 Mar 2001 02:59:47 +0000 Subject: [PATCH] Check that rndc stop syncs zone files. --- bin/tests/system/nsupdate/knowngood.ns1.afterstop | 3 +++ bin/tests/system/nsupdate/ns1/named.conf | 11 ++++++++++- bin/tests/system/nsupdate/tests.sh | 15 ++++++++++++++- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 bin/tests/system/nsupdate/knowngood.ns1.afterstop diff --git a/bin/tests/system/nsupdate/knowngood.ns1.afterstop b/bin/tests/system/nsupdate/knowngood.ns1.afterstop new file mode 100644 index 0000000000..5fbd1f6e96 --- /dev/null +++ b/bin/tests/system/nsupdate/knowngood.ns1.afterstop @@ -0,0 +1,3 @@ +updated4.example.nil. 600 IN A 10.10.10.3 +example.nil. 300 IN NS ns2.example.nil. +example.nil. 300 IN NS ns3.example.nil. diff --git a/bin/tests/system/nsupdate/ns1/named.conf b/bin/tests/system/nsupdate/ns1/named.conf index 468b532724..581ed445e9 100644 --- a/bin/tests/system/nsupdate/ns1/named.conf +++ b/bin/tests/system/nsupdate/ns1/named.conf @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named.conf,v 1.9 2001/01/09 21:44:09 bwelling Exp $ */ +/* $Id: named.conf,v 1.10 2001/03/08 02:59:47 bwelling Exp $ */ options { query-source address 10.53.0.1; @@ -29,6 +29,15 @@ options { notify yes; }; +key rndc_key { + secret "1234abcd8765"; + algorithm hmac-md5; +}; + +controls { + inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; }; +}; + zone "example.nil" { type master; file "example.db"; diff --git a/bin/tests/system/nsupdate/tests.sh b/bin/tests/system/nsupdate/tests.sh index 4635fd5bef..96287b80a1 100644 --- a/bin/tests/system/nsupdate/tests.sh +++ b/bin/tests/system/nsupdate/tests.sh @@ -15,7 +15,7 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# $Id: tests.sh,v 1.20 2001/02/15 01:04:06 gson Exp $ +# $Id: tests.sh,v 1.21 2001/03/08 02:59:46 bwelling Exp $ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh @@ -141,5 +141,18 @@ fi echo "I:end RT #482 regression test" +echo "I:testing that rndc stop updates the master file" +$NSUPDATE < /dev/null || status=1 +server 10.53.0.1 5300 +update add updated4.example.nil. 600 A 10.10.10.3 +send +END +$PERL $SYSTEMTESTTOP/stop.pl --use-rndc . ns1 +rm -f ns1/*jnl +$PERL $SYSTEMTESTTOP/start.pl --noclean . ns1 +$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd updated4.example.nil.\ + @10.53.0.1 a -p 5300 > dig.out.ns1 || status=1 +$PERL ../digcomp.pl knowngood.ns1.afterstop dig.out.ns1 || status=1 + echo "I:exit status: $status" exit $status