Skip to content

Commit

Permalink
Remove macOS-specific transport label tests (#1396)
Browse files Browse the repository at this point in the history
The proxy doesn't actually run on macOS, so there's not a lot of value
in having macOS-specific tests, especially as these tests aren't
executed as a part of CI.

This change removes two macOS-specific transport label tests.
  • Loading branch information
olix0r authored Dec 6, 2021
1 parent cf72101 commit 9192894
Showing 1 changed file with 0 additions and 72 deletions.
72 changes: 0 additions & 72 deletions linkerd/app/integration/src/tests/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1194,78 +1194,6 @@ mod transport {
test_tcp_accept(TcpFixture::outbound()).await;
}

#[tokio::test]
#[cfg(target_os = "macos")]
async fn inbound_tcp_connect_err() {
let _trace = trace_init();
let srv = tcp::server()
.accept_fut(move |sock| async { drop(sock) })
.run()
.await;
let proxy = proxy::new().inbound(srv).run().await;

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

let tcp_client = client.connect().await;

tcp_client.write(TcpFixture::HELLO_MSG).await;
assert_eq!(tcp_client.read().await, &[] as &[u8]);
// Connection to the server should be a failure with the EXFULL error
metrics::metric("tcp_close_total")
.label("peer", "dst")
.label("direction", "inbound")
.label("errno", "EXFULL")
.value(1u64)
.assert_in(&metrics)
.await;

// Connection from the client should have closed cleanly.
metrics::metric("tcp_close_total")
.label("peer", "src")
.label("direction", "inbound")
.label("errno", "")
.value(1u64)
.assert_in(&metrics)
.await;
}

#[tokio::test]
#[cfg(target_os = "macos")]
async fn outbound_tcp_connect_err() {
let _trace = trace_init();
let srv = tcp::server()
.accept_fut(move |sock| async { drop(sock) })
.run()
.await;
let proxy = proxy::new().outbound(srv).run().await;

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

let tcp_client = client.connect().await;

tcp_client.write(TcpFixture::HELLO_MSG).await;
assert_eq!(tcp_client.read().await, &[] as &[u8]);
// Connection to the server should be a failure with the EXFULL error
metrics::metric("tcp_close_total")
.label("peer", "dst")
.label("direction", "outbound")
.label("errno", "EXFULL")
.value(1u64)
.assert_in(&metrics)
.await;

// Connection from the client should have closed cleanly.
metrics::metric("tcp_close_total")
.label("peer", "src")
.label("direction", "outbound")
.label("errno", "")
.value(1u64)
.assert_in(&metrics)
.await;
}

#[tokio::test]
async fn inbound_tcp_write_bytes_total() {
test_write_bytes_total(TcpFixture::inbound()).await
Expand Down

0 comments on commit 9192894

Please sign in to comment.