Skip to content

Commit 40fc1c4

Browse files
committed
Fix tests
1 parent bd5cd21 commit 40fc1c4

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

node_cli/core/node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def restore(backup_path, env_filepath, node_type: NodeType, no_snapshot=False, c
173173
restored_ok = restore_op(env, backup_path, node_type=node_type, config_only=config_only)
174174
if not restored_ok:
175175
error_exit('Restore operation failed', exit_code=CLIExitCodes.OPERATION_EXECUTION_ERROR)
176-
# time.sleep(RESTORE_SLEEP_TIMEOUT)
176+
time.sleep(RESTORE_SLEEP_TIMEOUT)
177177
logger.info('Generating resource allocation file ...')
178178
update_resource_allocation(env['ENV_TYPE'])
179179
print('Node is restored from backup')

tests/cli/node_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def test_turn_off_maintenance_on(mocked_g_config, regular_user_conf):
390390
resp_mock = response_mock(requests.codes.ok, {'status': 'ok', 'payload': None})
391391
with (
392392
mock.patch('subprocess.run', new=subprocess_run_mock),
393-
mock.patch('node_cli.core.node.INIT_ENV_FILEPATH', regular_user_conf.as_posix()),
393+
mock.patch('node_cli.core.node.SKALE_DIR_ENV_FILEPATH', regular_user_conf.as_posix()),
394394
mock.patch('node_cli.core.node.turn_off_op'),
395395
mock.patch('node_cli.utils.decorators.is_node_inited', return_value=True),
396396
mock.patch('node_cli.configs.user.validate_alias_or_address'),
@@ -426,7 +426,8 @@ def test_turn_on_maintenance_off(mocked_g_config, regular_user_conf):
426426
mock.patch('node_cli.core.node.turn_on_op'),
427427
mock.patch('node_cli.core.node.is_base_containers_alive'),
428428
mock.patch('node_cli.utils.decorators.is_node_inited', return_value=True),
429-
patch('node_cli.configs.user.validate_alias_or_address'),
429+
mock.patch('node_cli.configs.user.validate_alias_or_address'),
430+
mock.patch('node_cli.cli.node.TYPE', NodeType.REGULAR)
430431
):
431432
result = run_command_mock(
432433
'node_cli.utils.helper.requests.post',

0 commit comments

Comments
 (0)