1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00

integration test command

This commit is contained in:
Robin Appelman 2021-07-02 19:36:04 +02:00
commit 2fc3e5ed93
4 changed files with 39 additions and 1 deletions

View file

@ -214,6 +214,30 @@ async fn main() -> Result<()> {
cloud.exec(&mut docker, args, false).await?;
cloud.destroy(&mut docker).await?;
}
HazeArgs::Integration { options, mut args } => {
let cloud = Cloud::create(&mut docker, options, &config).await?;
println!("Waiting for servers to start");
cloud.wait_for_start(&mut docker).await?;
println!("Installing");
if let Err(e) = cloud
.exec(
&mut docker,
vec![
"install",
&config.auto_setup.username,
&config.auto_setup.password,
],
false,
)
.await
{
cloud.destroy(&mut docker).await?;
return Err(e);
}
args.insert(0, "integration".to_string());
cloud.exec(&mut docker, args, false).await?;
cloud.destroy(&mut docker).await?;
}
HazeArgs::Fmt { path } => {
let cloud = Cloud::create(&mut docker, CloudOptions::default(), &config).await?;
let mut out_buffer = Vec::<u8>::with_capacity(1024);