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

tests-extra: improve ttl-slave test

parent 4232da99
No related branches found
No related tags found
No related merge requests found
; This zone file is actually not used in the test,
; it's just a placeholder to distinguish master zone
; and updated slave zone.
$ORIGIN ttl-mismatch.
$TTL 3600
@ SOA dns1 hostmaster 2010111201 10800 3600 1209600 7200
NS dns1
NS dns2
MX 10 mail
ttl A 192.0.2.1
A 192.0.3.1
AAAA 2001:DB8::1
AAAA 2001:DB9::1
......@@ -2,6 +2,9 @@
'''Test for mismatched TTLs handling on slave zone load.'''
'''NOTE: dnspython can't keep different TTLs in one rrset. So we can't check
the slave server properly.'''
from dnstest.test import Test
t = Test()
......@@ -9,7 +12,7 @@ t = Test()
master = t.server("dummy")
slave = t.server("knot")
zone = t.zone("ttl-mismatch.", storage=".")
zone = t.zone("ttl-mismatch.", storage=".", exists=False)
t.link(zone, master, slave)
......@@ -18,6 +21,8 @@ slave.update_zonefile(zone, version=1)
t.start()
t.sleep(1)
# Check if the zone was loaded.
resp = slave.dig("ttl.ttl-mismatch.", "A")
resp.check(rcode="NOERROR", flags="QR AA", noflags="TC AD RA")
t.end()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment