Browse Source

Update Constellix tests and fixtures for NULL SRV records

Thanks to @yzguy for assisting with API tests to confirm support
pull/668/head
Mark Tearle 5 years ago
parent
commit
ae65311a96
2 changed files with 59 additions and 3 deletions
  1. +56
    -0
      tests/fixtures/constellix-records.json
  2. +3
    -3
      tests/test_octodns_provider_constellix.py

+ 56
- 0
tests/fixtures/constellix-records.json View File

@ -64,6 +64,62 @@
"roundRobinFailover": [],
"pools": [],
"poolsDetail": []
}, {
"id": 1898527,
"type": "SRV",
"recordType": "srv",
"name": "_imap._tcp",
"recordOption": "roundRobin",
"noAnswer": false,
"note": "",
"ttl": 600,
"gtdRegion": 1,
"parentId": 123123,
"parent": "domain",
"source": "Domain",
"modifiedTs": 1565149714387,
"value": [{
"value": ".",
"priority": 0,
"weight": 0,
"port": 0,
"disableFlag": false
}],
"roundRobin": [{
"value": ".",
"priority": 0,
"weight": 0,
"port": 0,
"disableFlag": false
}]
}, {
"id": 1898528,
"type": "SRV",
"recordType": "srv",
"name": "_pop3._tcp",
"recordOption": "roundRobin",
"noAnswer": false,
"note": "",
"ttl": 600,
"gtdRegion": 1,
"parentId": 123123,
"parent": "domain",
"source": "Domain",
"modifiedTs": 1565149714387,
"value": [{
"value": ".",
"priority": 0,
"weight": 0,
"port": 0,
"disableFlag": false
}],
"roundRobin": [{
"value": ".",
"priority": 0,
"weight": 0,
"port": 0,
"disableFlag": false
}]
}, {
"id": 1808527,
"type": "SRV",


+ 3
- 3
tests/test_octodns_provider_constellix.py View File

@ -101,14 +101,14 @@ class TestConstellixProvider(TestCase):
zone = Zone('unit.tests.', [])
provider.populate(zone)
self.assertEquals(14, len(zone.records))
self.assertEquals(16, len(zone.records))
changes = self.expected.changes(zone, provider)
self.assertEquals(0, len(changes))
# 2nd populate makes no network calls/all from cache
again = Zone('unit.tests.', [])
provider.populate(again)
self.assertEquals(14, len(again.records))
self.assertEquals(16, len(again.records))
# bust the cache
del provider._zone_records[zone.name]
@ -163,7 +163,7 @@ class TestConstellixProvider(TestCase):
}),
])
self.assertEquals(17, provider._client._request.call_count)
self.assertEquals(19, provider._client._request.call_count)
provider._client._request.reset_mock()


Loading…
Cancel
Save