Skip to content

Commit f88b740

Browse files
committed
Simplify return type
1 parent a02407a commit f88b740

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

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

+8-6
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ pub async fn install_app(
7171
rpc_provider: &RpcClientProvider,
7272
) -> anyhow::Result<MullvadProxyClient> {
7373
// install package
74-
log::debug!("Installing new app");
75-
rpc.install_app(get_package_desc(app_filename)?).await?;
74+
log::debug!("Installing app '{}'", app_filename);
75+
rpc.install_app(get_package_desc(app_filename)).await?;
7676

7777
// verify that daemon is running
7878
if rpc.mullvad_daemon_get_status().await? != ServiceStatus::Running {
@@ -90,7 +90,9 @@ pub async fn install_app(
9090

9191
// Wait for the relay list to be updated
9292
let mut mullvad_client = rpc_provider.new_client().await;
93-
helpers::ensure_updated_relay_list(&mut mullvad_client).await?;
93+
helpers::ensure_updated_relay_list(&mut mullvad_client)
94+
.await
95+
.context("Failed to update relay list")?;
9496
Ok(mullvad_client)
9597
}
9698

@@ -142,10 +144,10 @@ pub async fn replace_openvpn_cert(rpc: &ServiceClient) -> Result<(), Error> {
142144
.map_err(Error::Rpc)
143145
}
144146

145-
pub fn get_package_desc(name: &str) -> Result<Package, Error> {
146-
Ok(Package {
147+
pub fn get_package_desc(name: &str) -> Package {
148+
Package {
147149
path: Path::new(&TEST_CONFIG.artifacts_dir).join(name),
148-
})
150+
}
149151
}
150152

151153
/// Reboot the guest virtual machine.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ pub async fn test_installation_idempotency(
255255
for _ in 0..2 {
256256
// Install the app
257257
log::info!("Installing new app");
258-
let app_package = get_package_desc(&TEST_CONFIG.app_package_filename)?;
258+
let app_package = get_package_desc(&TEST_CONFIG.app_package_filename);
259259
rpc.install_app(app_package).await?;
260260
log::info!("App was successfully installed!");
261261

0 commit comments

Comments
 (0)