Generating proper tmp random dir on each test run

This commit is contained in:
Jedrzej Stuczynski
2020-01-31 12:51:17 +00:00
parent ea5223ddf5
commit e48b28eefd
3 changed files with 5 additions and 1 deletions
Generated
+1
View File
@@ -1433,6 +1433,7 @@ dependencies = [
"serde_json",
"sfw-provider-requests",
"sphinx",
"tempfile",
"tokio 0.2.10",
"tokio-tungstenite",
"topology",
+3
View File
@@ -49,6 +49,9 @@ tokio-tungstenite = { git = "https://github.com/snapview/tokio-tungstenite", rev
[build-dependencies]
built = "0.3.2"
[dev-dependencies]
tempfile = "3.1.0"
[features]
qa = []
local = []
+1 -1
View File
@@ -331,7 +331,7 @@ mod client_config {
#[test]
fn after_saving_default_config_the_loaded_one_is_identical() {
let temp_location = std::env::temp_dir().join("config.toml");
let temp_location = tempfile::tempdir().unwrap().path().join("config.toml");
let default_config = Config::default().with_id("foomp".to_string());
default_config
.save_to_file(Some(temp_location.clone()))