mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 06:14:38 +00:00
Configurable monitoring endpoint frequency (#3530)
## Issue Addressed Closes #3514 ## Proposed Changes - Change default monitoring endpoint frequency to 120 seconds to fit with 30k requests/month limit. - Allow configuration of the monitoring endpoint frequency using `--monitoring-endpoint-frequency N` where `N` is a value in seconds.
This commit is contained in:
@@ -443,3 +443,16 @@ fn no_strict_fee_recipient_flag() {
|
||||
.run()
|
||||
.with_config(|config| assert!(!config.strict_fee_recipient));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn monitoring_endpoint() {
|
||||
CommandLineTest::new()
|
||||
.flag("monitoring-endpoint", Some("http://example:8000"))
|
||||
.flag("monitoring-endpoint-period", Some("30"))
|
||||
.run()
|
||||
.with_config(|config| {
|
||||
let api_conf = config.monitoring_api.as_ref().unwrap();
|
||||
assert_eq!(api_conf.monitoring_endpoint.as_str(), "http://example:8000");
|
||||
assert_eq!(api_conf.update_period_secs, Some(30));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user