Compare commits

..

No commits in common. "1884469c9e369bd10fd1d9f7ed40b5266518af02" and "f4217cf8ad974ebde38ac119ead421d080a0dc89" have entirely different histories.

4 changed files with 8 additions and 13 deletions

View File

@ -159,22 +159,22 @@ mod files_unittests {
use super::*;
#[tokio::test]
async fn try_to_create_watcher() {
let res = create_watcher("dep-file", "./tests/examples/").await;
let res = create_watcher("dep-file", "/home/user/monitor/runner-rs/tests/examples/").await;
assert!(res.is_ok());
}
#[tokio::test]
async fn try_to_create_invalid_watcher() {
let res = create_watcher("invalid-file", "/path/to/the/no/dir").await;
let res = create_watcher("invalid-file", "/path/to/the/hell").await;
assert!(res.is_err());
}
#[tokio::test]
async fn check_existing_file() {
let res = check_file("dep-file", "./tests/examples/").await;
let res = check_file("dep-file", "/home/user/monitor/runner-rs/tests/examples/").await;
assert!(res.is_ok());
}
#[tokio::test]
async fn check_non_existing_file() {
let res = check_file("invalid-file", "/path/to/the/no/dir").await;
let res = check_file("invalid-file", "/path/to/the/hell").await;
assert!(res.is_err());
}
}

View File

@ -233,10 +233,10 @@ mod process_unittests {
// rewrite, its a pipe
#[tokio::test]
async fn full_cycle_with_restart() {
let res1 = start_process("temp-process", "./temp-process").await;
let res1 = start_process("temp-process", "/home/user/monitor/runner-rs/temp-process").await;
assert!(res1.is_ok());
let res2 =
restart_process("temp-process", "./temp-process").await;
restart_process("temp-process", "/home/user/monitor/runner-rs/temp-process").await;
assert!(res2.is_ok());
let _ = terminate_process("temp-process").await;
let res3 = is_active("temp-process").await;
@ -249,10 +249,7 @@ mod process_unittests {
}
#[tokio::test]
async fn is_active_check() {
let res1 = start_process("tmp-prc", "./tests/examples/tmp-prc").await;
assert!(res1.is_ok());
assert!(is_active("tmp-prc").await);
let _ = terminate_process("tmp-prc").await;
assert!(is_active("systemd").await);
}
#[tokio::test]
async fn isnt_active_check() {
@ -260,9 +257,7 @@ mod process_unittests {
}
#[tokio::test]
async fn is_frozen_check() {
let res1 = start_process("freeze-check", "./tests/examples/freeze-check").await;
assert!(res1.is_ok());
assert!(!is_frozen("freeze-check").await);
assert!(!is_frozen("systemd").await);
}
#[tokio::test]
async fn pidof_active_process() {

Binary file not shown.

Binary file not shown.