pidof unitest fix
parent
9b9b8d0b13
commit
363d38bdb6
|
|
@ -251,7 +251,6 @@ mod process_unittests {
|
|||
}
|
||||
#[tokio::test]
|
||||
async fn is_active_check() {
|
||||
// let _ = std::io::stdout().write_all(b"");
|
||||
let res1 = start_process("tmp-prc", "./tests/examples/tmp-prc").await;
|
||||
assert!(res1.is_ok());
|
||||
assert!(is_active("tmp-prc").await);
|
||||
|
|
@ -263,14 +262,17 @@ mod process_unittests {
|
|||
}
|
||||
#[tokio::test]
|
||||
async fn is_frozen_check() {
|
||||
// let _ = std::io::stdout().write_all(b"");
|
||||
let res1 = start_process("freeze-check", "./tests/examples/freeze-check").await;
|
||||
assert!(res1.is_ok());
|
||||
assert!(!is_frozen("freeze-check").await);
|
||||
}
|
||||
#[tokio::test]
|
||||
async fn pidof_active_process() {
|
||||
assert!(get_pid("systemd").await.is_some());
|
||||
assert!(get_pid("pidof-prc").await.is_none());
|
||||
let res1 = start_process("pidof-prc", "./tests/examples/pidof-prc").await;
|
||||
assert!(res1.is_ok());
|
||||
assert!(get_pid("pidof-prc").await.is_some());
|
||||
let _ = terminate_process("pidof-prc").await;
|
||||
}
|
||||
|
||||
// broken mechanism need to check
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue