propagate error instead of unwrapping in tests

This commit is contained in:
Adithya Nair 2023-03-22 11:19:00 +05:30
parent 6a342a49a9
commit 97874a2002
No known key found for this signature in database
GPG Key ID: 0C7F35F4F821290F
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ fn generate_expected_os_release() -> Result<()> {
.expect("Failed to setup generation link");
// Expect the 'Built on' date in VERSION_ID to be from the birth time of generation_link
let expected_built_on = time::OffsetDateTime::from(fs::metadata(generation_link.as_path())?.created().unwrap()).date();
let expected_built_on = time::OffsetDateTime::from(fs::metadata(generation_link.as_path())?.created()?).date();
let output0 = common::lanzaboote_install(0, esp_mountpoint.path(), vec![generation_link])?;
assert!(output0.status.success());