Skip to content

Commit d616773

Browse files
hanslHans Larsen
authored and
Hans Larsen
committed
test: fix the build test
temp_dir() returns the root temp directory and not a new one.
1 parent 37de2d5 commit d616773

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

dfx/Cargo.lock

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dfx/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ wabt = "0.9.2"
3232
[dev-dependencies]
3333
env_logger = "0.6"
3434
mockito = "0.20.0"
35+
tempfile = "3.1.0"

dfx/src/commands/build.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ mod tests {
180180
let env = TestEnv {};
181181
let wat = r#"(module )"#;
182182

183-
let temp_path = temp_dir();
183+
let temp_dir = tempfile::tempdir().unwrap();
184+
let temp_path = temp_dir.into_path();
184185
let input_path = temp_path.join("input.wat");
185186
let output_path = temp_path.join("output.wasm");
186187

0 commit comments

Comments
 (0)