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

Constellix customized healthcheck - code clean up

This commit is contained in:
apatserkovskyi
2021-10-27 17:57:00 +03:00
parent c8e1116461
commit cbfe327f6d
2 changed files with 39 additions and 15 deletions

View File

@@ -346,12 +346,24 @@ class TestConstellixProvider(TestCase):
self.assertEquals('Not Found', str(ctx.exception))
# Sonar Normal response
provider = ConstellixProvider('test', 'api', 'secret')
with requests_mock() as mock:
mock.get(ANY, status_code=200, text='[]')
agents = provider._sonar.agents
self.assertEquals({}, agents)
agents = provider._sonar.agents
provider = ConstellixProvider('test', 'api', 'secret', 0.01)
with requests_mock() as mock:
mock.get(ANY, status_code=200, text='[]')
agents = provider._sonar.agents
provider = ConstellixProvider('test', 'api', 'secret', 1.01)
with requests_mock() as mock:
mock.get(ANY, status_code=200, text='[]')
agents = provider._sonar.agents
provider = ConstellixProvider('test', 'api', 'secret')
# No diffs == no changes
with requests_mock() as mock:
base = 'https://api.dns.constellix.com/v1'