diff --git a/test/test-manager/src/tests/tunnel.rs b/test/test-manager/src/tests/tunnel.rs index d1b6e655858a..162de63f615d 100644 --- a/test/test-manager/src/tests/tunnel.rs +++ b/test/test-manager/src/tests/tunnel.rs @@ -18,7 +18,7 @@ use mullvad_types::{ constraints::Constraint, relay_constraints::{ self, BridgeConstraints, BridgeSettings, BridgeType, OpenVpnConstraints, RelayConstraints, - RelaySettings, TransportPort, WireguardConstraints, + RelaySettings, TransportPort, }, wireguard, }; @@ -103,18 +103,11 @@ pub async fn test_wireguard_tunnel( for (port, should_succeed) in PORTS { log::info!("Connect to WireGuard endpoint on port {port}"); - let relay_settings = RelaySettings::Normal(RelayConstraints { - tunnel_protocol: Constraint::Only(TunnelType::Wireguard), - wireguard_constraints: WireguardConstraints { - port: Constraint::Only(port), - ..Default::default() - }, - ..Default::default() - }); + let query = RelayQueryBuilder::new().wireguard().port(port).build(); - set_relay_settings(&mut mullvad_client, relay_settings) + apply_settings_from_relay_query(&mut mullvad_client, query) .await - .expect("failed to update relay settings"); + .unwrap(); let connection_result = connect_and_wait(&mut mullvad_client).await; assert_eq!(