summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2025-03-04 16:32:49 +0100
committerDavid Lönnhager <david.l@mullvad.net>2025-03-05 10:19:04 +0100
commitac5aca95a2129e45ef6e6616b1f33242ef5b1569 (patch)
tree54b0ed7e1985eb9150355560156af31e54d9f71f /test
parent89a41936b9a96b383db76c7069a1081ff89bfd88 (diff)
downloadmullvadvpn-ac5aca95a2129e45ef6e6616b1f33242ef5b1569.tar.xz
mullvadvpn-ac5aca95a2129e45ef6e6616b1f33242ef5b1569.zip
Remove 'any' tunnel type from test workspace
Diffstat (limited to 'test')
-rw-r--r--test/test-manager/src/tests/helpers.rs2
-rw-r--r--test/test-manager/src/tests/relay_ip_overrides.rs2
-rw-r--r--test/test-manager/src/tests/tunnel.rs10
-rw-r--r--test/test-manager/src/tests/ui.rs4
4 files changed, 9 insertions, 9 deletions
diff --git a/test/test-manager/src/tests/helpers.rs b/test/test-manager/src/tests/helpers.rs
index f4a5986755..dcfbc8d0ff 100644
--- a/test/test-manager/src/tests/helpers.rs
+++ b/test/test-manager/src/tests/helpers.rs
@@ -765,7 +765,7 @@ async fn intersect_with_current_location(
constraint.location,
Constraint::Any,
Constraint::Any,
- Constraint::Any,
+ query.tunnel_protocol(),
WireguardRelayQuery {
entry_location: constraint.wireguard_constraints.entry_location,
..Default::default()
diff --git a/test/test-manager/src/tests/relay_ip_overrides.rs b/test/test-manager/src/tests/relay_ip_overrides.rs
index eb2e36d2f8..7bc7190bb8 100644
--- a/test/test-manager/src/tests/relay_ip_overrides.rs
+++ b/test/test-manager/src/tests/relay_ip_overrides.rs
@@ -188,7 +188,7 @@ pub async fn test_bridge_ip_override(
};
let relay_constraints = RelayConstraints {
- tunnel_protocol: TunnelType::OpenVpn.into(),
+ tunnel_protocol: TunnelType::OpenVpn,
..Default::default()
};
diff --git a/test/test-manager/src/tests/tunnel.rs b/test/test-manager/src/tests/tunnel.rs
index 24357fdfad..72d1b97188 100644
--- a/test/test-manager/src/tests/tunnel.rs
+++ b/test/test-manager/src/tests/tunnel.rs
@@ -60,7 +60,7 @@ pub async fn test_openvpn_tunnel(
log::info!("Connect to {protocol} OpenVPN endpoint");
update_relay_constraints(&mut mullvad_client, |relay_constraints| {
- relay_constraints.tunnel_protocol = Constraint::Only(TunnelType::OpenVpn);
+ relay_constraints.tunnel_protocol = TunnelType::OpenVpn;
relay_constraints.openvpn_constraints = OpenVpnConstraints { port: constraint };
})
.await
@@ -347,7 +347,7 @@ pub async fn test_wireguard_autoconnect(
) -> Result<(), Error> {
log::info!("Setting tunnel protocol to WireGuard");
update_relay_constraints(&mut mullvad_client, |relay_constraints| {
- relay_constraints.tunnel_protocol = Constraint::Only(TunnelType::Wireguard);
+ relay_constraints.tunnel_protocol = TunnelType::Wireguard;
})
.await
.expect("failed to update relay constraints");
@@ -386,7 +386,7 @@ pub async fn test_openvpn_autoconnect(
log::info!("Setting tunnel protocol to OpenVPN");
update_relay_constraints(&mut mullvad_client, |relay_constraints| {
- relay_constraints.tunnel_protocol = Constraint::Only(TunnelType::OpenVpn);
+ relay_constraints.tunnel_protocol = TunnelType::OpenVpn;
})
.await
.expect("failed to update relay constraints");
@@ -583,7 +583,7 @@ pub async fn test_remote_socks_bridge(
.expect("failed to update bridge settings");
update_relay_constraints(&mut mullvad_client, |relay_constraints| {
- relay_constraints.tunnel_protocol = Constraint::Only(TunnelType::OpenVpn);
+ relay_constraints.tunnel_protocol = TunnelType::OpenVpn;
})
.await
.expect("failed to update relay constraints");
@@ -677,7 +677,7 @@ pub async fn test_local_socks_bridge(
.expect("failed to update bridge settings");
update_relay_constraints(&mut mullvad_client, |relay_constraints| {
- relay_constraints.tunnel_protocol = Constraint::Only(TunnelType::OpenVpn);
+ relay_constraints.tunnel_protocol = TunnelType::OpenVpn;
})
.await
.expect("failed to update relay constraints");
diff --git a/test/test-manager/src/tests/ui.rs b/test/test-manager/src/tests/ui.rs
index 84d84d9af1..0ffdf1748f 100644
--- a/test/test-manager/src/tests/ui.rs
+++ b/test/test-manager/src/tests/ui.rs
@@ -1,7 +1,7 @@
use super::{config::TEST_CONFIG, helpers, Error, TestContext};
use mullvad_management_interface::MullvadProxyClient;
use mullvad_relay_selector::query::builder::RelayQueryBuilder;
-use mullvad_types::{constraints::Constraint, relay_constraints::RelaySettings};
+use mullvad_types::relay_constraints::RelaySettings;
use std::{
collections::BTreeMap,
fmt::Debug,
@@ -131,7 +131,7 @@ pub async fn test_ui_openvpn_tunnel_settings(
let RelaySettings::Normal(mut constraints) = relay_settings else {
unimplemented!()
};
- constraints.tunnel_protocol = Constraint::Only(talpid_types::net::TunnelType::OpenVpn);
+ constraints.tunnel_protocol = talpid_types::net::TunnelType::OpenVpn;
mullvad_client
.set_relay_settings(RelaySettings::Normal(constraints))
.await?;