mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-29 18:53:32 +00:00
Add CLI flag for HTTP API token path (VC) (#6577)
* Add cli flag for HTTP API token path (VC) * Add http_token_path_flag test * Add pre-check for directory case & Fix test utils * Update docs * Apply review: move http_token_path into validator_http_api config * Lint * Make diff lesser to replace PK_FILENAME * Merge branch 'unstable' into feature/cli-token-path * Applt review: help_vc.md Co-authored-by: chonghe <44791194+chong-he@users.noreply.github.com> * Fix help for cli * Fix issues on ci * Merge branch 'unstable' into feature/cli-token-path * Merge branch 'unstable' into feature/cli-token-path * Merge branch 'unstable' into feature/cli-token-path * Merge branch 'unstable' into feature/cli-token-path
This commit is contained in:
@@ -344,6 +344,21 @@ fn http_store_keystore_passwords_in_secrets_dir_present() {
|
||||
.with_config(|config| assert!(config.http_api.store_passwords_in_secrets_dir));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn http_token_path_flag() {
|
||||
let dir = TempDir::new().expect("Unable to create temporary directory");
|
||||
CommandLineTest::new()
|
||||
.flag("http", None)
|
||||
.flag("http-token-path", dir.path().join("api-token.txt").to_str())
|
||||
.run()
|
||||
.with_config(|config| {
|
||||
assert_eq!(
|
||||
config.http_api.http_token_path,
|
||||
dir.path().join("api-token.txt")
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// Tests for Metrics flags.
|
||||
#[test]
|
||||
fn metrics_flag() {
|
||||
|
||||
Reference in New Issue
Block a user