Skip to content

Commit

Permalink
feat(cli): cleanup temp test directories
Browse files Browse the repository at this point in the history
  • Loading branch information
NTBBloodbath committed Jun 13, 2024
1 parent 2c789e7 commit e5b1572
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ use crate::net;
#[cfg(test)]
use mockall::{automock, predicate::*};
#[cfg(test)]
use tokio::net::TcpListener;
use tokio::{fs::remove_dir_all, net::TcpListener};
#[cfg(test)]
use std::path::PathBuf;

#[derive(Parser)]
#[command(
Expand Down Expand Up @@ -109,6 +111,9 @@ mod tests {
let test_name = String::from("my-site");
let result = init_site(Some(&test_name)).await;
assert!(result.is_ok());

// Cleanup
remove_dir_all(PathBuf::from(test_name)).await.unwrap();
}

#[tokio::test]
Expand Down

0 comments on commit e5b1572

Please sign in to comment.