added tests to make sure unsupported log states are detected
Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
This commit is contained in:
parent
4fcfddbe08
commit
98e429594e
2 changed files with 20 additions and 0 deletions
|
@ -102,3 +102,13 @@ def test_ping_monitor_with_other_error_logs_warning():
|
|||
monitoring_log_level=1,
|
||||
dry_run=False,
|
||||
)
|
||||
|
||||
|
||||
def test_ping_monitor_with_unsupported_monitoring_state():
|
||||
hook_config = {'ping_url': 'https://example.com'}
|
||||
flexmock(module.logger).should_receive("debug").once().with_args(
|
||||
'{}: Ignoring unsupported monitoring {} in Cronhub hook'.format("config.yaml", "log")
|
||||
)
|
||||
module.ping_monitor(
|
||||
hook_config, 'config.yaml', module.monitor.State.LOG, monitoring_log_level=1, dry_run=False,
|
||||
)
|
||||
|
|
|
@ -87,3 +87,13 @@ def test_ping_monitor_with_other_error_logs_warning():
|
|||
monitoring_log_level=1,
|
||||
dry_run=False,
|
||||
)
|
||||
|
||||
|
||||
def test_ping_monitor_with_unsupported_monitoring_state():
|
||||
hook_config = {'ping_url': 'https://example.com'}
|
||||
flexmock(module.logger).should_receive("debug").once().with_args(
|
||||
'{}: Ignoring unsupported monitoring {} in Cronitor hook'.format("config.yaml", "log")
|
||||
)
|
||||
module.ping_monitor(
|
||||
hook_config, 'config.yaml', module.monitor.State.LOG, monitoring_log_level=1, dry_run=False,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue