From af194d4061408ce93c8aa8500e164f18d9a0c26b Mon Sep 17 00:00:00 2001 From: Markus Pettersson Date: Wed, 18 Dec 2024 16:55:38 +0100 Subject: [PATCH] Swap `if + bail!` for `ensure!` --- test/test-manager/src/tests/install.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/test-manager/src/tests/install.rs b/test/test-manager/src/tests/install.rs index 9283e4e21180..936f07d65d79 100644 --- a/test/test-manager/src/tests/install.rs +++ b/test/test-manager/src/tests/install.rs @@ -102,9 +102,10 @@ pub async fn test_upgrade_app( tokio::time::sleep(Duration::from_secs(3)).await; // verify that daemon is running - if rpc.mullvad_daemon_get_status().await? != ServiceStatus::Running { - bail!(Error::DaemonNotRunning); - } + ensure!( + rpc.mullvad_daemon_get_status().await? == ServiceStatus::Running, + Error::DaemonNotRunning + ); // Verify that the correct version was installed let running_daemon_version = rpc.mullvad_daemon_version().await?;