From 03feae48cd2832cf8460a76ccb5aa868fc52435c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20L=C3=B6nnhager?= Date: Sat, 21 Oct 2023 16:19:17 +0200 Subject: [PATCH] Remove references to talpid-windows-net in e2e tests --- talpid-windows/Cargo.toml | 2 +- test/Cargo.lock | 4 ++-- test/test-runner/Cargo.toml | 2 +- test/test-runner/src/net.rs | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/talpid-windows/Cargo.toml b/talpid-windows/Cargo.toml index 0765a1376b70..0a8489879fc2 100644 --- a/talpid-windows/Cargo.toml +++ b/talpid-windows/Cargo.toml @@ -20,7 +20,7 @@ workspace = true features = [ "Win32_Foundation", "Win32_Globalization", - "Win32_System_Com", + "Win32_System_Diagnostics_ToolHelp", "Win32_System_IO", "Win32_Networking_WinSock", "Win32_NetworkManagement_IpHelper", diff --git a/test/Cargo.lock b/test/Cargo.lock index 1b2e195e9a96..606a2536a6fc 100644 --- a/test/Cargo.lock +++ b/test/Cargo.lock @@ -3040,7 +3040,7 @@ dependencies = [ ] [[package]] -name = "talpid-windows-net" +name = "talpid-windows" version = "0.0.0" dependencies = [ "err-derive", @@ -3196,7 +3196,7 @@ dependencies = [ "serde_json", "socket2 0.5.4", "talpid-platform-metadata", - "talpid-windows-net", + "talpid-windows", "tarpc", "test-rpc", "tokio", diff --git a/test/test-runner/Cargo.toml b/test/test-runner/Cargo.toml index 4a185692713a..2c431ffa4982 100644 --- a/test/test-runner/Cargo.toml +++ b/test/test-runner/Cargo.toml @@ -27,7 +27,7 @@ talpid-platform-metadata = { path = "../../talpid-platform-metadata" } socket2 = { version = "0.5", features = ["all"] } [target."cfg(target_os=\"windows\")".dependencies] -talpid-windows-net = { path = "../../talpid-windows-net" } +talpid-windows = { path = "../../talpid-windows" } windows-service = "0.6" winreg = "0.50" diff --git a/test/test-runner/src/net.rs b/test/test-runner/src/net.rs index df2c66dae578..851a2f29510d 100644 --- a/test/test-runner/src/net.rs +++ b/test/test-runner/src/net.rs @@ -181,8 +181,8 @@ pub async fn send_ping( #[cfg(target_os = "windows")] if let Some(interface) = interface { let family = match destination { - IpAddr::V4(_) => talpid_windows_net::AddressFamily::Ipv4, - IpAddr::V6(_) => talpid_windows_net::AddressFamily::Ipv6, + IpAddr::V4(_) => talpid_windows::net::AddressFamily::Ipv4, + IpAddr::V6(_) => talpid_windows::net::AddressFamily::Ipv6, }; source_ip = get_interface_ip_for_family(interface, family) .map_err(|_error| test_rpc::Error::Syscall)?; @@ -285,7 +285,7 @@ pub fn get_interface_name(interface: Interface) -> &'static str { pub fn get_interface_ip(interface: Interface) -> Result { // TODO: IPv6 - get_interface_ip_for_family(interface, talpid_windows_net::AddressFamily::Ipv4) + get_interface_ip_for_family(interface, talpid_windows::net::AddressFamily::Ipv4) .map_err(|_error| test_rpc::Error::Syscall)? .ok_or(test_rpc::Error::InterfaceNotFound) } @@ -293,17 +293,17 @@ pub fn get_interface_ip(interface: Interface) -> Result #[cfg(target_os = "windows")] fn get_interface_ip_for_family( interface: Interface, - family: talpid_windows_net::AddressFamily, + family: talpid_windows::net::AddressFamily, ) -> Result, ()> { let interface = match interface { Interface::NonTunnel => non_tunnel_interface(), Interface::Tunnel => TUNNEL_INTERFACE, }; - let interface_alias = talpid_windows_net::luid_from_alias(interface).map_err(|error| { + let interface_alias = talpid_windows::net::luid_from_alias(interface).map_err(|error| { log::error!("Failed to obtain interface LUID: {error}"); })?; - talpid_windows_net::get_ip_address_for_interface(family, interface_alias).map_err(|error| { + talpid_windows::net::get_ip_address_for_interface(family, interface_alias).map_err(|error| { log::error!("Failed to obtain interface IP: {error}"); }) }