Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename 'metrics' addr to 'admin' in tests #1429

Merged
merged 2 commits into from
Jan 4, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions linkerd/app/integration/src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub struct Listening {
pub tap: Option<SocketAddr>,
pub inbound: SocketAddr,
pub outbound: SocketAddr,
pub metrics: SocketAddr,
pub admin: SocketAddr,

pub outbound_server: Option<server::Listening>,
pub inbound_server: Option<server::Listening>,
Expand Down Expand Up @@ -411,7 +411,7 @@ async fn run(proxy: Proxy, mut env: TestEnv, random_ports: bool) -> Listening {
})
.expect("spawn");

let (tap_addr, identity_addr, inbound_addr, outbound_addr, metrics_addr) =
let (tap_addr, identity_addr, inbound_addr, outbound_addr, admin_addr) =
running_rx.await.unwrap();

tracing::info!(
Expand All @@ -421,14 +421,14 @@ async fn run(proxy: Proxy, mut env: TestEnv, random_ports: bool) -> Listening {
inbound.orig_dst = ?inbound,
outbound.addr = ?outbound_addr,
outbound.orig_dst = ?outbound,
metrics.addr = ?metrics_addr,
metrics.addr = ?admin_addr,
);

Listening {
tap: tap_addr.map(Into::into),
inbound: inbound_addr.into(),
outbound: outbound_addr.into(),
metrics: metrics_addr.into(),
admin: admin_addr.into(),

outbound_server: proxy.outbound_server,
inbound_server: proxy.inbound_server,
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/integration/src/tests/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ mod http2 {
.run()
.await;
let client = client::http2(proxy.outbound, host);
let metrics = client::http1(proxy.metrics, "localhost");
let metrics = client::http1(proxy.admin, "localhost");

assert_eq!(client.get("/").await, "hello");

Expand Down
12 changes: 6 additions & 6 deletions linkerd/app/integration/src/tests/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ macro_rules! generate_tls_accept_test {
.run_with_test_env(id_svc.env)
.await;

tracing::info!("non-tls request to {}", proxy.metrics);
let non_tls_client = $make_client_non_tls(proxy.metrics, "localhost");
tracing::info!("non-tls request to {}", proxy.admin);
let non_tls_client = $make_client_non_tls(proxy.admin, "localhost");
assert_eventually!(
non_tls_client
.request(non_tls_client.request_builder("/ready").method("GET"))
Expand All @@ -72,9 +72,9 @@ macro_rules! generate_tls_accept_test {
== http::StatusCode::OK
);

tracing::info!("tls request to {}", proxy.metrics);
tracing::info!("tls request to {}", proxy.admin);
let tls_client = $make_client_tls(
proxy.metrics,
proxy.admin,
"localhost",
client::TlsConfig::new(id_svc.client_config, id),
);
Expand Down Expand Up @@ -111,7 +111,7 @@ macro_rules! generate_tls_reject_test {
let proxy = proxy::new().identity(id_svc).run_with_test_env(env).await;

let client = $make_client(
proxy.metrics,
proxy.admin,
"localhost",
client::TlsConfig::new(client_config, id),
);
Expand Down Expand Up @@ -171,7 +171,7 @@ async fn ready() {

let proxy = proxy::new().identity(id_svc).run_with_test_env(env).await;

let client = client::http1(proxy.metrics, "localhost");
let client = client::http1(proxy.admin, "localhost");

let ready = || async {
client
Expand Down
10 changes: 5 additions & 5 deletions linkerd/app/integration/src/tests/profile_dst_overrides.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ async fn add_a_dst_override() {
.run()
.await;
let client = client::http1(proxy.outbound, apex_svc.authority());
let metrics = client::http1(proxy.metrics, "localhost");
let metrics = client::http1(proxy.admin, "localhost");

let n = 100;

Expand Down Expand Up @@ -149,7 +149,7 @@ async fn add_multiple_dst_overrides() {
.await;

let client = client::http1(proxy.outbound, apex_svc.authority());
let metrics = client::http1(proxy.metrics, "localhost");
let metrics = client::http1(proxy.admin, "localhost");

let n = 100;

Expand Down Expand Up @@ -214,7 +214,7 @@ async fn set_a_dst_override_weight_to_zero() {
.await;

let client = client::http1(proxy.outbound, apex_svc.authority());
let metrics = client::http1(proxy.metrics, "localhost");
let metrics = client::http1(proxy.admin, "localhost");

let n = 100;

Expand Down Expand Up @@ -284,7 +284,7 @@ async fn set_all_dst_override_weights_to_zero() {
.await;

let client = client::http1(proxy.outbound, apex_svc.authority());
let metrics = client::http1(proxy.metrics, "localhost");
let metrics = client::http1(proxy.admin, "localhost");

let n = 100;

Expand Down Expand Up @@ -346,7 +346,7 @@ async fn remove_a_dst_override() {
.await;

let client = client::http1(proxy.outbound, apex_svc.authority());
let metrics = client::http1(proxy.metrics, "localhost");
let metrics = client::http1(proxy.admin, "localhost");

let n = 100;

Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/integration/src/tests/profiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ macro_rules! profile_test {

let client = client::$http(proxy.outbound, host);

let metrics = client::http1(proxy.metrics, "localhost");
let metrics = client::http1(proxy.admin, "localhost");

// Poll metrics until we recognize the profile is loaded...
loop {
Expand Down
12 changes: 6 additions & 6 deletions linkerd/app/integration/src/tests/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Fixture {
.inbound(srv)
.run()
.await;
let metrics = client::http1(proxy.metrics, "localhost");
let metrics = client::http1(proxy.admin, "localhost");

let client = client::new(proxy.inbound, "tele.test.svc.cluster.local");
let tcp_dst_labels = metrics::labels().label("direction", "inbound");
Expand Down Expand Up @@ -83,7 +83,7 @@ impl Fixture {
.outbound(srv)
.run()
.await;
let metrics = client::http1(proxy.metrics, "localhost");
let metrics = client::http1(proxy.admin, "localhost");

let client = client::new(proxy.outbound, "tele.test.svc.cluster.local");
let tcp_labels = metrics::labels()
Expand Down Expand Up @@ -137,7 +137,7 @@ impl TcpFixture {
.await;

let client = client::tcp(proxy.inbound);
let metrics = client::http1(proxy.metrics, "localhost");
let metrics = client::http1(proxy.admin, "localhost");

let src_labels = metrics::labels()
.label("direction", "inbound")
Expand Down Expand Up @@ -175,7 +175,7 @@ impl TcpFixture {
.await;

let client = client::tcp(proxy.outbound);
let metrics = client::http1(proxy.metrics, "localhost");
let metrics = client::http1(proxy.admin, "localhost");

let src_labels = metrics::labels()
.label("direction", "outbound")
Expand Down Expand Up @@ -530,7 +530,7 @@ mod outbound_dst_labels {
.outbound(srv)
.run()
.await;
let metrics = client::http1(proxy.metrics, "localhost");
let metrics = client::http1(proxy.admin, "localhost");

let client = client::new(proxy.outbound, dest);
let tcp_labels = metrics::labels()
Expand Down Expand Up @@ -852,7 +852,7 @@ async fn metrics_have_no_double_commas() {
.run()
.await;
let client = client::new(proxy.inbound, "tele.test.svc.cluster.local");
let metrics = client::http1(proxy.metrics, "localhost");
let metrics = client::http1(proxy.admin, "localhost");

let scrape = metrics.get("/metrics").await;
assert!(!scrape.contains(",,"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl Test {
let proxy = proxy.identity(id_svc).run_with_test_env(env).await;

// Wait for the proxy's identity to be certified.
let admin_client = client::http1(proxy.metrics, "localhost");
let admin_client = client::http1(proxy.admin, "localhost");
assert_eventually!(
admin_client
.request(admin_client.request_builder("/ready").method("GET"))
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/integration/src/tests/transparency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ async fn retry_reconnect_errors() {
.await;
let proxy = proxy::new().inbound(srv).run().await;
let client = client::http2(proxy.inbound, "transparency.example.com");
let metrics = client::http1(proxy.metrics, "localhost");
let metrics = client::http1(proxy.admin, "localhost");

let fut = client.request(client.request_builder("/").version(http::Version::HTTP_2));

Expand Down