Skip to content

Commit

Permalink
Print previous version too when updating
Browse files Browse the repository at this point in the history
Keep current format to avoid having to update Fedora CoreOS tests as
well.

Based on: coreos#472
Co-authored-by: Colin Walters <walters@verbum.org>
Closes: coreos#445
  • Loading branch information
cgwalters authored and travier committed Apr 19, 2024
1 parent 0533a7c commit 17c5628
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bootupd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ pub(crate) fn client_run_update(c: &mut ipc::ClientToDaemonConnection) -> Result
continue;
}
ComponentUpdateResult::Updated {
previous: _,
previous,
interrupted,
new,
} => {
Expand All @@ -441,6 +441,7 @@ pub(crate) fn client_run_update(c: &mut ipc::ClientToDaemonConnection) -> Result
i.version,
);
}
println!("Previous {}: {}", name, previous.version);
println!("Updated {}: {}", name, new.version);
}
}
Expand Down
1 change: 1 addition & 0 deletions tests/e2e-update/e2e-update-in-vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ tmpefimount=$(mount_tmp_efi)
assert_not_has_file ${tmpefimount}/EFI/fedora/test-bootupd.efi

bootupctl update | tee out.txt
assert_file_has_content out.txt "Previous EFI: .*"
assert_file_has_content out.txt "Updated EFI: ${TARGET_GRUB_PKG}.*,test-bootupd-payload-1.0"

assert_file_has_content ${tmpefimount}/EFI/fedora/test-bootupd.efi test-payload
Expand Down

0 comments on commit 17c5628

Please sign in to comment.