diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml index 78297eca9..5cf0fff7f 100644 --- a/.github/actions/setup-rust/action.yml +++ b/.github/actions/setup-rust/action.yml @@ -26,8 +26,8 @@ outputs: description: Testable packages for the current OS value: ${{ (runner.os == 'Linux' && '--workspace') || - (runner.os == 'macOS' && '-p client-ffi -p client-shared -p firezone-tunnel -p snownet') || - (runner.os == 'Windows' && '-p client-shared -p connlib-model -p firezone-bin-shared -p firezone-gui-client -p firezone-headless-client -p firezone-logging -p firezone-telemetry -p firezone-tunnel -p gui-smoke-test -p http-test-server -p ip-packet -p phoenix-channel -p snownet -p socket-factory -p tun') }} + (runner.os == 'macOS' && '--workspace --exclude firezone-bin-shared --exclude firezone-gui-client') || + (runner.os == 'Windows' && '--workspace --exclude client-ffi') }} nightly_version: description: The nightly version of Rust value: ${{ steps.nightly.outputs.nightly }} diff --git a/rust/connlib/bufferpool/lib.rs b/rust/connlib/bufferpool/lib.rs index 73d5580bc..a4c54cd42 100644 --- a/rust/connlib/bufferpool/lib.rs +++ b/rust/connlib/bufferpool/lib.rs @@ -350,7 +350,7 @@ mod tests { let buffer2 = pool.pull_initialised(b"hello world"); let buffer3 = pool.pull_initialised(b"hello world"); - tokio::time::sleep(Duration::from_millis(10)).await; // Wait for metrics to be exported. + tokio::time::sleep(Duration::from_millis(100)).await; // Wait for metrics to be exported. assert_eq!(get_num_buffers(&exporter), 3); @@ -359,7 +359,7 @@ mod tests { drop(buffer2); drop(buffer3); - tokio::time::sleep(Duration::from_millis(10)).await; // Wait for metrics to be exported. + tokio::time::sleep(Duration::from_millis(100)).await; // Wait for metrics to be exported. assert_eq!(get_num_buffers(&exporter), 0); } diff --git a/rust/connlib/dns-over-tcp/Cargo.toml b/rust/connlib/dns-over-tcp/Cargo.toml index af7a3d1a5..2f0a4b2b7 100644 --- a/rust/connlib/dns-over-tcp/Cargo.toml +++ b/rust/connlib/dns-over-tcp/Cargo.toml @@ -15,10 +15,12 @@ rand = { workspace = true } tracing = { workspace = true } [dev-dependencies] -firezone-bin-shared = { workspace = true } futures = { workspace = true } -ip_network = { workspace = true } tokio = { workspace = true, features = ["process", "rt", "macros"] } + +[target.'cfg(target_os = "linux")'.dev-dependencies] +firezone-bin-shared = { workspace = true } +ip_network = { workspace = true } tun = { workspace = true } [lints] diff --git a/rust/connlib/dns-over-tcp/tests/smoke_server.rs b/rust/connlib/dns-over-tcp/tests/smoke_server.rs index 7da5269a0..c0d42236e 100644 --- a/rust/connlib/dns-over-tcp/tests/smoke_server.rs +++ b/rust/connlib/dns-over-tcp/tests/smoke_server.rs @@ -1,4 +1,5 @@ #![allow(clippy::unwrap_used)] +#![cfg(not(any(target_os = "macos", target_os = "windows")))] // The DNS-over-TCP server is sans-IO so it doesn't matter where the IP packets come from. Testing it only on Linux is therefore fine. use std::{ collections::BTreeSet, diff --git a/rust/connlib/l4-tcp-dns-server/lib.rs b/rust/connlib/l4-tcp-dns-server/lib.rs index d793f5676..2c91b2547 100644 --- a/rust/connlib/l4-tcp-dns-server/lib.rs +++ b/rust/connlib/l4-tcp-dns-server/lib.rs @@ -196,7 +196,7 @@ mod tests { async fn smoke_ipv4() { let mut server = Server::default(); - let socket = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 127), 8080)); + let socket = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 8080)); let server_task = tokio::spawn(async move { server.rebind(socket).unwrap(); diff --git a/rust/connlib/l4-udp-dns-server/lib.rs b/rust/connlib/l4-udp-dns-server/lib.rs index 581fe46a2..c3ad338da 100644 --- a/rust/connlib/l4-udp-dns-server/lib.rs +++ b/rust/connlib/l4-udp-dns-server/lib.rs @@ -183,7 +183,7 @@ mod tests { async fn smoke_ipv4() { let mut server = Server::default(); - let socket = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 127), 8080)); + let socket = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 8080)); let server_task = tokio::spawn(async move { server.rebind(socket).unwrap();