summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorJoakim Hulthe <joakim@hulthe.net>2024-03-06 15:48:19 +0100
committerJoakim Hulthe <joakim@hulthe.net>2024-03-20 16:50:15 +0100
commite5487658fb6065f5f41acdc7970235b64641b6bd (patch)
tree68143ae758a8d2bb1e2fb5fe9572b1156cebb853 /test
parent8354142fd8c15680b62fec185eb9492d6dad20f8 (diff)
downloadmullvadvpn-e5487658fb6065f5f41acdc7970235b64641b6bd.tar.xz
mullvadvpn-e5487658fb6065f5f41acdc7970235b64641b6bd.zip
Group platform split tunnel tests under one test
Diffstat (limited to 'test')
-rw-r--r--test/test-manager/src/tests/split_tunnel.rs19
1 files changed, 15 insertions, 4 deletions
diff --git a/test/test-manager/src/tests/split_tunnel.rs b/test/test-manager/src/tests/split_tunnel.rs
index cdb96a5dd2..9902dec231 100644
--- a/test/test-manager/src/tests/split_tunnel.rs
+++ b/test/test-manager/src/tests/split_tunnel.rs
@@ -1,11 +1,23 @@
use mullvad_management_interface::MullvadProxyClient;
use std::str;
use test_macro::test_function;
-use test_rpc::{ExecResult, ServiceClient};
+use test_rpc::{meta::Os, ExecResult, ServiceClient};
-use super::{helpers, TestContext};
+use super::{config::TEST_CONFIG, helpers, TestContext};
+
+#[test_function]
+pub async fn test_split_tunnel(
+ ctx: TestContext,
+ rpc: ServiceClient,
+ mullvad_client: MullvadProxyClient,
+) -> anyhow::Result<()> {
+ match TEST_CONFIG.os {
+ Os::Linux => test_split_tunnel_linux(ctx, rpc, mullvad_client).await,
+ Os::Windows => test_split_tunnel_windows(ctx, rpc, mullvad_client).await,
+ Os::Macos => todo!("MacOS"),
+ }
+}
-#[test_function(target_os = "windows")]
pub async fn test_split_tunnel_windows(
_: TestContext,
rpc: ServiceClient,
@@ -69,7 +81,6 @@ pub async fn test_split_tunnel_windows(
Ok(())
}
-#[test_function(target_os = "linux")]
pub async fn test_split_tunnel_linux(
_: TestContext,
rpc: ServiceClient,