Skip to content

Commit

Permalink
Reset all relay constraints in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dlon committed Oct 24, 2023
1 parent 089c55e commit 45b8883
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/Cargo.lock

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

12 changes: 10 additions & 2 deletions test/test-manager/src/tests/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ use mullvad_management_interface::{types, ManagementServiceClient};
use mullvad_types::{
relay_constraints::{
BridgeState, Constraint, GeographicLocationConstraint, LocationConstraint,
ObfuscationSettings, RelayConstraintsUpdate, RelaySettingsUpdate,
ObfuscationSettings, OpenVpnConstraints, RelayConstraintsUpdate, RelaySettingsUpdate,
WireguardConstraints,
},
states::TunnelState,
};
Expand Down Expand Up @@ -334,7 +335,14 @@ pub async fn reset_relay_settings(
) -> Result<(), Error> {
disconnect_and_wait(mullvad_client).await?;

let relay_settings = RelaySettingsUpdate::Normal(RelayConstraintsUpdate::default());
let relay_settings = RelaySettingsUpdate::Normal(RelayConstraintsUpdate {
location: Some(Constraint::Any),
tunnel_protocol: Some(Constraint::Any),
openvpn_constraints: Some(OpenVpnConstraints::default()),
wireguard_constraints: Some(WireguardConstraints::default()),
providers: Some(Constraint::Any),
ownership: Some(Constraint::Any),
});
let bridge_state = BridgeState::Auto;
let obfuscation_settings = ObfuscationSettings::default();

Expand Down

0 comments on commit 45b8883

Please sign in to comment.