Skip to content

Commit

Permalink
test_suite: cleanup after test CSR artifacts
Browse files Browse the repository at this point in the history
Signed-off-by: Wilfred Mallawa <[email protected]>
  • Loading branch information
twilfredo committed Jul 1, 2024
1 parent 10c36b7 commit 45e92a7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/test_suite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,25 @@ pub fn test_set_certificate(cntx: *mut c_void, cert_slot_id: u8) -> Result<(), (
std::fs::remove_dir_all(cleanup_path).expect("Failed to cleanup test slot");
}

let csr_artifacts = [
"./csr_response.cert",
"./csr_response.cert.der",
"./csr_response.der",
"./csr_response.req",
"./set-cert.der",
];

for artifact in csr_artifacts {
match std::fs::remove_file(artifact) {
Err(e) => {
if e.kind() == std::io::ErrorKind::NotFound {
warn!("{:?}: does not exist", artifact)
}
}
_ => {}
}
}

Ok(())
}

Expand Down

0 comments on commit 45e92a7

Please sign in to comment.