mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-22 23:01:43 -04:00
checkpoint
This commit is contained in:
parent
ee94aedb41
commit
842e0d16b8
5 changed files with 78 additions and 2 deletions
6
bin/tests/system/upforwd/knowngood.ns1.before
Normal file
6
bin/tests/system/upforwd/knowngood.ns1.before
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
example. 3600 IN SOA n1.example. hostmaster.ns1.example. 1 3600 1200 604800 7200
|
||||
example. 3600 IN NS ns2.example.
|
||||
ns1.example. 3600 IN A 10.53.0.1
|
||||
ns2.example. 3600 IN A 10.53.0.2
|
||||
example. 3600 IN SOA n1.example. hostmaster.ns1.example. 1 3600 1200 604800 7200
|
||||
|
||||
6
bin/tests/system/upforwd/knowngood.ns2.before
Normal file
6
bin/tests/system/upforwd/knowngood.ns2.before
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
example. 3600 IN SOA n1.example. hostmaster.ns1.example. 1 3600 1200 604800 7200
|
||||
example. 3600 IN NS ns2.example.
|
||||
ns1.example. 3600 IN A 10.53.0.1
|
||||
ns2.example. 3600 IN A 10.53.0.2
|
||||
example. 3600 IN SOA n1.example. hostmaster.ns1.example. 1 3600 1200 604800 7200
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: named.conf,v 1.1 2000/09/08 05:40:44 marka Exp $ */
|
||||
/* $Id: named.conf,v 1.2 2000/09/08 06:27:35 marka Exp $ */
|
||||
|
||||
key "update.example." {
|
||||
algorithm "hmac-md5";
|
||||
|
|
@ -35,5 +35,5 @@ options {
|
|||
zone "example" {
|
||||
type master;
|
||||
file "example.db";
|
||||
allow-update { key "update.example."; };
|
||||
allow-update { key update.example.; };
|
||||
};
|
||||
|
|
|
|||
60
bin/tests/system/upforwd/tests.sh
Normal file
60
bin/tests/system/upforwd/tests.sh
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2000 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
# INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: tests.sh,v 1.1 2000/09/08 06:27:35 marka Exp $
|
||||
|
||||
#
|
||||
# Perform tests
|
||||
#
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
status=0
|
||||
|
||||
echo "I:fetching first copy of zone before update"
|
||||
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\
|
||||
@10.53.0.1 axfr -p 5300 > dig.out.ns1 || status=1
|
||||
|
||||
echo "I:fetching second copy of zone before update"
|
||||
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\
|
||||
@10.53.0.1 axfr -p 5300 > dig.out.ns2 || status=1
|
||||
|
||||
echo "I:comparing pre-update copies to known good data"
|
||||
$PERL ../digcomp.pl knowngood.ns1.before dig.out.ns1 || status=1
|
||||
$PERL ../digcomp.pl knowngood.ns1.before dig.out.ns2 || status=1
|
||||
|
||||
echo "I:updating zone"
|
||||
# nsupdate will print a ">" prompt to stdout as it gets each input line.
|
||||
$NSUPDATE -y update.example:c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K < update.scp # > /dev/null
|
||||
echo "I:sleeping 15 seconds for server to incorporate changes"
|
||||
sleep 15
|
||||
|
||||
echo "I:fetching first copy of zone after update"
|
||||
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\
|
||||
@10.53.0.1 axfr -p 5300 > dig.out.ns1 || status=1
|
||||
|
||||
echo "I:fetching second copy of zone after update"
|
||||
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\
|
||||
@10.53.0.1 axfr -p 5300 > dig.out.ns2 || status=1
|
||||
|
||||
echo "I:comparing post-update copies to known good data"
|
||||
$PERL ../digcomp.pl knowngood.ns1.after dig.out.ns1 || status=1
|
||||
$PERL ../digcomp.pl knowngood.ns1.after dig.out.ns2 || status=1
|
||||
|
||||
echo "I:exit status: $status"
|
||||
exit $status
|
||||
4
bin/tests/system/upforwd/update.scp
Normal file
4
bin/tests/system/upforwd/update.scp
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
server 10.53.0.2 5300
|
||||
update add updated.example. 600 A 10.10.10.1
|
||||
update add updated.example. 600 TXT Foo
|
||||
|
||||
Loading…
Reference in a new issue