Commit 8a5ed2af authored by Libor Peltan's avatar Libor Peltan Committed by Daniel Salzman

tests: adapted to new behaviour

parent 146ca89a
#!/usr/bin/env python3 #!/usr/bin/env python3
'''Test for reload of a changed zone (serial up, nochange, serial down). ''' '''Test for reload of a changed zone (serial up, nochange, serial down).'''
from dnstest.test import Test from dnstest.test import Test
from dnstest.utils import set_err, detail_log from dnstest.utils import set_err, detail_log
...@@ -19,7 +19,7 @@ t.start() ...@@ -19,7 +19,7 @@ t.start()
# Load zones # Load zones
serial = master.zone_wait(zone) serial = master.zone_wait(zone)
def reload_zone(serial, version, exp_serial, exp_version): def reload_zone(version, exp_serial, exp_version):
master.update_zonefile(zone, version) master.update_zonefile(zone, version)
master.reload() master.reload()
new_serial = master.zone_wait(zone) new_serial = master.zone_wait(zone)
...@@ -31,17 +31,13 @@ def reload_zone(serial, version, exp_serial, exp_version): ...@@ -31,17 +31,13 @@ def reload_zone(serial, version, exp_serial, exp_version):
resp.check(rcode="NOERROR") resp.check(rcode="NOERROR")
# Zone changes, serial increases (create changeset) # Zone changes, serial increases (create changeset)
version = 1 reload_zone(1, serial + 1, 1)
serial = serial + 1
reload_zone(serial, version, serial, version)
# Zone changes, serial doesn't change (no new changeset) # Zone changes, serial doesn't change (create changeset, increment serial automatically)
version += 1 reload_zone(2, serial + 2, 2)
reload_zone(serial, version, serial, version - 1)
# Zone changes, serial jumps out-of-range (journal is not applicable) # Zone changes, serial jumps out-of-range (journal is not applicable)
version += 1 reload_zone(3, serial + 2, 2)
reload_zone(serial - 2, version, serial, version - 2)
# Stop master. # Stop master.
master.stop() master.stop()
......
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