use a tempdir in test_bucket_storage (#28819)

This commit is contained in:
apfitzge 2022-11-15 14:26:19 -06:00 committed by GitHub
parent 28956d7653
commit 42cc76e33d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 7 deletions

View File

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