|
|
@ -1687,6 +1687,12 @@ class TestAzureDnsProvider(TestCase): |
|
|
'value': 'default.unit.tests.', |
|
|
'value': 'default.unit.tests.', |
|
|
'dynamic': { |
|
|
'dynamic': { |
|
|
'pools': { |
|
|
'pools': { |
|
|
|
|
|
'sto': { |
|
|
|
|
|
'values': [ |
|
|
|
|
|
{'value': 'sto.unit.tests.'}, |
|
|
|
|
|
], |
|
|
|
|
|
'fallback': 'iad', |
|
|
|
|
|
}, |
|
|
'iad': { |
|
|
'iad': { |
|
|
'values': [ |
|
|
'values': [ |
|
|
{'value': 'iad.unit.tests.'}, |
|
|
{'value': 'iad.unit.tests.'}, |
|
|
@ -1702,13 +1708,14 @@ class TestAzureDnsProvider(TestCase): |
|
|
'rules': [ |
|
|
'rules': [ |
|
|
{'geos': ['EU'], 'pool': 'iad'}, |
|
|
{'geos': ['EU'], 'pool': 'iad'}, |
|
|
{'geos': ['EU-GB'], 'pool': 'lhr'}, |
|
|
{'geos': ['EU-GB'], 'pool': 'lhr'}, |
|
|
|
|
|
{'geos': ['EU-SE'], 'pool': 'sto'}, |
|
|
{'pool': 'lhr'}, |
|
|
{'pool': 'lhr'}, |
|
|
], |
|
|
], |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
profiles = provider._generate_traffic_managers(record) |
|
|
profiles = provider._generate_traffic_managers(record) |
|
|
|
|
|
|
|
|
self.assertEqual(len(profiles), 3) |
|
|
|
|
|
|
|
|
self.assertEqual(len(profiles), 4) |
|
|
self.assertTrue(_profile_is_match(profiles[-1], Profile( |
|
|
self.assertTrue(_profile_is_match(profiles[-1], Profile( |
|
|
name='foo--unit--tests', |
|
|
name='foo--unit--tests', |
|
|
traffic_routing_method='Geographic', |
|
|
traffic_routing_method='Geographic', |
|
|
@ -1728,6 +1735,12 @@ class TestAzureDnsProvider(TestCase): |
|
|
target_resource_id=profiles[1].id, |
|
|
target_resource_id=profiles[1].id, |
|
|
geo_mapping=['GB', 'WORLD'], |
|
|
geo_mapping=['GB', 'WORLD'], |
|
|
), |
|
|
), |
|
|
|
|
|
Endpoint( |
|
|
|
|
|
name='rule-sto', |
|
|
|
|
|
type=nested, |
|
|
|
|
|
target_resource_id=profiles[2].id, |
|
|
|
|
|
geo_mapping=['SE'], |
|
|
|
|
|
), |
|
|
], |
|
|
], |
|
|
))) |
|
|
))) |
|
|
|
|
|
|
|
|
|