bin/taud: clean up files used in testing

This commit is contained in:
ghassmo
2022-03-18 16:20:14 +04:00
parent 779e4c5def
commit f8ff73cfda

View File

@@ -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
///////////////////////