Commit e0fbf312 authored by Libor Peltan's avatar Libor Peltan

tests: added test on zone-in-journal merging (dnssec usecase)

parent cc25a1dc
#!/usr/bin/env python3
'''Test of zone-in-journal: slave should merge changesets into zone-in-journal'''
from dnstest.test import Test
t = Test()
master = t.server("knot")
slave = t.server("knot")
zone = t.zone_rnd(1, records=100, dnssec=False)
t.link(zone, master, slave)
for z in master.zones:
slave.zones[z].journal_content = "none"
for z in slave.zones:
slave.zones[z].journal_content = "all"
slave.max_journal_usage = 150 * 1024
master.zonefile_sync = "0"
slave.zonefile_sync = "-1"
master.dnssec(zone).enable = "true"
t.start()
master.zone_wait(zone)
slave.zone_wait(zone)
for i in range(1, 8):
master.ctl("zone-sign")
t.sleep(2) # slave should merge the journal twice into the "bootstrap" changeset
t.sleep(2)
slave.stop()
slave.start() # now the slave starts the zone from zone-in-journal and does not XFR
slave.zone_wait(zone)
slave.ctl("zone-refresh") # this is just to ensure that he gives up
t.xfr_diff(master, slave, zone)
t.end()
......@@ -139,6 +139,7 @@ class Server(object):
self.disable_notify = None
self.zonefile_sync = "1d"
self.journal_db_size = 20 * 1024 * 1024
self.max_journal_usage = 5 * 1024 * 1024
self.timer_db_size = 1 * 1024 * 1024
self.kasp_db_size = 10 * 1024 * 1024
self.zone_size_limit = None
......@@ -1213,6 +1214,7 @@ class Knot(Server):
s.item_str("kasp-db", self.keydir)
s.item_str("max-kasp-db-size", self.kasp_db_size)
s.item_str("max-journal-db-size", self.journal_db_size)
s.item_str("max-journal-usage", self.max_journal_usage)
s.item_str("max-timer-db-size", self.timer_db_size)
s.item_str("semantic-checks", "on")
if self.disable_any:
......
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