Split the first masterfile test into 3
Additionally read the correct zone for BIND 8 ttl checks
(cherry picked from commit e02b73c7a4)
This commit is contained in:
@@ -57,6 +57,9 @@ Files: **/README
|
||||
bin/tests/system/keepalive/expected
|
||||
bin/tests/system/legacy/ns6/edns512.db.signed
|
||||
bin/tests/system/legacy/ns7/edns512-notcp.db.signed
|
||||
bin/tests/system/masterfile/knowngood.include
|
||||
bin/tests/system/masterfile/knowngood.ttl1
|
||||
bin/tests/system/masterfile/knowngood.ttl2
|
||||
bin/tests/system/notify/ns4/named.port.in
|
||||
bin/tests/system/nsupdate/commandlist
|
||||
bin/tests/system/nsupdate/verylarge.in
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
include. 300 IN SOA ns.include. hostmaster.include. 1 3600 1800 1814400 3600
|
||||
include. 300 IN NS ns.include.
|
||||
a.include. 300 IN A 10.0.0.1
|
||||
a.include. 300 IN A 10.0.0.99
|
||||
a.a.include. 300 IN A 10.0.1.1
|
||||
b.foo.a.include. 300 IN A 10.0.2.2
|
||||
b.include. 300 IN A 10.0.0.2
|
||||
a.b.include. 300 IN A 10.0.1.1
|
||||
c.b.include. 300 IN A 10.0.0.3
|
||||
b.foo.b.include. 300 IN A 10.0.2.2
|
||||
ns.include. 300 IN A 127.0.0.1
|
||||
include. 300 IN SOA ns.include. hostmaster.include. 1 3600 1800 1814400 3600
|
||||
ttl2. 1 IN SOA ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3
|
||||
ttl2. 1 IN NS ns.ttl2.
|
||||
a.ttl2. 1 IN TXT "inherited ttl 1"
|
||||
b.ttl2. 2 IN TXT "explicit ttl 2"
|
||||
c.ttl2. 2 IN TXT "inherited ttl 2"
|
||||
d.ttl2. 3 IN TXT "default ttl 3"
|
||||
e.ttl2. 2 IN TXT "explicit ttl 2"
|
||||
f.ttl2. 3 IN TXT "default ttl 3"
|
||||
ns.ttl2. 1 IN A 10.53.0.1
|
||||
ttl2. 1 IN SOA ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3
|
||||
ttl2. 1 IN SOA ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3
|
||||
ttl2. 1 IN NS ns.ttl2.
|
||||
a.ttl2. 1 IN TXT "inherited ttl 1"
|
||||
b.ttl2. 2 IN TXT "explicit ttl 2"
|
||||
c.ttl2. 2 IN TXT "inherited ttl 2"
|
||||
d.ttl2. 3 IN TXT "default ttl 3"
|
||||
e.ttl2. 2 IN TXT "explicit ttl 2"
|
||||
f.ttl2. 3 IN TXT "default ttl 3"
|
||||
ns.ttl2. 1 IN A 10.53.0.1
|
||||
ttl2. 1 IN SOA ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3
|
||||
12
bin/tests/system/masterfile/knowngood.include
Normal file
12
bin/tests/system/masterfile/knowngood.include
Normal file
@@ -0,0 +1,12 @@
|
||||
include. 300 IN SOA ns.include. hostmaster.include. 1 3600 1800 1814400 3600
|
||||
include. 300 IN NS ns.include.
|
||||
a.include. 300 IN A 10.0.0.1
|
||||
a.include. 300 IN A 10.0.0.99
|
||||
a.a.include. 300 IN A 10.0.1.1
|
||||
b.foo.a.include. 300 IN A 10.0.2.2
|
||||
b.include. 300 IN A 10.0.0.2
|
||||
a.b.include. 300 IN A 10.0.1.1
|
||||
c.b.include. 300 IN A 10.0.0.3
|
||||
b.foo.b.include. 300 IN A 10.0.2.2
|
||||
ns.include. 300 IN A 127.0.0.1
|
||||
include. 300 IN SOA ns.include. hostmaster.include. 1 3600 1800 1814400 3600
|
||||
10
bin/tests/system/masterfile/knowngood.ttl1
Normal file
10
bin/tests/system/masterfile/knowngood.ttl1
Normal file
@@ -0,0 +1,10 @@
|
||||
ttl1. 3 IN SOA ns.ttl1. hostmaster.ttl1. 1 3600 1800 1814400 3
|
||||
ttl1. 3 IN NS ns.ttl1.
|
||||
a.ttl1. 3 IN TXT "soa minttl 3"
|
||||
b.ttl1. 2 IN TXT "explicit ttl 2"
|
||||
c.ttl1. 3 IN TXT "soa minttl 3"
|
||||
d.ttl1. 1 IN TXT "default ttl 1"
|
||||
e.ttl1. 4 IN TXT "explicit ttl 4"
|
||||
f.ttl1. 1 IN TXT "default ttl 1"
|
||||
ns.ttl1. 3 IN A 10.53.0.1
|
||||
ttl1. 3 IN SOA ns.ttl1. hostmaster.ttl1. 1 3600 1800 1814400 3
|
||||
10
bin/tests/system/masterfile/knowngood.ttl2
Normal file
10
bin/tests/system/masterfile/knowngood.ttl2
Normal file
@@ -0,0 +1,10 @@
|
||||
ttl2. 1 IN SOA ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3
|
||||
ttl2. 1 IN NS ns.ttl2.
|
||||
a.ttl2. 1 IN TXT "inherited ttl 1"
|
||||
b.ttl2. 2 IN TXT "explicit ttl 2"
|
||||
c.ttl2. 2 IN TXT "inherited ttl 2"
|
||||
d.ttl2. 3 IN TXT "default ttl 3"
|
||||
e.ttl2. 2 IN TXT "explicit ttl 2"
|
||||
f.ttl2. 3 IN TXT "default ttl 3"
|
||||
ns.ttl2. 1 IN A 10.53.0.1
|
||||
ttl2. 1 IN SOA ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3
|
||||
@@ -24,13 +24,25 @@ n=$(expr $n + 1)
|
||||
echo_i "test master file \$INCLUDE semantics ($n)"
|
||||
$DIG $DIGOPTS +nostats +nocmd include. axfr @10.53.0.1 >dig.out.$n || ret=1
|
||||
|
||||
$DIFF dig.out.$n knowngood.include || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
ret=0
|
||||
n=$((n + 1))
|
||||
echo_i "test master file BIND 8 compatibility TTL and \$TTL semantics ($n)"
|
||||
$DIG $DIGOPTS +nostats +nocmd ttl2. axfr @10.53.0.1 >>dig.out.$n || ret=1
|
||||
$DIG $DIGOPTS +nostats +nocmd ttl1. axfr @10.53.0.1 >dig.out.$n || ret=1
|
||||
|
||||
$DIFF dig.out.$n knowngood.ttl1 || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
ret=0
|
||||
n=$((n + 1))
|
||||
echo_i "test of master file RFC1035 TTL and \$TTL semantics ($n)"
|
||||
$DIG $DIGOPTS +nostats +nocmd ttl2. axfr @10.53.0.1 >>dig.out.$n || ret=1
|
||||
$DIG $DIGOPTS +nostats +nocmd ttl2. axfr @10.53.0.1 >dig.out.$n || ret=1
|
||||
|
||||
$DIFF dig.out.$n knowngood.dig.out || status=1
|
||||
$DIFF dig.out.$n knowngood.ttl2 || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$(expr $status + $ret)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user