Fix NixOS tests

This commit is contained in:
Arijit Basu 2021-12-11 21:56:52 +05:30
parent 59c8db821b
commit c89d5a45f1
No known key found for this signature in database
GPG Key ID: 0F8EF5258DC38077

View File

@ -109,7 +109,7 @@ mod tests {
#[test] #[test]
fn test_explore_sync() { fn test_explore_sync() {
let config = ExplorerConfig::default(); let config = ExplorerConfig::default();
let path = PathBuf::from("/bin"); let path = PathBuf::from(".");
let r = explore_sync(config, path, None, 0); let r = explore_sync(config, path, None, 0);
@ -147,7 +147,7 @@ mod tests {
#[test] #[test]
fn test_explore_async() { fn test_explore_async() {
let config = ExplorerConfig::default(); let config = ExplorerConfig::default();
let path = PathBuf::from("/usr/bin"); let path = PathBuf::from(".");
let (tx_msg_in, rx_msg_in) = mpsc::channel(); let (tx_msg_in, rx_msg_in) = mpsc::channel();
explore_async(config, path, None, 0, tx_msg_in.clone()); explore_async(config, path, None, 0, tx_msg_in.clone());
@ -155,7 +155,7 @@ mod tests {
let task = rx_msg_in.recv().unwrap(); let task = rx_msg_in.recv().unwrap();
let dbuf = extract_dirbuf_from_msg(task.msg); let dbuf = extract_dirbuf_from_msg(task.msg);
assert_eq!(dbuf.parent, "/usr/bin"); assert_eq!(dbuf.parent, ".");
drop(tx_msg_in); drop(tx_msg_in);
assert!(rx_msg_in.recv().is_err()); assert!(rx_msg_in.recv().is_err());