mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Merge branch 'master' into tcp-healthcheck-support
This commit is contained in:
@@ -766,8 +766,7 @@ class Ns1Provider(BaseProvider):
|
||||
for iso_region, target in record.geo.items():
|
||||
key = 'iso_region_code'
|
||||
value = iso_region
|
||||
if not has_country and \
|
||||
len(value.split('-')) > 1: # pragma: nocover
|
||||
if not has_country and len(value.split('-')) > 1:
|
||||
has_country = True
|
||||
for answer in target.values:
|
||||
params['answers'].append(
|
||||
|
@@ -26,6 +26,12 @@ export DYN_PASSWORD=
|
||||
export DYN_USERNAME=
|
||||
export GOOGLE_APPLICATION_CREDENTIALS=
|
||||
|
||||
# Don't allow disabling coverage
|
||||
grep -r -I --line-number "# pragma: nocover" octodns && {
|
||||
echo "Code coverage should not be disabled"
|
||||
exit 1
|
||||
}
|
||||
|
||||
coverage run --branch --source=octodns --omit=octodns/cmds/* "$(command -v nosetests)" --with-xunit "$@"
|
||||
coverage html
|
||||
coverage xml
|
||||
|
@@ -1066,6 +1066,16 @@ class TestNs1ProviderDynamic(TestCase):
|
||||
call(self.record, '3.4.5.6', 'mid-3'),
|
||||
])
|
||||
|
||||
record = Record.new(self.zone, 'geo', {
|
||||
'ttl': 34,
|
||||
'type': 'A',
|
||||
'values': ['101.102.103.104', '101.102.103.105'],
|
||||
'geo': {'EU': ['201.202.203.204']},
|
||||
'meta': {},
|
||||
})
|
||||
params, _ = provider._params_for_geo_A(record)
|
||||
self.assertEquals([], params['filters'])
|
||||
|
||||
def test_data_for_dynamic_A(self):
|
||||
provider = Ns1Provider('test', 'api-key')
|
||||
|
||||
|
Reference in New Issue
Block a user