chore: change metrics default port from 9000 to 9001 (#3295)

This commit is contained in:
Léo Vincent
2023-06-21 11:25:55 +02:00
committed by GitHub
parent 4dd9c9b25a
commit b578718eb8
6 changed files with 15 additions and 15 deletions

View File

@ -781,14 +781,14 @@ mod tests {
#[test]
fn parse_metrics_port() {
let cmd = Command::try_parse_from(["reth", "--metrics", "9000"]).unwrap();
assert_eq!(cmd.metrics, Some(SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 9000)));
let cmd = Command::try_parse_from(["reth", "--metrics", "9001"]).unwrap();
assert_eq!(cmd.metrics, Some(SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 9001)));
let cmd = Command::try_parse_from(["reth", "--metrics", ":9000"]).unwrap();
assert_eq!(cmd.metrics, Some(SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 9000)));
let cmd = Command::try_parse_from(["reth", "--metrics", ":9001"]).unwrap();
assert_eq!(cmd.metrics, Some(SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 9001)));
let cmd = Command::try_parse_from(["reth", "--metrics", "localhost:9000"]).unwrap();
assert_eq!(cmd.metrics, Some(SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 9000)));
let cmd = Command::try_parse_from(["reth", "--metrics", "localhost:9001"]).unwrap();
assert_eq!(cmd.metrics, Some(SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 9001)));
}
#[test]