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:
Thomas Lamprecht 2023-09-04 17:53:32 +02:00
parent bcd134a349
commit ae3c04a76b

View File

@ -130,6 +130,9 @@ fn test_digest() -> Result<(), Error> {
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(())
}