From 95fa657891d25d4e0ce34868a5cfe40ebd9ae617 Mon Sep 17 00:00:00 2001 From: Daniel Salzman <daniel.salzman@nic.cz> Date: Fri, 21 Mar 2014 14:38:11 +0100 Subject: [PATCH] tests-extra: small cleanup --- .../dnssec/add_remove/data/example.zone.5 | 1 - .../dnssec/add_remove/data/example.zone.6 | 2 - .../dnssec/add_remove/data/example.zone.7 | 3 -- .../dnssec/add_remove/data/example.zone.8 | 37 +++++++++++++++++++ tests-extra/tests/dnssec/add_remove/test.py | 6 +-- .../{properly_signed => no_resign}/test.py | 11 +++--- 6 files changed, 45 insertions(+), 15 deletions(-) create mode 100644 tests-extra/tests/dnssec/add_remove/data/example.zone.8 rename tests-extra/tests/dnssec/{properly_signed => no_resign}/test.py (67%) diff --git a/tests-extra/tests/dnssec/add_remove/data/example.zone.5 b/tests-extra/tests/dnssec/add_remove/data/example.zone.5 index a0cb4b1c1..d9caf5cd6 100644 --- a/tests-extra/tests/dnssec/add_remove/data/example.zone.5 +++ b/tests-extra/tests/dnssec/add_remove/data/example.zone.5 @@ -31,4 +31,3 @@ 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 diff --git a/tests-extra/tests/dnssec/add_remove/data/example.zone.6 b/tests-extra/tests/dnssec/add_remove/data/example.zone.6 index 08a37e186..f6b092d15 100644 --- a/tests-extra/tests/dnssec/add_remove/data/example.zone.6 +++ b/tests-extra/tests/dnssec/add_remove/data/example.zone.6 @@ -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 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 - diff --git a/tests-extra/tests/dnssec/add_remove/data/example.zone.7 b/tests-extra/tests/dnssec/add_remove/data/example.zone.7 index 2bbac95eb..49ee5145e 100644 --- a/tests-extra/tests/dnssec/add_remove/data/example.zone.7 +++ b/tests-extra/tests/dnssec/add_remove/data/example.zone.7 @@ -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 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 - diff --git a/tests-extra/tests/dnssec/add_remove/data/example.zone.8 b/tests-extra/tests/dnssec/add_remove/data/example.zone.8 new file mode 100644 index 000000000..fa5d682e2 --- /dev/null +++ b/tests-extra/tests/dnssec/add_remove/data/example.zone.8 @@ -0,0 +1,37 @@ +; 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 diff --git a/tests-extra/tests/dnssec/add_remove/test.py b/tests-extra/tests/dnssec/add_remove/test.py index 9c5487a00..77b51a74b 100644 --- a/tests-extra/tests/dnssec/add_remove/test.py +++ b/tests-extra/tests/dnssec/add_remove/test.py @@ -1,4 +1,3 @@ - #!/usr/bin/env python3 '''Test for DNSSEC additions and removals''' @@ -6,7 +5,7 @@ from dnstest.utils import * from dnstest.test import Test -CHANGE_COUNT = 7 +CHANGE_COUNT = 8 def update_zone(master, slave, zone, changes, change_serial=False, serials=None): for i in changes: @@ -29,7 +28,8 @@ def update_zone(master, slave, zone, changes, change_serial=False, serials=None) def do_steps(master, slave, zone): # add records 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 rev = list(range(1, CHANGE_COUNT + 1)) rev.reverse() diff --git a/tests-extra/tests/dnssec/properly_signed/test.py b/tests-extra/tests/dnssec/no_resign/test.py similarity index 67% rename from tests-extra/tests/dnssec/properly_signed/test.py rename to tests-extra/tests/dnssec/no_resign/test.py index 5deda2f1f..4e5fffbf6 100644 --- a/tests-extra/tests/dnssec/properly_signed/test.py +++ b/tests-extra/tests/dnssec/no_resign/test.py @@ -1,6 +1,6 @@ #!/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.test import Test @@ -15,7 +15,6 @@ t.link(nsec3_zone, master) t.start() -check_log("Load signed zones") # Get zone serial. old_nsec_serial = master.zone_wait(nsec_zone) 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.use_gen_keys() master.gen_confile() -check_log("Add keys for zones") master.reload() -t.sleep(3) +t.sleep(5) new_nsec_serial = master.zone_wait(nsec_zone) new_nsec3_serial = master.zone_wait(nsec3_zone) -compare(old_nsec_serial, new_nsec_serial, "Server did needless NSEC signing operation") -compare(old_nsec3_serial, new_nsec3_serial, "Server did needless NSEC3 signing operation") +# Check if the zones are resigned. +compare(old_nsec_serial, new_nsec_serial, "SOA serial") +compare(old_nsec3_serial, new_nsec3_serial, "SOA serial") t.stop() -- GitLab