summaryrefslogtreecommitdiffhomepage
path: root/test/test-manager/src/tests/install.rs
diff options
context:
space:
mode:
authorMarkus Pettersson <markus.pettersson@mullvad.net>2024-02-16 16:24:33 +0100
committerMarkus Pettersson <markus.pettersson@mullvad.net>2024-03-27 11:43:44 +0100
commit707ecf44bd2b21642e51c8b9f5440bc287bcc511 (patch)
tree1c4e914a879cc6d1c126db1e47019cc2f5f2cea4 /test/test-manager/src/tests/install.rs
parent66f2127aed8bea1e1434c7e8efc50293ebdd9223 (diff)
downloadmullvadvpn-707ecf44bd2b21642e51c8b9f5440bc287bcc511.tar.xz
mullvadvpn-707ecf44bd2b21642e51c8b9f5440bc287bcc511.zip
Refactor `mullvad-relay-selector`
Implement a system built on 'queries' for selecting appropriate relays. A query is a set of constraints which dictates which relay(s) that *can* be chosen by the relay selector. The user's settings can naturally be expressed as a query. The semantics of merging two queries in a way that always prefer user settings is defined by the new `Intersection` trait. Split `mullvad-relay-selector` into several modules: - `query.rs`: Definition of a query on different types of relays. This module is integral to the new API of `mullvad-relay-selector` - `matcher.rs`: Logic for filtering out candidate relays based on a query. - `detailer.rs`: Logic for deriving connection details for the selected relay. - `tests/`: Integration tests for the new relay selector. These tests only use the public APIs of `RelaySelector` and make sure that the output matches the expected output in different scenarios.
Diffstat (limited to 'test/test-manager/src/tests/install.rs')
-rw-r--r--test/test-manager/src/tests/install.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test-manager/src/tests/install.rs b/test/test-manager/src/tests/install.rs
index 8676d99b77..7dbf092f5c 100644
--- a/test/test-manager/src/tests/install.rs
+++ b/test/test-manager/src/tests/install.rs
@@ -5,7 +5,7 @@ use super::helpers::{
use super::{Error, TestContext};
use mullvad_management_interface::MullvadProxyClient;
-use mullvad_types::relay_constraints;
+use mullvad_types::{constraints::Constraint, relay_constraints};
use test_macro::test_function;
use test_rpc::meta::Os;
use test_rpc::{mullvad_daemon::ServiceStatus, ServiceClient};
@@ -141,7 +141,7 @@ pub async fn test_upgrade_app(ctx: TestContext, rpc: ServiceClient) -> Result<()
let relay_location_was_preserved = match &settings.relay_settings {
relay_constraints::RelaySettings::Normal(relay_constraints::RelayConstraints {
location:
- relay_constraints::Constraint::Only(relay_constraints::LocationConstraint::Location(
+ Constraint::Only(relay_constraints::LocationConstraint::Location(
relay_constraints::GeographicLocationConstraint::Country(country),
)),
..