Browse Source

Update PowerDNS tests and fixtures for NULL SRV records

pull/668/head
Mark Tearle 5 years ago
parent
commit
876a5b46f3
2 changed files with 27 additions and 3 deletions
  1. +24
    -0
      tests/fixtures/powerdns-full-data.json
  2. +3
    -3
      tests/test_octodns_provider_powerdns.py

+ 24
- 0
tests/fixtures/powerdns-full-data.json View File

@ -59,6 +59,30 @@
"ttl": 300,
"type": "A"
},
{
"comments": [],
"name": "_imap._tcp.unit.tests.",
"records": [
{
"content": "0 0 0 .",
"disabled": false
}
],
"ttl": 600,
"type": "SRV"
},
{
"comments": [],
"name": "_pop3._tcp.unit.tests.",
"records": [
{
"content": "0 0 0 .",
"disabled": false
}
],
"ttl": 600,
"type": "SRV"
},
{
"comments": [],
"name": "_srv._tcp.unit.tests.",


+ 3
- 3
tests/test_octodns_provider_powerdns.py View File

@ -186,7 +186,7 @@ class TestPowerDnsProvider(TestCase):
source = YamlProvider('test', join(dirname(__file__), 'config'))
source.populate(expected)
expected_n = len(expected.records) - 3
self.assertEquals(16, expected_n)
self.assertEquals(18, expected_n)
# No diffs == no changes
with requests_mock() as mock:
@ -194,7 +194,7 @@ class TestPowerDnsProvider(TestCase):
zone = Zone('unit.tests.', [])
provider.populate(zone)
self.assertEquals(16, len(zone.records))
self.assertEquals(18, len(zone.records))
changes = expected.changes(zone, provider)
self.assertEquals(0, len(changes))
@ -291,7 +291,7 @@ class TestPowerDnsProvider(TestCase):
expected = Zone('unit.tests.', [])
source = YamlProvider('test', join(dirname(__file__), 'config'))
source.populate(expected)
self.assertEquals(19, len(expected.records))
self.assertEquals(21, len(expected.records))
# A small change to a single record
with requests_mock() as mock:


Loading…
Cancel
Save