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/lsp/registries.rs | |
parent | 8ca4c1819f3e7a8716c68034e256355334d53b44 (diff) |
chore(tests): use custom temp dir creation for the tests (#14153)
Diffstat (limited to 'cli/lsp/registries.rs')
-rw-r--r-- | cli/lsp/registries.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cli/lsp/registries.rs b/cli/lsp/registries.rs index 48a879185..45dac2f48 100644 --- a/cli/lsp/registries.rs +++ b/cli/lsp/registries.rs @@ -1050,7 +1050,7 @@ impl ModuleRegistry { #[cfg(test)] mod tests { use super::*; - use tempfile::TempDir; + use test_util::TempDir; #[test] fn test_validate_registry_configuration() { @@ -1205,7 +1205,7 @@ mod tests { #[tokio::test] async fn test_registry_completions_origin_match() { let _g = test_util::http_server(); - let temp_dir = TempDir::new().expect("could not create tmp"); + let temp_dir = TempDir::new(); let location = temp_dir.path().join("registries"); let mut module_registry = ModuleRegistry::new(&location, ModuleRegistryOptions::default()).unwrap(); @@ -1266,7 +1266,7 @@ mod tests { #[tokio::test] async fn test_registry_completions() { let _g = test_util::http_server(); - let temp_dir = TempDir::new().expect("could not create tmp"); + let temp_dir = TempDir::new(); let location = temp_dir.path().join("registries"); let mut module_registry = ModuleRegistry::new(&location, ModuleRegistryOptions::default()).unwrap(); @@ -1489,7 +1489,7 @@ mod tests { #[tokio::test] async fn test_registry_completions_key_first() { let _g = test_util::http_server(); - let temp_dir = TempDir::new().expect("could not create tmp"); + let temp_dir = TempDir::new(); let location = temp_dir.path().join("registries"); let mut module_registry = ModuleRegistry::new(&location, ModuleRegistryOptions::default()).unwrap(); @@ -1559,7 +1559,7 @@ mod tests { #[tokio::test] async fn test_registry_completions_complex() { let _g = test_util::http_server(); - let temp_dir = TempDir::new().expect("could not create tmp"); + let temp_dir = TempDir::new(); let location = temp_dir.path().join("registries"); let mut module_registry = ModuleRegistry::new(&location, ModuleRegistryOptions::default()).unwrap(); @@ -1610,7 +1610,7 @@ mod tests { #[tokio::test] async fn test_check_origin_supported() { let _g = test_util::http_server(); - let temp_dir = TempDir::new().expect("could not create tmp"); + let temp_dir = TempDir::new(); let location = temp_dir.path().join("registries"); let module_registry = ModuleRegistry::new(&location, ModuleRegistryOptions::default()).unwrap(); @@ -1621,7 +1621,7 @@ mod tests { #[tokio::test] async fn test_check_origin_not_supported() { let _g = test_util::http_server(); - let temp_dir = TempDir::new().expect("could not create tmp"); + let temp_dir = TempDir::new(); let location = temp_dir.path().join("registries"); let module_registry = ModuleRegistry::new(&location, ModuleRegistryOptions::default()).unwrap(); |