Skip to content
Snippets Groups Projects
Commit 95fa6578 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

tests-extra: small cleanup

parent 07286156
Branches
Tags
No related merge requests found
...@@ -31,4 +31,3 @@ new-node IN A 1.2.3.5 ; added new RR ...@@ -31,4 +31,3 @@ new-node IN A 1.2.3.5 ; added new RR
new-node IN TXT "test" ; added new RR type new-node IN TXT "test" ; added new RR type
below.cut.a IN A 1.2.3.4 ; added new glue below.cut.a IN A 1.2.3.4 ; added new glue
b IN DS 57855 5 1 B6DCD485719ADCA18E5F3D48A2331627FDD3636B ; added new secure delegation b IN DS 57855 5 1 B6DCD485719ADCA18E5F3D48A2331627FDD3636B ; added new secure delegation
non.terminal IN A 1.2.3.4 ; added authoritative non-terminal node
...@@ -32,5 +32,3 @@ new-node IN TXT "test" ; added new RR type ...@@ -32,5 +32,3 @@ new-node IN TXT "test" ; added new RR type
below.cut.a IN A 1.2.3.4 ; added new glue below.cut.a IN A 1.2.3.4 ; added new glue
b IN DS 57855 5 1 B6DCD485719ADCA18E5F3D48A2331627FDD3636B ; added new secure delegation b IN DS 57855 5 1 B6DCD485719ADCA18E5F3D48A2331627FDD3636B ; added new secure delegation
non.terminal IN A 1.2.3.4 ; added authoritative non-terminal node non.terminal IN A 1.2.3.4 ; added authoritative non-terminal node
very.long.non.terminal IN A 1.3.3.7 ; added extra authoritative non-terminal node
...@@ -33,6 +33,3 @@ below.cut.a IN A 1.2.3.4 ; added new glue ...@@ -33,6 +33,3 @@ below.cut.a IN A 1.2.3.4 ; added new glue
b IN DS 57855 5 1 B6DCD485719ADCA18E5F3D48A2331627FDD3636B ; added new secure delegation b IN DS 57855 5 1 B6DCD485719ADCA18E5F3D48A2331627FDD3636B ; added new secure delegation
non.terminal IN A 1.2.3.4 ; added authoritative non-terminal node non.terminal IN A 1.2.3.4 ; added authoritative non-terminal node
very.long.non.terminal IN A 1.3.3.7 ; added extra authoritative non-terminal node very.long.non.terminal IN A 1.3.3.7 ; added extra authoritative non-terminal node
a.example. 3600 IN DS 57854 5 1 B6DCD485719ADCA18E5F3D48A2331627FDD3636B ; added two new DSs
a.example. 3600 IN DS 57856 5 1 B6DCD485719ADCA18E5F3D48A2331627FDD3636B ; tests sorting
; This zone comes from RFC-4035
example. 3600 IN SOA ns1.example. bugs.x.w.example. 1081539415 3600 300 3600000 3600
example. 3600 IN NS ns1.example.
example. 3600 IN NS ns2.example.
example. 3600 IN MX 1 xx.example.
ns1.a.example. 3600 IN A 192.0.2.5
ns2.a.example. 3600 IN A 192.0.2.6
ns1.b.example. 3600 IN A 192.0.2.7
ns2.b.example. 3600 IN A 192.0.2.8
a.example. 3600 IN NS ns1.a.example.
a.example. 3600 IN NS ns2.a.example.
a.example. 3600 IN DS 57855 5 1 B6DCD485719ADCA18E5F3D48A2331627FDD3636B
*.a.example. 3600 IN A 192.0.2.11
ai.example. 3600 IN A 192.0.2.9
ai.example. 3600 IN HINFO "KLH-10" "ITS"
ai.example. 3600 IN AAAA 2001:db8::f00:baa9
b.example. 3600 IN NS ns1.b.example.
b.example. 3600 IN NS ns2.b.example.
ns1.example. 3600 IN A 192.0.2.1
ns2.example. 3600 IN A 192.0.2.2
*.w.example. 3600 IN MX 1 ai.example.
x.y.w.example. 3600 IN MX 1 xx.example.
xx.example. 3600 IN A 192.0.2.10
xx.example. 3600 IN HINFO "KLH-10" "TOPS-20"
xx.example. 3600 IN AAAA 2001:db8::f00:baaa
x.w.example. 3600 IN MX 1 xx.example.
*.to-apex.example. 3600 IN CNAME example. ; Wildcard expansion leading to apex
*.to-nxdomain.example. 3600 IN CNAME nxdomain.example. ; Wildcard expansion leading to nonexistent name
new-node IN A 1.2.3.4 ; added new node
new-node IN A 1.2.3.5 ; added new RR
new-node IN TXT "test" ; added new RR type
below.cut.a IN A 1.2.3.4 ; added new glue
b IN DS 57855 5 1 B6DCD485719ADCA18E5F3D48A2331627FDD3636B ; added new secure delegation
non.terminal IN A 1.2.3.4 ; added authoritative non-terminal node
very.long.non.terminal IN A 1.3.3.7 ; added extra authoritative non-terminal node
a.example. 3600 IN DS 57854 5 1 B6DCD485719ADCA18E5F3D48A2331627FDD3636B ; added two new DSs
a.example. 3600 IN DS 57856 5 1 B6DCD485719ADCA18E5F3D48A2331627FDD3636B ; tests sorting
#!/usr/bin/env python3 #!/usr/bin/env python3
'''Test for DNSSEC additions and removals''' '''Test for DNSSEC additions and removals'''
...@@ -6,7 +5,7 @@ ...@@ -6,7 +5,7 @@
from dnstest.utils import * from dnstest.utils import *
from dnstest.test import Test from dnstest.test import Test
CHANGE_COUNT = 7 CHANGE_COUNT = 8
def update_zone(master, slave, zone, changes, change_serial=False, serials=None): def update_zone(master, slave, zone, changes, change_serial=False, serials=None):
for i in changes: for i in changes:
...@@ -29,7 +28,8 @@ def update_zone(master, slave, zone, changes, change_serial=False, serials=None) ...@@ -29,7 +28,8 @@ def update_zone(master, slave, zone, changes, change_serial=False, serials=None)
def do_steps(master, slave, zone): def do_steps(master, slave, zone):
# add records # add records
serials = [] serials = []
update_zone(master, slave, zone, range(1, CHANGE_COUNT + 1), change_serial=False, serials=serials) update_zone(master, slave, zone, range(1, CHANGE_COUNT + 1),
change_serial=False, serials=serials)
# remove added records, in descending order # remove added records, in descending order
rev = list(range(1, CHANGE_COUNT + 1)) rev = list(range(1, CHANGE_COUNT + 1))
rev.reverse() rev.reverse()
......
#!/usr/bin/env python3 #!/usr/bin/env python3
'''Test for properly signed NSEC/NSEC3 zone ''' '''Test for no resigning if the zone is properly signed.'''
from dnstest.utils import * from dnstest.utils import *
from dnstest.test import Test from dnstest.test import Test
...@@ -15,7 +15,6 @@ t.link(nsec3_zone, master) ...@@ -15,7 +15,6 @@ t.link(nsec3_zone, master)
t.start() t.start()
check_log("Load signed zones")
# Get zone serial. # Get zone serial.
old_nsec_serial = master.zone_wait(nsec_zone) old_nsec_serial = master.zone_wait(nsec_zone)
old_nsec3_serial = master.zone_wait(nsec3_zone) old_nsec3_serial = master.zone_wait(nsec3_zone)
...@@ -24,15 +23,15 @@ old_nsec3_serial = master.zone_wait(nsec3_zone) ...@@ -24,15 +23,15 @@ old_nsec3_serial = master.zone_wait(nsec3_zone)
master.dnssec_enable = True master.dnssec_enable = True
master.use_gen_keys() master.use_gen_keys()
master.gen_confile() master.gen_confile()
check_log("Add keys for zones")
master.reload() master.reload()
t.sleep(3) t.sleep(5)
new_nsec_serial = master.zone_wait(nsec_zone) new_nsec_serial = master.zone_wait(nsec_zone)
new_nsec3_serial = master.zone_wait(nsec3_zone) new_nsec3_serial = master.zone_wait(nsec3_zone)
compare(old_nsec_serial, new_nsec_serial, "Server did needless NSEC signing operation") # Check if the zones are resigned.
compare(old_nsec3_serial, new_nsec3_serial, "Server did needless NSEC3 signing operation") compare(old_nsec_serial, new_nsec_serial, "SOA serial")
compare(old_nsec3_serial, new_nsec3_serial, "SOA serial")
t.stop() t.stop()
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment