Skip to content

Commit

Permalink
Adding exit keystore cli test for invalid keystore file
Browse files Browse the repository at this point in the history
  • Loading branch information
valefar-on-discord committed Apr 22, 2024
1 parent 6fe5374 commit 3987239
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/test_cli/test_exit_transaction_keystore.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,33 @@ def test_invalid_keystore_path() -> None:
my_folder_path = os.path.join(os.getcwd(), 'TESTING_TEMP_FOLDER')
clean_exit_transaction_folder(my_folder_path)

invalid_keystore_file = os.path.join(os.getcwd(), 'README.md')

runner = CliRunner()
inputs = []
data = '\n'.join(inputs)
arguments = [
'--language', 'english',
'--non_interactive',
'exit-transaction-keystore',
'--output_folder', my_folder_path,
'--chain', "mainnet",
'--keystore', invalid_keystore_file,
'--keystore_password', "password",
'--validator_index', '1',
'--epoch', '1234',
]
result = runner.invoke(cli, arguments, input=data)

assert result.exit_code == 2

clean_exit_transaction_folder(my_folder_path)


def test_invalid_keystore_file() -> None:
my_folder_path = os.path.join(os.getcwd(), 'TESTING_TEMP_FOLDER')
clean_exit_transaction_folder(my_folder_path)

runner = CliRunner()
inputs = []
data = '\n'.join(inputs)
Expand Down

0 comments on commit 3987239

Please sign in to comment.