Skip to content

Commit

Permalink
use a tempdir in test_bucket_storage (#28819)
Browse files Browse the repository at this point in the history
  • Loading branch information
apfitzge authored Nov 15, 2022
1 parent 28956d7 commit 42cc76e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions bucket_map/src/bucket_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,16 +381,12 @@ impl BucketStorage {

#[cfg(test)]
mod test {
use super::*;
use {super::*, tempfile::tempdir};

#[test]
fn test_bucket_storage() {
let tmpdir1 = std::env::temp_dir().join("bucket_map_test_mt");
let paths: Vec<PathBuf> = [tmpdir1]
.iter()
.filter(|x| std::fs::create_dir_all(x).is_ok())
.cloned()
.collect();
let tmpdir = tempdir().unwrap();
let paths: Vec<PathBuf> = vec![tmpdir.path().to_path_buf()];
assert!(!paths.is_empty());

let mut storage =
Expand Down

0 comments on commit 42cc76e

Please sign in to comment.