Skip to content

Commit

Permalink
Group platform split tunnel tests under one test
Browse files Browse the repository at this point in the history
  • Loading branch information
hulthe committed Mar 15, 2024
1 parent 28f248f commit 4219b70
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions test/test-manager/src/tests/split_tunnel.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4219b70

Please sign in to comment.