From: Christian Hofstaedtler Date: Thu, 6 Oct 2016 21:14:52 +0000 (+0200) Subject: Have a test for SOA-EDIT-INCREASE via the API X-Git-Tag: dnsdist-1.3.0~168^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=01f7df3fa75ac25a13ab98ec34aa491293d59997;p=pdns Have a test for SOA-EDIT-INCREASE via the API --- diff --git a/regression-tests.api/test_Zones.py b/regression-tests.api/test_Zones.py index a3d8bd19d..e5ef9cf73 100644 --- a/regression-tests.api/test_Zones.py +++ b/regression-tests.api/test_Zones.py @@ -140,6 +140,15 @@ class AuthZones(ApiTestCase, AuthZonesHelperMixin): print data self.assertEquals(data['soa_edit_api'], 'DEFAULT') + def test_create_zone_with_soa_edit(self): + name, payload, data = self.create_zone(soa_edit='INCEPTION-INCREMENT', soa_edit_api='SOA-EDIT-INCREASE') + print data + self.assertEquals(data['soa_edit'], 'INCEPTION-INCREMENT') + self.assertEquals(data['soa_edit_api'], 'SOA-EDIT-INCREASE') + soa_serial = get_first_rec(data, name, 'SOA')['content'].split(' ')[2] + # These particular settings lead to the first serial set to YYYYMMDD01. + self.assertEquals(soa_serial[-2:], '01') + def test_create_zone_with_records(self): name = unique_zone_name() rrset = {