diff --git a/Cargo.lock b/Cargo.lock index fe73520f9d..0d892bb34f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1433,6 +1433,7 @@ dependencies = [ "serde_json", "sfw-provider-requests", "sphinx", + "tempfile", "tokio 0.2.10", "tokio-tungstenite", "topology", diff --git a/nym-client/Cargo.toml b/nym-client/Cargo.toml index 09939462d3..3e5922af22 100644 --- a/nym-client/Cargo.toml +++ b/nym-client/Cargo.toml @@ -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 = [] \ No newline at end of file diff --git a/nym-client/src/config/mod.rs b/nym-client/src/config/mod.rs index 6eac43c16a..69cb059aee 100644 --- a/nym-client/src/config/mod.rs +++ b/nym-client/src/config/mod.rs @@ -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()))