From 67a5f942d573b94ce9b20d19088be075ad433d78 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Thu, 9 Jan 2025 18:23:20 +0100 Subject: Cleanup test directories --- src/archiver/gemini.rs | 3 +++ src/archiver/gopher.rs | 3 +++ src/archiver/mod.rs | 1 + src/archiver/raw.rs | 2 ++ 4 files changed, 9 insertions(+) (limited to 'src/archiver') diff --git a/src/archiver/gemini.rs b/src/archiver/gemini.rs index 7839ff2..0cde0b1 100644 --- a/src/archiver/gemini.rs +++ b/src/archiver/gemini.rs @@ -47,6 +47,7 @@ mod tests { archive(&test_dir, &template_dir, &output_dir, &context).expect("Archive failed"); assert_file_contents(&output_dir.join("index.gmi"), "Simple things"); + cleanup_test_dir(&test_dir); } #[test] @@ -65,6 +66,7 @@ mod tests { let result = archive(&test_dir, &template_dir, &output_dir, &context); assert!(result.is_err()); + cleanup_test_dir(&test_dir); } #[test] @@ -82,5 +84,6 @@ mod tests { let result = archive(&test_dir, &template_dir, &output_dir, &context); assert!(result.is_err()); + cleanup_test_dir(&test_dir); } } diff --git a/src/archiver/gopher.rs b/src/archiver/gopher.rs index aa584ab..77f23b9 100644 --- a/src/archiver/gopher.rs +++ b/src/archiver/gopher.rs @@ -47,6 +47,7 @@ mod tests { archive(&test_dir, &template_dir, &output_dir, &context).expect("Archive failed"); assert_file_contents(&output_dir.join("index.gph"), "Simple things"); + cleanup_test_dir(&test_dir); } #[test] @@ -65,6 +66,7 @@ mod tests { let result = archive(&test_dir, &template_dir, &output_dir, &context); assert!(result.is_err()); + cleanup_test_dir(&test_dir); } #[test] @@ -82,5 +84,6 @@ mod tests { let result = archive(&test_dir, &template_dir, &output_dir, &context); assert!(result.is_err()); + cleanup_test_dir(&test_dir); } } diff --git a/src/archiver/mod.rs b/src/archiver/mod.rs index f809b8c..ddca473 100644 --- a/src/archiver/mod.rs +++ b/src/archiver/mod.rs @@ -265,5 +265,6 @@ mod tests { &output_dir.join("index.gmi"), "1736121600001/my-very-bad-file", ); + cleanup_test_dir(&test_dir); } } diff --git a/src/archiver/raw.rs b/src/archiver/raw.rs index 5cac709..d0f40d7 100644 --- a/src/archiver/raw.rs +++ b/src/archiver/raw.rs @@ -34,6 +34,7 @@ mod tests { archive(&archive_dir, &test_dir, &output_dir, &context).expect("Archive failed"); assert_file_contents(&output_dir.join("🤠"), "beep boop boop beep"); + cleanup_test_dir(&test_dir); } #[test] @@ -45,5 +46,6 @@ mod tests { let context: Context = HashMap::new(); archive(&archive_dir, &test_dir, &output_dir, &context).expect("Archive failed"); + cleanup_test_dir(&test_dir); } } -- cgit