diff options
Diffstat (limited to 'test/test-manager/src/tests')
| -rw-r--r-- | test/test-manager/src/tests/install.rs | 4 | ||||
| -rw-r--r-- | test/test-manager/src/tests/mod.rs | 12 | ||||
| -rw-r--r-- | test/test-manager/src/tests/split_tunnel.rs | 6 | ||||
| -rw-r--r-- | test/test-manager/src/tests/test_metadata.rs | 3 | ||||
| -rw-r--r-- | test/test-manager/src/tests/ui.rs | 18 |
5 files changed, 29 insertions, 14 deletions
diff --git a/test/test-manager/src/tests/install.rs b/test/test-manager/src/tests/install.rs index 936f07d65d..d640b26089 100644 --- a/test/test-manager/src/tests/install.rs +++ b/test/test-manager/src/tests/install.rs @@ -6,7 +6,7 @@ use mullvad_types::{constraints::Constraint, relay_constraints}; use test_macro::test_function; use test_rpc::{mullvad_daemon::ServiceStatus, ServiceClient}; -use crate::{mullvad_daemon::MullvadClientArgument, tests::helpers}; +use crate::tests::helpers; use super::{ config::TEST_CONFIG, @@ -25,7 +25,7 @@ use super::{ pub async fn test_upgrade_app( ctx: TestContext, rpc: ServiceClient, - _mullvad_client: MullvadClientArgument, + _mullvad_client: Option<MullvadProxyClient>, ) -> anyhow::Result<()> { // Install the older version of the app and verify that it is running. let old_version = TEST_CONFIG diff --git a/test/test-manager/src/tests/mod.rs b/test/test-manager/src/tests/mod.rs index b369b28067..e2d50d0889 100644 --- a/test/test-manager/src/tests/mod.rs +++ b/test/test-manager/src/tests/mod.rs @@ -23,10 +23,7 @@ use anyhow::Context; use futures::future::BoxFuture; use std::time::Duration; -use crate::{ - mullvad_daemon::{MullvadClientArgument, RpcClientProvider}, - package::get_version_from_path, -}; +use crate::{mullvad_daemon::RpcClientProvider, package::get_version_from_path}; use config::TEST_CONFIG; use helpers::{find_custom_list, get_app_env, install_app, set_location}; pub use install::test_upgrade_app; @@ -40,8 +37,11 @@ pub struct TestContext { pub rpc_provider: RpcClientProvider, } -pub type TestWrapperFunction = - fn(TestContext, ServiceClient, MullvadClientArgument) -> BoxFuture<'static, anyhow::Result<()>>; +pub type TestWrapperFunction = fn( + TestContext, + ServiceClient, + Option<MullvadProxyClient>, +) -> BoxFuture<'static, anyhow::Result<()>>; #[derive(thiserror::Error, Debug)] pub enum Error { diff --git a/test/test-manager/src/tests/split_tunnel.rs b/test/test-manager/src/tests/split_tunnel.rs index 435552a460..98cbed7951 100644 --- a/test/test-manager/src/tests/split_tunnel.rs +++ b/test/test-manager/src/tests/split_tunnel.rs @@ -86,7 +86,11 @@ pub async fn test_split_tunnel( /// - A split process should never push traffic through the tunnel. /// - Splitting/unsplitting should work regardless if process is running. #[test_function(target_os = "macos")] -pub async fn test_split_tunnel_ui(_ctx: TestContext, rpc: ServiceClient) -> anyhow::Result<()> { +pub async fn test_split_tunnel_ui( + _ctx: TestContext, + rpc: ServiceClient, + _: MullvadProxyClient, +) -> anyhow::Result<()> { // Skip test on macOS 12, since the feature is unsupported if is_macos_12_or_lower(&rpc).await? { return Ok(()); diff --git a/test/test-manager/src/tests/test_metadata.rs b/test/test-manager/src/tests/test_metadata.rs index 961db4510a..31a55498f9 100644 --- a/test/test-manager/src/tests/test_metadata.rs +++ b/test/test-manager/src/tests/test_metadata.rs @@ -1,11 +1,10 @@ use super::TestWrapperFunction; -use test_rpc::{meta::Os, mullvad_daemon::MullvadClientVersion}; +use test_rpc::meta::Os; #[derive(Clone, Debug)] pub struct TestMetadata { pub name: &'static str, pub targets: &'static [Os], - pub mullvad_client_version: MullvadClientVersion, pub func: TestWrapperFunction, /// Priority order of the tests, unless specific tests are given as the `TEST_FILTERS` argument pub priority: Option<i32>, diff --git a/test/test-manager/src/tests/ui.rs b/test/test-manager/src/tests/ui.rs index 9491308eb8..088fd1e55d 100644 --- a/test/test-manager/src/tests/ui.rs +++ b/test/test-manager/src/tests/ui.rs @@ -265,7 +265,11 @@ async fn test_custom_bridge_gui( /// Test settings import / IP overrides in the GUI #[test_function] -pub async fn test_import_settings_ui(_: TestContext, rpc: ServiceClient) -> Result<(), Error> { +pub async fn test_import_settings_ui( + _: TestContext, + rpc: ServiceClient, + _: MullvadProxyClient, +) -> Result<(), Error> { let ui_result = run_test(&rpc, &["settings-import.spec"]).await?; assert!(ui_result.success()); Ok(()) @@ -273,7 +277,11 @@ pub async fn test_import_settings_ui(_: TestContext, rpc: ServiceClient) -> Resu /// Test obfuscation settings in the GUI #[test_function] -pub async fn test_obfuscation_settings_ui(_: TestContext, rpc: ServiceClient) -> Result<(), Error> { +pub async fn test_obfuscation_settings_ui( + _: TestContext, + rpc: ServiceClient, + _: MullvadProxyClient, +) -> Result<(), Error> { let ui_result = run_test(&rpc, &["obfuscation.spec"]).await?; assert!(ui_result.success()); Ok(()) @@ -281,7 +289,11 @@ pub async fn test_obfuscation_settings_ui(_: TestContext, rpc: ServiceClient) -> /// Test settings in the GUI #[test_function] -pub async fn test_settings_ui(_: TestContext, rpc: ServiceClient) -> Result<(), Error> { +pub async fn test_settings_ui( + _: TestContext, + rpc: ServiceClient, + _: MullvadProxyClient, +) -> Result<(), Error> { let ui_result = run_test(&rpc, &["settings.spec"]).await?; assert!(ui_result.success()); Ok(()) |
