From f8ff73cfda3b717a1c8e26f4e6c20df7f81ae715 Mon Sep 17 00:00:00 2001 From: ghassmo Date: Fri, 18 Mar 2022 16:20:14 +0400 Subject: [PATCH] bin/taud: clean up files used in testing --- bin/taud/src/main.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/bin/taud/src/main.rs b/bin/taud/src/main.rs index 6a543d1ce..b84919b1a 100644 --- a/bin/taud/src/main.rs +++ b/bin/taud/src/main.rs @@ -441,13 +441,15 @@ async fn main() -> Result<()> { #[cfg(test)] mod tests { - use std::fs::create_dir_all; + use std::fs::{create_dir_all, remove_dir_all}; use crate::{month_tasks::MonthTasks, task_info::TaskInfo}; use super::*; fn get_path() -> Result { + remove_dir_all("/tmp/test_tau_data").ok(); + let path = PathBuf::from("/tmp/test_tau_data"); // mkdir dataset_path if not exists @@ -500,13 +502,6 @@ mod tests { assert_eq!(mt, mt_load); - Ok(()) - } - - #[test] - fn test_activate_task() -> Result<()> { - let settings = Settings { dataset_path: get_path()? }; - // activate task ///////////////////////