summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mullvad-relay-selector/tests/relay_selector.rs24
1 files changed, 23 insertions, 1 deletions
diff --git a/mullvad-relay-selector/tests/relay_selector.rs b/mullvad-relay-selector/tests/relay_selector.rs
index 2ac05c8a7c..fc08ee23c1 100644
--- a/mullvad-relay-selector/tests/relay_selector.rs
+++ b/mullvad-relay-selector/tests/relay_selector.rs
@@ -1489,7 +1489,29 @@ fn test_daita() {
assert!(!supports_daita(&exit), "exit relay must not support DAITA");
}
wrong_relay => panic!(
- "Relay selector should have picked a Wireguard relay, instead chose {wrong_relay:?}"
+ "Relay selector should have picked two Wireguard relays, instead chose {wrong_relay:?}"
+ ),
+ }
+
+ // Should be able to connect to DAITA relay with use_anywhere
+ let query = RelayQueryBuilder::new()
+ .wireguard()
+ .daita()
+ .daita_use_anywhere(true)
+ .location(DAITA_RELAY_LOCATION.clone())
+ .build();
+ let relay = relay_selector
+ .get_relay_by_query(query)
+ .expect("Expected to find a relay with daita_use_anywhere");
+ match relay {
+ GetRelay::Wireguard {
+ inner: WireguardConfig::Singlehop { exit },
+ ..
+ } => {
+ assert!(supports_daita(&exit), "entry relay must support DAITA");
+ }
+ wrong_relay => panic!(
+ "Relay selector should have picked a single Wireguard relay, instead chose {wrong_relay:?}"
),
}