mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 05:48:31 +00:00
Fix incorrect VC default HTTP token path when the --datadir flag is present (#6748)
* Fix incorrect default http token path when datadir flag is present.
This commit is contained in:
@@ -345,7 +345,7 @@ fn http_store_keystore_passwords_in_secrets_dir_present() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn http_token_path_flag() {
|
||||
fn http_token_path_flag_present() {
|
||||
let dir = TempDir::new().expect("Unable to create temporary directory");
|
||||
CommandLineTest::new()
|
||||
.flag("http", None)
|
||||
@@ -359,6 +359,19 @@ fn http_token_path_flag() {
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn http_token_path_default() {
|
||||
CommandLineTest::new()
|
||||
.flag("http", None)
|
||||
.run()
|
||||
.with_config(|config| {
|
||||
assert_eq!(
|
||||
config.http_api.http_token_path,
|
||||
config.validator_dir.join("api-token.txt")
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// Tests for Metrics flags.
|
||||
#[test]
|
||||
fn metrics_flag() {
|
||||
|
||||
Reference in New Issue
Block a user