mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 21:34:46 +00:00
Remove CLI conflict for secrets-dir and datadir (#7265)
Redo this PR: - https://github.com/sigp/lighthouse/pull/5480 After a regression during the switch to `clap_derive`. - https://github.com/sigp/lighthouse/pull/6300 - Remove `conflicts_with` - Add test to prevent future regression
This commit is contained in:
@@ -70,6 +70,22 @@ fn validators_and_secrets_dir_flags() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn datadir_and_secrets_dir_flags() {
|
||||||
|
let dir = TempDir::new().expect("Unable to create temporary directory");
|
||||||
|
CommandLineTest::new()
|
||||||
|
.flag("datadir", dir.path().join("data").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("data").join("validators")
|
||||||
|
);
|
||||||
|
assert_eq!(config.secrets_dir, dir.path().join("secrets"));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn validators_dir_alias_flags() {
|
fn validators_dir_alias_flags() {
|
||||||
let dir = TempDir::new().expect("Unable to create temporary directory");
|
let dir = TempDir::new().expect("Unable to create temporary directory");
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ pub struct ValidatorClient {
|
|||||||
#[clap(
|
#[clap(
|
||||||
long,
|
long,
|
||||||
value_name = "SECRETS_DIRECTORY",
|
value_name = "SECRETS_DIRECTORY",
|
||||||
conflicts_with = "datadir",
|
|
||||||
help = "The directory which contains the password to unlock the validator \
|
help = "The directory which contains the password to unlock the validator \
|
||||||
voting keypairs. Each password should be contained in a file where the \
|
voting keypairs. Each password should be contained in a file where the \
|
||||||
name is the 0x-prefixed hex representation of the validators voting public \
|
name is the 0x-prefixed hex representation of the validators voting public \
|
||||||
|
|||||||
Reference in New Issue
Block a user