1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-04 01:24:09 +02:00

destroy on install failure when running tests

This commit is contained in:
Robin Appelman 2021-03-19 18:45:16 +01:00
commit 4f1f85db91

View file

@ -149,7 +149,7 @@ async fn main() -> Result<()> {
println!("Waiting for servers to start");
cloud.wait_for_start(&mut docker).await?;
println!("Installing");
cloud
if let Err(e) = cloud
.exec(
&mut docker,
vec![
@ -159,7 +159,11 @@ async fn main() -> Result<()> {
],
false,
)
.await?;
.await
{
cloud.destroy(&mut docker).await?;
return Err(e);
}
if let Some(app) = path
.as_ref()
.and_then(|path| path.strip_prefix("apps/"))