Add aliases for validator-dir flags (#3034)

## Issue Addressed

#3020

## Proposed Changes

- Alias the `validators-dir` arg to `validator-dir` in the `validator_client` subcommand.
- Alias the `validator-dir` arg to `validators-dir` in the `account_manager validator` subcommand.
- Add test for the validator_client alias.
This commit is contained in:
Mac L
2022-02-22 03:09:02 +00:00
parent 5a0b049049
commit 696de58141
4 changed files with 17 additions and 1 deletions

View File

@@ -66,6 +66,19 @@ fn validators_and_secrets_dir_flags() {
});
}
#[test]
fn validators_dir_alias_flags() {
let dir = TempDir::new().expect("Unable to create temporary directory");
CommandLineTest::new()
.flag("validator-dir", dir.path().join("validators").to_str())
.flag("secrets-dir", dir.path().join("secrets").to_str())
.run_with_no_datadir()
.with_config(|config| {
assert_eq!(config.validator_dir, dir.path().join("validators"));
assert_eq!(config.secrets_dir, dir.path().join("secrets"));
});
}
#[test]
fn beacon_nodes_flag() {
CommandLineTest::new()