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

Add customizable NS1 monitor tcp timout settings

This commit is contained in:
Benjamin Kane
2021-10-27 09:04:50 -07:00
parent 0be6a2b74a
commit dd45f74d30
2 changed files with 29 additions and 3 deletions

View File

@@ -599,7 +599,13 @@ class TestNs1ProviderDynamic(TestCase):
'path': '/_ping',
'port': 80,
'protocol': 'HTTP',
}
},
'ns1': {
'healthcheck': {
'tcp_connect_timeout': 5000,
'tcp_response_timeout': 6000,
},
},
},
'ttl': 32,
'type': 'A',
@@ -919,6 +925,14 @@ class TestNs1ProviderDynamic(TestCase):
# No http response expected
self.assertFalse('rules' in monitor)
record._octodns['ns1']['healthcheck']['tcp_connect_timeout'] = 1234
monitor = provider._monitor_gen(record, value)
self.assertEquals(1234, monitor['config']['connect_timeout'])
record._octodns['ns1']['healthcheck']['tcp_response_timeout'] = 5678
monitor = provider._monitor_gen(record, value)
self.assertEquals(5678, monitor['config']['response_timeout'])
def test_monitor_gen_AAAA(self):
provider = Ns1Provider('test', 'api-key')