Skip to content

Commit

Permalink
Make test_wireguard_tunnel use location: Any
Browse files Browse the repository at this point in the history
  • Loading branch information
Serock3 committed Nov 20, 2024
1 parent 81a1b1f commit 9384795
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions test/test-manager/src/tests/tunnel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use mullvad_types::{
constraints::Constraint,
relay_constraints::{
self, BridgeConstraints, BridgeSettings, BridgeType, OpenVpnConstraints, RelayConstraints,
RelaySettings, TransportPort, WireguardConstraints,
RelaySettings, TransportPort,
},
wireguard,
};
Expand Down Expand Up @@ -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!(
Expand Down

0 comments on commit 9384795

Please sign in to comment.