mirror of
https://github.com/containers/youki
synced 2024-11-23 01:11:58 +01:00
Add youki commands
This commit is contained in:
parent
27a0924fea
commit
8fb3e1899d
16
tests/integration/create.rs
Normal file
16
tests/integration/create.rs
Normal file
@ -0,0 +1,16 @@
|
||||
use std::path::PathBuf;
|
||||
use std::process::{Command,Stdio};
|
||||
|
||||
pub fn exec(project_path: &PathBuf, id: &str) -> bool {
|
||||
let status = Command::new(project_path.join(PathBuf::from("youki")))
|
||||
.stdout(Stdio::null())
|
||||
.arg("-r")
|
||||
.arg(project_path.join("integration-workspace").join("youki"))
|
||||
.arg("create")
|
||||
.arg(id)
|
||||
.arg("--bundle")
|
||||
.arg(project_path.join("integration-workspace").join("bundle"))
|
||||
.status()
|
||||
.expect("failed to execute process");
|
||||
return status.success();
|
||||
}
|
14
tests/integration/delete.rs
Normal file
14
tests/integration/delete.rs
Normal file
@ -0,0 +1,14 @@
|
||||
use std::path::PathBuf;
|
||||
use std::process::{Command,Stdio};
|
||||
|
||||
pub fn exec(project_path: &PathBuf, id: &str) -> bool {
|
||||
let status = Command::new(project_path.join(PathBuf::from("youki")))
|
||||
.stdout(Stdio::null())
|
||||
.arg("-r")
|
||||
.arg(project_path.join("integration-workspace").join("youki"))
|
||||
.arg("delete")
|
||||
.arg(id)
|
||||
.status()
|
||||
.expect("failed to execute process");
|
||||
return status.success();
|
||||
}
|
15
tests/integration/kill.rs
Normal file
15
tests/integration/kill.rs
Normal file
@ -0,0 +1,15 @@
|
||||
use std::path::PathBuf;
|
||||
use std::process::{Command,Stdio};
|
||||
|
||||
pub fn exec(project_path: &PathBuf, id: &str) -> bool {
|
||||
let status = Command::new(project_path.join(PathBuf::from("youki")))
|
||||
.stdout(Stdio::null())
|
||||
.arg("-r")
|
||||
.arg(project_path.join("integration-workspace").join("youki"))
|
||||
.arg("kill")
|
||||
.arg(id)
|
||||
.arg("9")
|
||||
.status()
|
||||
.expect("failed to execute process");
|
||||
return status.success();
|
||||
}
|
5
tests/integration/mod.rs
Normal file
5
tests/integration/mod.rs
Normal file
@ -0,0 +1,5 @@
|
||||
pub mod create;
|
||||
pub mod state;
|
||||
pub mod delete;
|
||||
pub mod start;
|
||||
pub mod support;
|
14
tests/integration/start.rs
Normal file
14
tests/integration/start.rs
Normal file
@ -0,0 +1,14 @@
|
||||
use std::path::PathBuf;
|
||||
use std::process::{Command,Stdio};
|
||||
|
||||
pub fn exec(project_path: &PathBuf, id: &str) -> bool {
|
||||
let status = Command::new(project_path.join(PathBuf::from("youki")))
|
||||
.stdout(Stdio::null())
|
||||
.arg("-r")
|
||||
.arg(project_path.join("integration-workspace").join("youki"))
|
||||
.arg("start")
|
||||
.arg(id)
|
||||
.status()
|
||||
.expect("failed to execute process");
|
||||
return status.success();
|
||||
}
|
14
tests/integration/state.rs
Normal file
14
tests/integration/state.rs
Normal file
@ -0,0 +1,14 @@
|
||||
use std::path::PathBuf;
|
||||
use std::process::{Command,Stdio};
|
||||
|
||||
pub fn exec(project_path: &PathBuf, id: &str) -> bool {
|
||||
let status = Command::new(project_path.join(PathBuf::from("youki")))
|
||||
.stdout(Stdio::null())
|
||||
.arg("-r")
|
||||
.arg(project_path.join("integration-workspace").join("youki"))
|
||||
.arg("state")
|
||||
.arg(id)
|
||||
.status()
|
||||
.expect("failed to execute process");
|
||||
return status.success();
|
||||
}
|
Loading…
Reference in New Issue
Block a user