diff --git a/Cargo.lock b/Cargo.lock index 204d94e57d8..2221aca770d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -483,7 +483,7 @@ version = "0.4.10" [[package]] name = "cargo-test-support" -version = "0.10.1" +version = "0.11.0" dependencies = [ "anstream", "anstyle", diff --git a/Cargo.toml b/Cargo.toml index 0fa0572b022..7eda351f16f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ cargo-credential-macos-keychain = { version = "0.4.21", path = "credential/cargo cargo-credential-wincred = { version = "0.4.21", path = "credential/cargo-credential-wincred" } cargo-platform = { path = "crates/cargo-platform", version = "0.3.3" } cargo-test-macro = { version = "0.4.10", path = "crates/cargo-test-macro" } -cargo-test-support = { version = "0.10.1", path = "crates/cargo-test-support" } +cargo-test-support = { version = "0.11.0", path = "crates/cargo-test-support" } cargo-util = { version = "0.2.28", path = "crates/cargo-util" } cargo-util-schemas = { version = "0.13.0", path = "crates/cargo-util-schemas" } cargo_metadata = "0.23.1" diff --git a/crates/cargo-test-support/Cargo.toml b/crates/cargo-test-support/Cargo.toml index e7482baee08..5c8b4d70945 100644 --- a/crates/cargo-test-support/Cargo.toml +++ b/crates/cargo-test-support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-test-support" -version = "0.10.1" +version = "0.11.0" edition.workspace = true rust-version = "1.93" # MSRV:1 license.workspace = true diff --git a/crates/cargo-test-support/src/containers.rs b/crates/cargo-test-support/src/containers.rs index 4ebbec93c5a..c1ea8385794 100644 --- a/crates/cargo-test-support/src/containers.rs +++ b/crates/cargo-test-support/src/containers.rs @@ -30,12 +30,6 @@ pub struct Container { pub struct ContainerHandle { /// The name of the container. name: String, - /// The IP address of the container. - /// - /// NOTE: This is currently unused, but may be useful so I left it in. - /// This can only be used on Linux. macOS and Windows docker doesn't allow - /// direct connection to the container. - pub ip_address: String, /// Port mappings of `container_port` to `host_port` for ports exposed via EXPOSE. pub port_mappings: HashMap, } @@ -69,22 +63,11 @@ impl Container { self.copy_files(&name); self.start_container(&name); let info = self.container_inspect(&name); - let ip_address = if cfg!(target_os = "linux") { - info[0]["NetworkSettings"]["IPAddress"] - .as_str() - .unwrap() - .to_string() - } else { - // macOS and Windows can't make direct connections to the - // container. It only works through exposed ports or mapped ports. - "127.0.0.1".to_string() - }; let port_mappings = self.port_mappings(&info); self.wait_till_ready(&port_mappings); ContainerHandle { name, - ip_address, port_mappings, } }