Skip to content

Commit

Permalink
[fix] hotfix for commands positions
Browse files Browse the repository at this point in the history
Signed-off-by: alexstroke <111361420+astrokov7@users.noreply.github.com>
  • Loading branch information
AlexStroke committed Feb 21, 2024
1 parent d0bf9ee commit 725cf64
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client_cli/pytests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ The variables:

```shell
CLIENT_CLI_BINARY=/path/to/iroha_client_cli
CLIENT_CLI_CONFIG=/path/to/config.toml
CLIENT_CLI_CONFIG=/path/to/client.toml
TORII_API_PORT_MIN=8080
TORII_API_PORT_MAX=8083
```
Expand Down
6 changes: 3 additions & 3 deletions client_cli/pytests/src/client_cli/client_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def domain(self, domain: str):
:return: The current ClientCli object.
:rtype: ClientCli
"""
self.command.insert(3, "domain")
self.command.insert(2, "domain")
self.command.append("--id=" + domain)
self.execute()
return self
Expand All @@ -147,7 +147,7 @@ def account(self, account: str, domain: str, key: str):
:return: The current ClientCli object.
:rtype: ClientCli
"""
self.command.insert(3, "account")
self.command.insert(2, "account")
self.command.append("--id=" + account + "@" + domain)
self.command.append("--key=ed0120" + key)
self.execute()
Expand All @@ -166,7 +166,7 @@ def asset(self, asset_definition=None, account=None, value_of_value_type=None):
:return: The current ClientCli object.
:rtype: ClientCli
"""
self.command.insert(3, "asset")
self.command.insert(2, "asset")
if asset_definition and account and value_of_value_type:
self.command.append(
"--asset-id="
Expand Down
4 changes: 4 additions & 0 deletions client_cli/pytests/src/client_cli/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ def load(self, path_config_client_cli):
"""
if not os.path.exists(path_config_client_cli):
raise IOError(f"No config file found at {path_config_client_cli}")

if not os.path.isfile(path_config_client_cli):
raise IOError(f"The path is not a file: {path_config_client_cli}")

with open(path_config_client_cli, "r", encoding="utf-8") as config_file:
self._config = tomlkit.load(config_file)
self.file = path_config_client_cli
Expand Down
2 changes: 1 addition & 1 deletion client_cli/pytests/src/client_cli/iroha.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def _execute_command(self, command_name: str):
:param command_name: The name of the command to execute.
:type command_name: str
"""
self.command.insert(3, command_name)
self.command.insert(2, command_name)
self.execute()

def should(self, *args, **kwargs):
Expand Down

0 comments on commit 725cf64

Please sign in to comment.