Procházet zdrojové kódy

bin/taud: clean up files used in testing

ghassmo před 4 roky
rodič
revize
f8ff73cfda
1 změnil soubory, kde provedl 3 přidání a 8 odebrání
  1. 3 8
      bin/taud/src/main.rs

+ 3 - 8
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<PathBuf> {
+        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
         ///////////////////////