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

Route53Provider for CNAME style healthchecks

Note that you can't specify a Host header for these which I believe will
complicate the ability to use this. Figuring that out will have to wait
until I or someone else has a use case for these...
This commit is contained in:
Ross McFarland
2019-04-03 10:29:52 -07:00
parent 7b59eedc44
commit af06dbec09
2 changed files with 45 additions and 3 deletions

View File

@@ -1066,6 +1066,36 @@ class TestRoute53Provider(TestCase):
self.assertEquals('42', id)
stubber.assert_no_pending_responses()
# A CNAME style healthcheck, without a value
health_check_config = {
'EnableSNI': False,
'FailureThreshold': 6,
'FullyQualifiedDomainName': 'target-1.unit.tests.',
'MeasureLatency': True,
'Port': 8080,
'RequestInterval': 10,
'ResourcePath': '/_status',
'Type': 'HTTP'
}
stubber.add_response('create_health_check', {
'HealthCheck': {
'Id': '42',
'CallerReference': self.caller_ref,
'HealthCheckConfig': health_check_config,
'HealthCheckVersion': 1,
},
'Location': 'http://url',
}, {
'CallerReference': ANY,
'HealthCheckConfig': health_check_config,
})
stubber.add_response('change_tags_for_resource', {})
id = provider.get_health_check_id(record, 'target-1.unit.tests.', True)
self.assertEquals('42', id)
stubber.assert_no_pending_responses()
def test_health_check_measure_latency(self):
provider, stubber = self._get_stubbed_provider()
record_true = Record.new(self.expected, 'a', {