Commit 41b79e9e authored by Daniel Salzman's avatar Daniel Salzman

tests-extra: improve ttl-slave test

parent 4232da99
; 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
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 ="ttl-mismatch.", storage=".")
zone ="ttl-mismatch.", storage=".", exists=False), master, slave)
......@@ -18,6 +21,8 @@ slave.update_zonefile(zone, version=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")
Markdown is supported
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