diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs index 6dc89899e..db6701b0d 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs @@ -140,7 +140,10 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch let _guard = LIVE_TEST_LOCK.lock().await; let allowed_listener = tokio::net::TcpListener::bind("127.0.0.1:0").await?; let port = allowed_listener.local_addr()?.port(); - let denied_listener = tokio::net::TcpListener::bind(("127.0.0.2", port)).await?; + // Use a distinct loopback address that does not require an interface alias + // (macOS only binds 127.0.0.1 by default). + let denied_listener = + tokio::net::TcpListener::bind((std::net::Ipv6Addr::LOCALHOST, port)).await?; let allowed_address = allowed_listener.local_addr()?.to_string(); let rebound_address = denied_listener.local_addr()?.to_string(); let extra_allowed_connections = Arc::new(AtomicUsize::new(0)); diff --git a/scripts/test-features.sh b/scripts/test-features.sh index a7b75f57b..8bc67c95b 100755 --- a/scripts/test-features.sh +++ b/scripts/test-features.sh @@ -14,6 +14,7 @@ esac cargo test --locked --workspace cargo test --locked --workspace --all-features RUST_TEST_THREADS=1 TINYCOMPUTER_LIVE_BROWSER_TESTS=1 cargo test --locked -p tinycomputer-browser --features agent-browser live_ +RUST_TEST_THREADS=1 TINYCOMPUTER_LIVE_BROWSER_EGRESS_TESTS=1 cargo test --locked -p tinycomputer --features static-link --lib live_chromium_ cargo test --locked -p tinycomputer --features static-link cargo run --locked -p tinycomputer-examples --bin basic forbidden="$(cargo tree -p tinycomputer-bus -e normal,build --prefix none | grep -Ei 'tinybus|tokio|reqwest|ureq|hyper|rusqlite|git2|agent-desktop' || true)"