Skip to content

Commit

Permalink
Swap if + bail! for ensure!
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Jan 7, 2025
1 parent bc535b9 commit af194d4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test-manager/src/tests/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;
Expand Down

0 comments on commit af194d4

Please sign in to comment.