use a tempdir in test_bucket_storage (#28819)
This commit is contained in:
parent
28956d7653
commit
42cc76e33d
|
@ -381,16 +381,12 @@ impl BucketStorage {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use {super::*, tempfile::tempdir};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_bucket_storage() {
|
fn test_bucket_storage() {
|
||||||
let tmpdir1 = std::env::temp_dir().join("bucket_map_test_mt");
|
let tmpdir = tempdir().unwrap();
|
||||||
let paths: Vec<PathBuf> = [tmpdir1]
|
let paths: Vec<PathBuf> = vec![tmpdir.path().to_path_buf()];
|
||||||
.iter()
|
|
||||||
.filter(|x| std::fs::create_dir_all(x).is_ok())
|
|
||||||
.cloned()
|
|
||||||
.collect();
|
|
||||||
assert!(!paths.is_empty());
|
assert!(!paths.is_empty());
|
||||||
|
|
||||||
let mut storage =
|
let mut storage =
|
||||||
|
|
Loading…
Reference in New Issue