-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI unit-testing for all commands with at least one argument (#2352)
* Adding unit tests for all Hermes commands with at least one argument. * Instead of manually validating the flags, the validation is done by `clap` for commands `create channel`, `create connection`, `keys add` and `keys delete`. * Minor changes to the guide. * Updated the ADR 010 with the new `--yes` optional flag for the command `create channel`. --- * Updated CLI commands to take flags everywhere and updated e2e tests accordingly * Updated gm to use flags when calling Hermes * Added missing flags to e2e test for 'query client state' command * Fixed flag errors in e2e tests and removed conflicting short flag. * Removed all short flags and updated CLI commands comments * Removed forgotten short flags. * Updated Hermes guide with flags instead of positional arguments * Updated script and comment with new long flags for Hermes * Completed 'tx raw upgrade-' commands guide page. Updated Testing client upgrade guide page * Added changelog entry * Added example unit-tests to the 'keys add' command * Added value names to parameters and removed cli parsing unit-tests * Cargo fmt changes * Updated flags in order to reflect ADR 010 * Updated guide to reflect flag changes from ADR 010 * Updated gm script and e2e tests to match flag changes from ADR 010 * Fixed ADR 010 typo * Added unit-testing CLI argument parsing * Updated unit tests for CLI and improved help output * Improved 'override_usage' for commands with multiple usages * Updated Hermes guide. Removed changes for issue #2349, they will be added in a separate PR. * Removed manual validation for 'keys add' and 'keys delete' flags. * Added changelog entry * Updated unit tests for command 'clear packets' to include new optional flags * Cargo fmt * Fixed 'keys add' in ADR 010 and added shell completion unit test for case with no flag * Fix clippy warnings introduced in Rust 1.62 Co-authored-by: Romain Ruetschi <romain@informal.systems>
- Loading branch information
Showing
46 changed files
with
3,140 additions
and
153 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
.changelog/unreleased/features/ibc-relayer-cli/2358-add-unit-testing-commands.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Add unit tests for all Hermes commands with at least one argument | ||
([#2358](https://github.com/informalsystems/ibc-rs/issues/2358)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,4 +57,4 @@ Success: [ | |
}, | ||
), | ||
] | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.