summaryrefslogtreecommitdiffhomepage
path: root/test/test-manager/src/tests
diff options
context:
space:
mode:
authorMarkus Pettersson <markus.pettersson@mullvad.net>2023-10-20 15:39:07 +0200
committerMarkus Pettersson <markus.pettersson@mullvad.net>2023-10-20 16:49:58 +0200
commit20dd36ba92e080af3a0ff14e4973fdca43b71bed (patch)
tree8e2126f5ad2eb9414bd941d49d97b20513891451 /test/test-manager/src/tests
parentb2a9781846808ab82fd7eb2884d7207c6ec6a6a6 (diff)
downloadmullvadvpn-20dd36ba92e080af3a0ff14e4973fdca43b71bed.tar.xz
mullvadvpn-20dd36ba92e080af3a0ff14e4973fdca43b71bed.zip
Relax relay constraints in `test_quantum_resistant_multihop_udp2tcp_tunnel`
Loosen up relay constraints in `test_quantum_resistant_multihop_udp2tcp_tunnel`, which makes the test more resilient to changes in the testing environment.
Diffstat (limited to 'test/test-manager/src/tests')
-rw-r--r--test/test-manager/src/tests/tunnel.rs49
1 files changed, 25 insertions, 24 deletions
diff --git a/test/test-manager/src/tests/tunnel.rs b/test/test-manager/src/tests/tunnel.rs
index c74518d45b..be0a24dd14 100644
--- a/test/test-manager/src/tests/tunnel.rs
+++ b/test/test-manager/src/tests/tunnel.rs
@@ -581,38 +581,39 @@ pub async fn test_quantum_resistant_multihop_udp2tcp_tunnel(
rpc: ServiceClient,
mut mullvad_client: ManagementServiceClient,
) -> Result<(), Error> {
+ use mullvad_types::{
+ relay_constraints::{ObfuscationSettings, SelectedObfuscation, Udp2TcpObfuscationSettings},
+ wireguard::QuantumResistantState,
+ };
mullvad_client
- .set_quantum_resistant_tunnel(types::QuantumResistantState {
- state: i32::from(types::quantum_resistant_state::State::On),
- })
+ .set_quantum_resistant_tunnel(types::QuantumResistantState::from(
+ QuantumResistantState::On,
+ ))
.await
.expect("Failed to enable PQ tunnels");
mullvad_client
- .set_obfuscation_settings(types::ObfuscationSettings {
- selected_obfuscation: i32::from(
- types::obfuscation_settings::SelectedObfuscation::Udp2tcp,
- ),
- udp2tcp: Some(types::Udp2TcpObfuscationSettings { port: None }),
- })
+ .set_obfuscation_settings(types::ObfuscationSettings::from(ObfuscationSettings {
+ selected_obfuscation: SelectedObfuscation::Udp2Tcp,
+ udp2tcp: Udp2TcpObfuscationSettings {
+ port: Constraint::Any,
+ },
+ }))
.await
.expect("Failed to enable obfuscation");
- let relay_settings = RelaySettingsUpdate::Normal(RelayConstraintsUpdate {
- location: Some(Constraint::Only(LocationConstraint::Location(
- GeographicLocationConstraint::Country("se".to_string()),
- ))),
- wireguard_constraints: Some(WireguardConstraints {
- use_multihop: true,
- entry_location: Constraint::Only(LocationConstraint::Location(
- GeographicLocationConstraint::Country("se".to_string()),
- )),
- ..Default::default()
- }),
- ..Default::default()
- });
-
- update_relay_settings(&mut mullvad_client, relay_settings)
+ mullvad_client
+ .update_relay_settings(types::RelaySettingsUpdate::from(
+ RelaySettingsUpdate::Normal(RelayConstraintsUpdate {
+ wireguard_constraints: WireguardConstraints {
+ use_multihop: true,
+ ..Default::default()
+ }
+ .into(),
+ tunnel_protocol: Constraint::Only(TunnelType::Wireguard).into(),
+ ..Default::default()
+ }),
+ ))
.await
.expect("Failed to update relay settings");