files unit tests fix
parent
f4217cf8ad
commit
150bb87a41
|
|
@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue