fix test using non-unique tempfile
This commit is contained in:
parent
f5bad262ec
commit
3ba5ddf1a3
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -1432,6 +1432,7 @@ dependencies = [
|
||||
"serde_json",
|
||||
"structopt",
|
||||
"tar",
|
||||
"tempfile",
|
||||
"thiserror",
|
||||
"tokio 0.2.16",
|
||||
"url",
|
||||
|
@ -37,3 +37,4 @@ bytes = "0.5.4"
|
||||
[dev-dependencies]
|
||||
hex = "0.4.2"
|
||||
hex-literal = "0.2.1"
|
||||
tempfile = "3.1.0"
|
||||
|
@ -269,8 +269,8 @@ mod tests {
|
||||
let size = header.size()?;
|
||||
|
||||
// writing to file is the only supported way to get the contents
|
||||
let mut temp_file = std::env::temp_dir();
|
||||
temp_file.push("temporary_file_for_testing.txt");
|
||||
let tempdir = tempfile::tempdir()?;
|
||||
let temp_file = tempdir.path().join("temporary_file_for_testing.txt");
|
||||
entry.unpack(&temp_file)?;
|
||||
|
||||
let bytes = std::fs::read(&temp_file);
|
||||
|
Loading…
x
Reference in New Issue
Block a user