File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,22 @@ fn validators_and_secrets_dir_flags() {
7070 } ) ;
7171}
7272
73+ #[ test]
74+ fn datadir_and_secrets_dir_flags ( ) {
75+ let dir = TempDir :: new ( ) . expect ( "Unable to create temporary directory" ) ;
76+ CommandLineTest :: new ( )
77+ . flag ( "datadir" , dir. path ( ) . join ( "data" ) . to_str ( ) )
78+ . flag ( "secrets-dir" , dir. path ( ) . join ( "secrets" ) . to_str ( ) )
79+ . run_with_no_datadir ( )
80+ . with_config ( |config| {
81+ assert_eq ! (
82+ config. validator_dir,
83+ dir. path( ) . join( "data" ) . join( "validators" )
84+ ) ;
85+ assert_eq ! ( config. secrets_dir, dir. path( ) . join( "secrets" ) ) ;
86+ } ) ;
87+ }
88+
7389#[ test]
7490fn validators_dir_alias_flags ( ) {
7591 let dir = TempDir :: new ( ) . expect ( "Unable to create temporary directory" ) ;
Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ pub struct ValidatorClient {
6767 #[ clap(
6868 long,
6969 value_name = "SECRETS_DIRECTORY" ,
70- conflicts_with = "datadir" ,
7170 help = "The directory which contains the password to unlock the validator \
7271 voting keypairs. Each password should be contained in a file where the \
7372 name is the 0x-prefixed hex representation of the validators voting public \
You can’t perform that action at this time.
0 commit comments