forked from Proxmox/proxmox
apt: tests: allow re-running digest test without clean-up
Files inside CARGO_TARGET_TMPDIR are only cleaned on `cargo clean`, so tests that expect files to not exist need to cleanup themselves. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
bcd134a349
commit
ae3c04a76b
@ -130,6 +130,9 @@ fn test_digest() -> Result<(), Error> {
|
|||||||
|
|
||||||
assert!(file.write().is_err());
|
assert!(file.write().is_err());
|
||||||
|
|
||||||
|
// best-effort cleanup for re-builds without a `cargo clean` in between
|
||||||
|
let _ = std::fs::remove_dir_all(&write_dir);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user