1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Update Gandi tests and fixtures for NULL SRV records

Thanks to @yzguy for assisting with API tests to confirm support
This commit is contained in:
Mark Tearle
2020-12-29 17:06:50 +08:00
parent 876a5b46f3
commit 4105fb7ee7
2 changed files with 36 additions and 2 deletions

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,

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()