files unit tests fix

pull/15/head
prplV 2024-11-26 17:40:11 +03:00
parent f4217cf8ad
commit 150bb87a41
1 changed files with 4 additions and 4 deletions

View File

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