Skip to content

Commit

Permalink
Remove references to talpid-windows-net in e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dlon committed Oct 21, 2023
1 parent c9f9f6b commit 03feae4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion talpid-windows/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions test/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/test-runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 6 additions & 6 deletions test/test-runner/src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down Expand Up @@ -285,25 +285,25 @@ pub fn get_interface_name(interface: Interface) -> &'static str {
pub fn get_interface_ip(interface: Interface) -> Result<IpAddr, test_rpc::Error> {
// 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)
}

#[cfg(target_os = "windows")]
fn get_interface_ip_for_family(
interface: Interface,
family: talpid_windows_net::AddressFamily,
family: talpid_windows::net::AddressFamily,
) -> Result<Option<IpAddr>, ()> {
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}");
})
}
Expand Down

0 comments on commit 03feae4

Please sign in to comment.