Skip to content

Commit 1ec271b

Browse files
Merge branch 'rust-1.80-fixes-test-manager'
2 parents 0836994 + 514e823 commit 1ec271b

File tree

4 files changed

+21
-27
lines changed

4 files changed

+21
-27
lines changed

test/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ members = [
2121
non_ascii_idents = "forbid"
2222

2323
# Deny old style Rust
24-
rust_2018_idioms = "deny"
24+
rust_2018_idioms = { level = "deny", priority = -1 }
2525
macro_use_extern_crate = "deny"
2626
absolute_paths_not_starting_with_crate = "deny"
2727

test/test-manager/src/tests/helpers.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ pub async fn ensure_logged_in(
349349
/// - `Result::Ok(new_state)` if the daemon successfully connected to a tunnel
350350
/// - `Result::Err` if:
351351
/// - The daemon failed to even begin connecting. Then [`Error::Rpc`] is returned.
352-
/// - The daemon started to connect but ended up in the [`TunnelState::Error`] state.
353-
/// Then [`Error::UnexpectedErrorState`] is returned
352+
/// - The daemon started to connect but ended up in the [`TunnelState::Error`] state. Then
353+
/// [`Error::UnexpectedErrorState`] is returned
354354
pub async fn connect_and_wait(
355355
mullvad_client: &mut MullvadProxyClient,
356356
) -> Result<TunnelState, Error> {

test/test-manager/test_macro/src/lib.rs

+17-23
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,33 @@ use test_rpc::meta::Os;
77
///
88
/// The `test_function` macro will inject two arguments to your function:
99
///
10-
/// * `rpc` - a [`test_rpc::client::ServiceClient]` used to make
11-
/// remote-procedure calls inside the virtual machine running the test. This can
12-
/// be used to perform arbitrary network requests, inspect the local file
13-
/// system, rebooting ..
10+
/// * `rpc` - a [`test_rpc::client::ServiceClient]` used to make remote-procedure calls inside the
11+
/// virtual machine running the test. This can be used to perform arbitrary network requests,
12+
/// inspect the local file system, rebooting ..
1413
///
15-
/// * `mullvad_client` - a [`mullvad_management_interface::MullvadProxyClient`]
16-
/// which provides a bi-directional communication channel with the
17-
/// `mullvad-daemon` running inside of the virtual machine. All RPC-calls as
18-
/// defined in [`mullvad_management_interface::MullvadProxyClient`] are
19-
/// available on `mullvad_client`.
14+
/// * `mullvad_client` - a [`mullvad_management_interface::MullvadProxyClient`] which provides a
15+
/// bi-directional communication channel with the `mullvad-daemon` running inside of the virtual
16+
/// machine. All RPC-calls as defined in [`mullvad_management_interface::MullvadProxyClient`] are
17+
/// available on `mullvad_client`.
2018
///
2119
/// # Arguments
2220
///
2321
/// The `test_function` macro takes 4 optional arguments
2422
///
25-
/// * `priority` - The order in which tests will be run where low numbers run
26-
/// before high numbers and tests with the same number run in undefined order.
27-
/// `priority` defaults to 0.
23+
/// * `priority` - The order in which tests will be run where low numbers run before high numbers
24+
/// and tests with the same number run in undefined order. `priority` defaults to 0.
2825
///
29-
/// * `cleanup` - If the cleanup function will run after the test is finished
30-
/// and among other things reset the settings to the default value for the
31-
/// daemon.
32-
/// `cleanup` defaults to true.
26+
/// * `cleanup` - If the cleanup function will run after the test is finished and among other things
27+
/// reset the settings to the default value for the daemon. `cleanup` defaults to true.
3328
///
34-
/// * `must_succeed` - If the testing suite stops running if this test fails.
35-
/// `must_succeed` defaults to false.
29+
/// * `must_succeed` - If the testing suite stops running if this test fails. `must_succeed`
30+
/// defaults to false.
3631
///
37-
/// * `always_run` - If the test should always run regardless of what test
38-
/// filters are provided by the user.
39-
/// `always_run` defaults to false.
32+
/// * `always_run` - If the test should always run regardless of what test filters are provided by
33+
/// the user. `always_run` defaults to false.
4034
///
41-
/// * `target_os` - The test should only run on the specified OS. This can currently be
42-
/// set to `linux`, `windows`, or `macos`.
35+
/// * `target_os` - The test should only run on the specified OS. This can currently be set to
36+
/// `linux`, `windows`, or `macos`.
4337
///
4438
/// # Examples
4539
///

test/test-rpc/src/client.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ impl ServiceClient {
326326
/// # Returns
327327
/// - `Result::Ok(env)` if the current environment variables could be read.
328328
/// - `Result::Err(Error)` if communication with the daemon failed or the environment values
329-
/// could not be parsed.
329+
/// could not be parsed.
330330
pub async fn get_daemon_environment(&self) -> Result<HashMap<String, String>, Error> {
331331
let env = self
332332
.client

0 commit comments

Comments
 (0)