Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
badrogger committed Oct 9, 2024
1 parent dd82abe commit d2e33df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions node_cli/core/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def init_sync(
@check_user
def update_sync(env_filepath: str, unsafe_ok: bool = False) -> None:
if not unsafe_ok and not is_update_safe():
error_msg = 'Cannot update safetly'
error_msg = 'Cannot update safely'
error_exit(error_msg, exit_code=CLIExitCodes.UNSAFE_UPDATE)
logger.info('Node update started')
configure_firewall_rules()
Expand Down Expand Up @@ -274,7 +274,7 @@ def get_node_env(
@check_user
def update(env_filepath: str, pull_config_for_schain: str, unsafe_ok: bool = False) -> None:
if not unsafe_ok and not is_update_safe():
error_msg = 'Cannot update safetly'
error_msg = 'Cannot update safety'
error_exit(error_msg, exit_code=CLIExitCodes.UNSAFE_UPDATE)

logger.info('Node update started')
Expand Down Expand Up @@ -407,7 +407,7 @@ def set_maintenance_mode_off():
@check_user
def turn_off(maintenance_on: bool = False, unsafe_ok: bool = False) -> None:
if not unsafe_ok and not is_update_safe():
error_msg = 'Cannot turn off safetly'
error_msg = 'Cannot turn off safely'
error_exit(error_msg, exit_code=CLIExitCodes.UNSAFE_UPDATE)
if maintenance_on:
set_maintenance_mode_on()
Expand Down
2 changes: 1 addition & 1 deletion tests/cli/node_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def test_turn_off_maintenance_on(mocked_g_config):
_turn_off,
['--maintenance-on', '--yes'],
)
assert 'Cannot turn off safetly' in result.output
assert 'Cannot turn off safely' in result.output
assert result.exit_code == CLIExitCodes.UNSAFE_UPDATE


Expand Down
4 changes: 2 additions & 2 deletions tests/cli/sync_node_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_update_sync(mocked_g_config):
):
result = run_command(_update_sync, ['./tests/test-env', '--yes'])
assert result.exit_code == CLIExitCodes.UNSAFE_UPDATE
assert 'Cannot update safetly' in result.output
assert 'Cannot update safely' in result.output

with mock.patch(
'node_cli.utils.helper.requests.get', return_value=safe_update_api_response()
Expand All @@ -121,4 +121,4 @@ def test_update_sync(mocked_g_config):
):
result = run_command(_update_sync, ['./tests/test-env', '--yes'])
assert result.exit_code == CLIExitCodes.UNSAFE_UPDATE
assert 'Cannot update safetly' in result.output
assert 'Cannot update safely' in result.output

0 comments on commit d2e33df

Please sign in to comment.