Commit 67caead6 authored by Daniel Salzman's avatar Daniel Salzman

tests-extra: fix ixfr/add_existing and add ixfr/remove_nonexisting

parent 76f7c121
......@@ -11,7 +11,7 @@ slave = t.server("knot")
zone = t.zone("existing.", storage=".")
t.link(zone, master, slave)
t.link(zone, master, slave, ixfr=True)
# Insert the record to slave zone file (no SOA serial change).
slave.update_zonefile(zone, version=2)
......
$ORIGIN existing.
$TTL 3600
@ SOA dns1 hostmaster 2010111201 10800 3600 1209600 7200
NS dns1
NS dns2
MX 10 mail
dns1 A 192.0.2.1
AAAA 2001:DB8::1
dns2 A 192.0.2.2
AAAA 2001:DB8::2
mail A 192.0.2.3
AAAA 2001:DB8::3
node A 1.2.3.4
$ORIGIN existing.
$TTL 3600
@ SOA dns1 hostmaster 2010111202 10800 3600 1209600 7200
NS dns1
NS dns2
MX 10 mail
dns1 A 192.0.2.1
AAAA 2001:DB8::1
dns2 A 192.0.2.2
AAAA 2001:DB8::2
mail A 192.0.2.3
AAAA 2001:DB8::3
$ORIGIN existing.
$TTL 3600
@ SOA dns1 hostmaster 2010111201 10800 3600 1209600 7200
NS dns1
NS dns2
MX 10 mail
dns1 A 192.0.2.1
AAAA 2001:DB8::1
dns2 A 192.0.2.2
AAAA 2001:DB8::2
mail A 192.0.2.3
AAAA 2001:DB8::3
#!/usr/bin/env python3
'''Test for record removal over IXFR to slave zone which doesn't contain this record'''
from dnstest.test import Test
t = Test()
master = t.server("bind")
slave = t.server("knot")
zone = t.zone("existing.", storage=".")
t.link(zone, master, slave, ixfr=True)
# Remove the record from slave zone file (no SOA serial change).
slave.update_zonefile(zone, version=2)
t.start()
# Wait for zones.
serial = master.zone_wait(zone)
slave.zone_wait(zone)
# Update master file without the record (new SOA serial).
master.update_zonefile(zone, version=1)
master.reload()
# Wait for zones and compare them.
master.zone_wait(zone, serial)
slave.zone_wait(zone, serial)
t.xfr_diff(master, slave, zone)
t.end()
......@@ -739,8 +739,8 @@ class Bind(Server):
s.item("type", "master")
s.item("notify", "explicit")
if z.ixfr and not z.ddns:
s.item("ixfr-from-differences", "yes")
if z.ixfr and not z.master:
s.item("ixfr-from-differences", "yes")
if z.slaves:
slaves = ""
......
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