Skip to content

Commit 98e8b2e

Browse files
authored
tests: rename 'metrics' addr to 'admin' (#1429)
This change renames the address in integration tests to be consistent with the name used in the proxy. Signed-off-by: Aaron Friel <mayreply@aaronfriel.com>
1 parent f1df316 commit 98e8b2e

File tree

9 files changed

+27
-27
lines changed

9 files changed

+27
-27
lines changed

linkerd/app/integration/src/proxy.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub struct Listening {
3737
pub tap: Option<SocketAddr>,
3838
pub inbound: SocketAddr,
3939
pub outbound: SocketAddr,
40-
pub metrics: SocketAddr,
40+
pub admin: SocketAddr,
4141

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

414-
let (tap_addr, identity_addr, inbound_addr, outbound_addr, metrics_addr) =
414+
let (tap_addr, identity_addr, inbound_addr, outbound_addr, admin_addr) =
415415
running_rx.await.unwrap();
416416

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

427427
Listening {
428428
tap: tap_addr.map(Into::into),
429429
inbound: inbound_addr.into(),
430430
outbound: outbound_addr.into(),
431-
metrics: metrics_addr.into(),
431+
admin: admin_addr.into(),
432432

433433
outbound_server: proxy.outbound_server,
434434
inbound_server: proxy.inbound_server,

linkerd/app/integration/src/tests/discovery.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ mod http2 {
373373
.run()
374374
.await;
375375
let client = client::http2(proxy.outbound, host);
376-
let metrics = client::http1(proxy.metrics, "localhost");
376+
let metrics = client::http1(proxy.admin, "localhost");
377377

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

linkerd/app/integration/src/tests/identity.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ macro_rules! generate_tls_accept_test {
6161
.run_with_test_env(id_svc.env)
6262
.await;
6363

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

75-
tracing::info!("tls request to {}", proxy.metrics);
75+
tracing::info!("tls request to {}", proxy.admin);
7676
let tls_client = $make_client_tls(
77-
proxy.metrics,
77+
proxy.admin,
7878
"localhost",
7979
client::TlsConfig::new(id_svc.client_config, id),
8080
);
@@ -111,7 +111,7 @@ macro_rules! generate_tls_reject_test {
111111
let proxy = proxy::new().identity(id_svc).run_with_test_env(env).await;
112112

113113
let client = $make_client(
114-
proxy.metrics,
114+
proxy.admin,
115115
"localhost",
116116
client::TlsConfig::new(client_config, id),
117117
);
@@ -171,7 +171,7 @@ async fn ready() {
171171

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

174-
let client = client::http1(proxy.metrics, "localhost");
174+
let client = client::http1(proxy.admin, "localhost");
175175

176176
let ready = || async {
177177
client

linkerd/app/integration/src/tests/profile_dst_overrides.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ async fn add_a_dst_override() {
8787
.run()
8888
.await;
8989
let client = client::http1(proxy.outbound, apex_svc.authority());
90-
let metrics = client::http1(proxy.metrics, "localhost");
90+
let metrics = client::http1(proxy.admin, "localhost");
9191

9292
let n = 100;
9393

@@ -149,7 +149,7 @@ async fn add_multiple_dst_overrides() {
149149
.await;
150150

151151
let client = client::http1(proxy.outbound, apex_svc.authority());
152-
let metrics = client::http1(proxy.metrics, "localhost");
152+
let metrics = client::http1(proxy.admin, "localhost");
153153

154154
let n = 100;
155155

@@ -214,7 +214,7 @@ async fn set_a_dst_override_weight_to_zero() {
214214
.await;
215215

216216
let client = client::http1(proxy.outbound, apex_svc.authority());
217-
let metrics = client::http1(proxy.metrics, "localhost");
217+
let metrics = client::http1(proxy.admin, "localhost");
218218

219219
let n = 100;
220220

@@ -284,7 +284,7 @@ async fn set_all_dst_override_weights_to_zero() {
284284
.await;
285285

286286
let client = client::http1(proxy.outbound, apex_svc.authority());
287-
let metrics = client::http1(proxy.metrics, "localhost");
287+
let metrics = client::http1(proxy.admin, "localhost");
288288

289289
let n = 100;
290290

@@ -346,7 +346,7 @@ async fn remove_a_dst_override() {
346346
.await;
347347

348348
let client = client::http1(proxy.outbound, apex_svc.authority());
349-
let metrics = client::http1(proxy.metrics, "localhost");
349+
let metrics = client::http1(proxy.admin, "localhost");
350350

351351
let n = 100;
352352

linkerd/app/integration/src/tests/profiles.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ macro_rules! profile_test {
119119

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

122-
let metrics = client::http1(proxy.metrics, "localhost");
122+
let metrics = client::http1(proxy.admin, "localhost");
123123

124124
// Poll metrics until we recognize the profile is loaded...
125125
loop {

linkerd/app/integration/src/tests/tap.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ async fn inbound_http1() {
123123
.await;
124124

125125
// Wait for the server proxy to become ready
126-
let client = client::http1(srv_proxy.metrics, "localhost");
126+
let client = client::http1(srv_proxy.admin, "localhost");
127127
let ready = || async {
128128
client
129129
.request(client.request_builder("/ready").method("GET"))
@@ -214,7 +214,7 @@ async fn grpc_headers_end() {
214214
.await;
215215

216216
// Wait for the server proxy to become ready
217-
let client = client::http2(srv_proxy.metrics, "localhost");
217+
let client = client::http2(srv_proxy.admin, "localhost");
218218
let ready = || async {
219219
client
220220
.request(client.request_builder("/ready").method("GET"))

linkerd/app/integration/src/tests/telemetry.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl Fixture {
4949
.inbound(srv)
5050
.run()
5151
.await;
52-
let metrics = client::http1(proxy.metrics, "localhost");
52+
let metrics = client::http1(proxy.admin, "localhost");
5353

5454
let client = client::new(proxy.inbound, "tele.test.svc.cluster.local");
5555
let tcp_dst_labels = metrics::labels().label("direction", "inbound");
@@ -83,7 +83,7 @@ impl Fixture {
8383
.outbound(srv)
8484
.run()
8585
.await;
86-
let metrics = client::http1(proxy.metrics, "localhost");
86+
let metrics = client::http1(proxy.admin, "localhost");
8787

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

139139
let client = client::tcp(proxy.inbound);
140-
let metrics = client::http1(proxy.metrics, "localhost");
140+
let metrics = client::http1(proxy.admin, "localhost");
141141

142142
let src_labels = metrics::labels()
143143
.label("direction", "inbound")
@@ -175,7 +175,7 @@ impl TcpFixture {
175175
.await;
176176

177177
let client = client::tcp(proxy.outbound);
178-
let metrics = client::http1(proxy.metrics, "localhost");
178+
let metrics = client::http1(proxy.admin, "localhost");
179179

180180
let src_labels = metrics::labels()
181181
.label("direction", "outbound")
@@ -530,7 +530,7 @@ mod outbound_dst_labels {
530530
.outbound(srv)
531531
.run()
532532
.await;
533-
let metrics = client::http1(proxy.metrics, "localhost");
533+
let metrics = client::http1(proxy.admin, "localhost");
534534

535535
let client = client::new(proxy.outbound, dest);
536536
let tcp_labels = metrics::labels()
@@ -852,7 +852,7 @@ async fn metrics_have_no_double_commas() {
852852
.run()
853853
.await;
854854
let client = client::new(proxy.inbound, "tele.test.svc.cluster.local");
855-
let metrics = client::http1(proxy.metrics, "localhost");
855+
let metrics = client::http1(proxy.admin, "localhost");
856856

857857
let scrape = metrics.get("/metrics").await;
858858
assert!(!scrape.contains(",,"));

linkerd/app/integration/src/tests/telemetry/tcp_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl Test {
9090
let proxy = proxy.identity(id_svc).run_with_test_env(env).await;
9191

9292
// Wait for the proxy's identity to be certified.
93-
let admin_client = client::http1(proxy.metrics, "localhost");
93+
let admin_client = client::http1(proxy.admin, "localhost");
9494
assert_eventually!(
9595
admin_client
9696
.request(admin_client.request_builder("/ready").method("GET"))

linkerd/app/integration/src/tests/transparency.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ async fn retry_reconnect_errors() {
13511351
.await;
13521352
let proxy = proxy::new().inbound(srv).run().await;
13531353
let client = client::http2(proxy.inbound, "transparency.example.com");
1354-
let metrics = client::http1(proxy.metrics, "localhost");
1354+
let metrics = client::http1(proxy.admin, "localhost");
13551355

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

0 commit comments

Comments
 (0)