diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-04-01 11:15:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 11:15:37 -0400 |
commit | 1c37ac33526dc45ad0b3f83ca8294dbb55548096 (patch) | |
tree | 426978168928c5e7c2223e4906005fa23fb34cd6 /cli/disk_cache.rs | |
parent | 8ca4c1819f3e7a8716c68034e256355334d53b44 (diff) |
chore(tests): use custom temp dir creation for the tests (#14153)
Diffstat (limited to 'cli/disk_cache.rs')
-rw-r--r-- | cli/disk_cache.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/disk_cache.rs b/cli/disk_cache.rs index 349b786b7..19369274e 100644 --- a/cli/disk_cache.rs +++ b/cli/disk_cache.rs @@ -150,11 +150,11 @@ impl DiskCache { #[cfg(test)] mod tests { use super::*; - use tempfile::TempDir; + use test_util::TempDir; #[test] fn test_create_cache_if_dir_exits() { - let cache_location = TempDir::new().unwrap(); + let cache_location = TempDir::new(); let mut cache_path = cache_location.path().to_owned(); cache_path.push("foo"); let cache = DiskCache::new(&cache_path); @@ -166,7 +166,7 @@ mod tests { #[test] fn test_create_cache_if_dir_not_exits() { - let temp_dir = TempDir::new().unwrap(); + let temp_dir = TempDir::new(); let mut cache_location = temp_dir.path().to_owned(); assert!(fs::remove_dir(&cache_location).is_ok()); cache_location.push("foo"); |