Browse Source

Update Gandi 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
4105fb7ee7
2 changed files with 36 additions and 2 deletions
  1. +18
    -0
      tests/fixtures/gandi-no-changes.json
  2. +18
    -2
      tests/test_octodns_provider_gandi.py

+ 18
- 0
tests/fixtures/gandi-no-changes.json View File

@ -123,6 +123,24 @@
"2.2.3.6"
]
},
{
"rrset_type": "SRV",
"rrset_ttl": 600,
"rrset_name": "_imap._tcp",
"rrset_href": "https://api.gandi.net/v5/livedns/domains/unit.tests/records/_imap._tcp/SRV",
"rrset_values": [
"0 0 0 ."
]
},
{
"rrset_type": "SRV",
"rrset_ttl": 600,
"rrset_name": "_pop3._tcp",
"rrset_href": "https://api.gandi.net/v5/livedns/domains/unit.tests/records/_pop3._tcp/SRV",
"rrset_values": [
"0 0 0 ."
]
},
{
"rrset_type": "SRV",
"rrset_ttl": 600,


+ 18
- 2
tests/test_octodns_provider_gandi.py View File

@ -117,7 +117,7 @@ class TestGandiProvider(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))
@ -284,6 +284,22 @@ class TestGandiProvider(TestCase):
'12 20 30 foo-2.unit.tests.'
]
}),
call('POST', '/livedns/domains/unit.tests/records', data={
'rrset_name': '_pop3._tcp',
'rrset_ttl': 600,
'rrset_type': 'SRV',
'rrset_values': [
'0 0 0 .',
]
}),
call('POST', '/livedns/domains/unit.tests/records', data={
'rrset_name': '_imap._tcp',
'rrset_ttl': 600,
'rrset_type': 'SRV',
'rrset_values': [
'0 0 0 .',
]
}),
call('POST', '/livedns/domains/unit.tests/records', data={
'rrset_name': '@',
'rrset_ttl': 3600,
@ -307,7 +323,7 @@ class TestGandiProvider(TestCase):
})
])
# expected number of total calls
self.assertEquals(17, provider._client._request.call_count)
self.assertEquals(19, provider._client._request.call_count)
provider._client._request.reset_mock()


Loading…
Cancel
Save