diff options
| author | Markus Pettersson <markus.pettersson@mullvad.net> | 2024-06-24 09:13:56 +0200 |
|---|---|---|
| committer | Markus Pettersson <markus.pettersson@mullvad.net> | 2024-06-24 09:13:56 +0200 |
| commit | d9337b72b2cdda5388b2b57cce49519a2f765fcc (patch) | |
| tree | d0892de4376df331afca1e5090913c9d67a899c8 /test | |
| parent | 02089db6e0494e1a86f135f9a12f1c209314f499 (diff) | |
| parent | 8c9cb717c020072a3859fe3d44f6147c37c67c33 (diff) | |
| download | mullvadvpn-d9337b72b2cdda5388b2b57cce49519a2f765fcc.tar.xz mullvadvpn-d9337b72b2cdda5388b2b57cce49519a2f765fcc.zip | |
Merge branch 'nightly-fmt'
Diffstat (limited to 'test')
| -rw-r--r-- | test/test-manager/src/tests/split_tunnel.rs | 3 | ||||
| -rw-r--r-- | test/test-runner/src/sys.rs | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/test/test-manager/src/tests/split_tunnel.rs b/test/test-manager/src/tests/split_tunnel.rs index 46c0d24e25..435552a460 100644 --- a/test/test-manager/src/tests/split_tunnel.rs +++ b/test/test-manager/src/tests/split_tunnel.rs @@ -2,8 +2,7 @@ use anyhow::Context; use mullvad_management_interface::MullvadProxyClient; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; use test_macro::test_function; -use test_rpc::meta::OsVersion; -use test_rpc::ServiceClient; +use test_rpc::{meta::OsVersion, ServiceClient}; use super::{ helpers::{self, ConnChecker}, diff --git a/test/test-runner/src/sys.rs b/test/test-runner/src/sys.rs index 0a176b1c3d..a53396d08f 100644 --- a/test/test-runner/src/sys.rs +++ b/test/test-runner/src/sys.rs @@ -596,7 +596,8 @@ pub async fn get_daemon_environment() -> Result<HashMap<String, String>, test_rp Ok(env) } -/// Parse a systemd env-file. `input` is assumed to be the entire text content of a systemd-env file. +/// Parse a systemd env-file. `input` is assumed to be the entire text content of a systemd-env +/// file. /// /// Example systemd-env file: /// ``` @@ -624,7 +625,8 @@ pub async fn get_daemon_environment() -> Result<HashMap<String, String>, test_rp test_rpc::Error::Registry(format!("Failed to open Mullvad VPN subkey: {}", error)) })?; - // The Strings will be quoted (surrounded by ") when read from the registry - we should trim that! + // The Strings will be quoted (surrounded by ") when read from the registry - we should + // trim that! let trim = |string: String| string.trim_matches('"').to_owned(); let env = key .open_subkey("Environment") @@ -661,7 +663,8 @@ pub async fn get_daemon_environment() -> Result<HashMap<String, String>, test_rp .as_dictionary() .ok_or_else(|| test_rpc::Error::Service("plist missing dict".to_owned()))?; let Some(env_vars) = plist_tree.get("EnvironmentVariables") else { - // `EnvironmentVariables` does not exist in plist file, so there are no env variables to parse. + // `EnvironmentVariables` does not exist in plist file, so there are no env variables to + // parse. return Ok(HashMap::new()); }; let env_vars = env_vars.as_dictionary().ok_or_else(|| { |
