mirror of
https://github.com/containers/youki
synced 2024-05-10 09:36:13 +02:00
use existing create_temp_dir
This commit is contained in:
parent
26e345d190
commit
c4a61d72c6
|
@ -1546,5 +1546,4 @@ dependencies = [
|
|||
"serial_test",
|
||||
"systemd",
|
||||
"tabwriter",
|
||||
"tempfile",
|
||||
]
|
||||
|
|
|
@ -61,7 +61,6 @@ oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "5018f8e5
|
|||
quickcheck = "1"
|
||||
serial_test = "0.5.1"
|
||||
ipc-channel = "0.15.0"
|
||||
tempfile = "3"
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
|
|
|
@ -112,12 +112,13 @@ impl SpecJson {
|
|||
// Tests become unstable if not serial. The cause is not known.
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::utils::create_temp_dir;
|
||||
|
||||
#[test]
|
||||
fn test_spec_json() -> Result<()> {
|
||||
let mut spec = Default::default();
|
||||
spec = set_for_rootless(&spec)?;
|
||||
let tmpdir = tempfile::tempdir().unwrap();
|
||||
let tmpdir = create_temp_dir("test_spec_json").expect("failed to create temp dir");
|
||||
let path = tmpdir.path().join("config.json");
|
||||
to_writer_pretty(&File::create(path)?, &spec)?;
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in New Issue