small fixed for some failing tests
This commit is contained in:
parent
51b885e7db
commit
ef66349674
@ -7,6 +7,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
EMERGENCY_PRIORITY = 2
|
||||
|
||||
|
||||
def initialize_monitor(
|
||||
ping_url, config, config_filename, monitoring_log_level, dry_run
|
||||
): # pragma: no cover
|
||||
@ -29,7 +30,7 @@ def ping_monitor(hook_config, config, config_filename, state, monitoring_log_lev
|
||||
|
||||
dry_run_label = ' (dry run; not actually updating)' if dry_run else ''
|
||||
|
||||
state_config = hook_config.get(state.name.lower())
|
||||
state_config = hook_config.get(state.name.lower(), {})
|
||||
|
||||
token = hook_config.get('token')
|
||||
user = hook_config.get('user')
|
||||
@ -52,7 +53,7 @@ def ping_monitor(hook_config, config, config_filename, state, monitoring_log_lev
|
||||
'user': user,
|
||||
'message': state.name.lower(), # default to state name. Can be overwritten in state_config loop below.
|
||||
}
|
||||
|
||||
|
||||
for key in state_config:
|
||||
data[key] = state_config[key]
|
||||
|
||||
|
@ -127,7 +127,7 @@ def test_ping_monitor_start_state_backup_default_message_with_priority_emergency
|
||||
'message': 'start',
|
||||
'priority': 2,
|
||||
'retry': 30,
|
||||
'expire': 1200,
|
||||
'expire': 600,
|
||||
},
|
||||
).and_return(flexmock(ok=True)).once()
|
||||
|
||||
@ -257,7 +257,7 @@ def test_ping_monitor_start_state_backup_based_on_documentation_advanced_example
|
||||
'fail': {
|
||||
'message': 'Backup <font color="#ff6961">Failed</font>',
|
||||
'priority': 2,
|
||||
'expire': 1200,
|
||||
'expire': 600,
|
||||
'retry': 30,
|
||||
'device': 'pixel8',
|
||||
'title': 'Backup Failed',
|
||||
@ -318,7 +318,7 @@ def test_ping_monitor_fail_state_backup_based_on_documentation_advanced_example_
|
||||
'fail': {
|
||||
'message': 'Backup <font color="#ff6961">Failed</font>',
|
||||
'priority': 2,
|
||||
'expire': 1200,
|
||||
'expire': 600,
|
||||
'retry': 30,
|
||||
'device': 'pixel8',
|
||||
'title': 'Backup Failed',
|
||||
@ -346,7 +346,7 @@ def test_ping_monitor_fail_state_backup_based_on_documentation_advanced_example_
|
||||
'user': '983hfe0of902lkjfa2amanfgui',
|
||||
'message': 'Backup <font color="#ff6961">Failed</font>',
|
||||
'priority': 2,
|
||||
'expire': 1200,
|
||||
'expire': 600,
|
||||
'retry': 30,
|
||||
'device': 'pixel8',
|
||||
'title': 'Backup Failed',
|
||||
@ -384,7 +384,7 @@ def test_ping_monitor_finish_state_backup_based_on_documentation_advanced_exampl
|
||||
'fail': {
|
||||
'message': 'Backup <font color="#ff6961">Failed</font>',
|
||||
'priority': 2,
|
||||
'expire': 1200,
|
||||
'expire': 600,
|
||||
'retry': 30,
|
||||
'device': 'pixel8',
|
||||
'title': 'Backup Failed',
|
||||
|
Loading…
x
Reference in New Issue
Block a user