CLI tests for logging flags (#3609)

## Issue Addressed
Adding CLI tests for logging flags: log-color and disable-log-timestamp
Which issue # does this PR address?
#3588 
## Proposed Changes
Add CLI tests for logging flags as described in #3588 
Please list or describe the changes introduced by this PR.
Added logger_config to client::Config as suggested. Implemented Default for LoggerConfig based on what was being done elsewhere in the repo. Created 2 tests for each flag addressed.
## Additional Info

Please provide any additional information. For example, future considerations
or information useful for reviewers.
This commit is contained in:
GeemoCandama
2022-10-04 08:33:40 +00:00
parent 8728c40102
commit 6a92bf70e4
10 changed files with 85 additions and 31 deletions

View File

@@ -1,11 +1,11 @@
use directory::DEFAULT_ROOT_DIR;
use environment::LoggerConfig;
use network::NetworkConfig;
use sensitive_url::SensitiveUrl;
use serde_derive::{Deserialize, Serialize};
use std::fs;
use std::path::PathBuf;
use types::{Graffiti, PublicKeyBytes};
/// Default directory name for the freezer database under the top-level data dir.
const DEFAULT_FREEZER_DB_DIR: &str = "freezer_db";
@@ -72,6 +72,7 @@ pub struct Config {
pub http_metrics: http_metrics::Config,
pub monitoring_api: Option<monitoring_api::Config>,
pub slasher: Option<slasher::Config>,
pub logger_config: LoggerConfig,
}
impl Default for Config {
@@ -96,6 +97,7 @@ impl Default for Config {
slasher: None,
validator_monitor_auto: false,
validator_monitor_pubkeys: vec![],
logger_config: LoggerConfig::default(),
}
}
}