]> granicus.if.org Git - pdns/commitdiff
Have a test for SOA-EDIT-INCREASE via the API
authorChristian Hofstaedtler <christian.hofstaedtler@deduktiva.com>
Thu, 6 Oct 2016 21:14:52 +0000 (23:14 +0200)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Fri, 5 Jan 2018 22:32:05 +0000 (23:32 +0100)
regression-tests.api/test_Zones.py

index a3d8bd19d5a7906f3126396237d2d0e5ad90e7aa..e5ef9cf73406e3ac407dd69a232a10d588d1ca4d 100644 (file)
@@ -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 = {