Skip to content

Commit

Permalink
updatehub: add trace log entry for download status check
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Salvador <[email protected]>
  • Loading branch information
otavio committed Mar 7, 2024
1 parent 004317f commit fa4f279
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions updatehub/src/states/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ impl StateChangeImpl for Download {
)
.iter()
.filter(|o| !o.allow_remote_install())
.inspect(|o| {
trace!(
"{} has status {:?}",
o.filename(),
o.status(download_dir).expect("failed to get object status")
)
})
.all(|o| o.status(download_dir).ok() == Some(object::info::Status::Ready))
{
Ok((
Expand Down
2 changes: 2 additions & 0 deletions updatehub/tests/successful_integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ fn correct_config_update_polling() {
<timestamp> DEBG <percentage>% of the file has been downloaded
<timestamp> DEBG <percentage>% of the file has been downloaded
<timestamp> DEBG 100% of the file has been downloaded
<timestamp> TRCE testfile has status Ready
<timestamp> TRCE starting to handle 'install' state
<timestamp> INFO installing update: 1.2 (87effe73b80453f397cee4db3c3589a8630b220876dff8fb23447315037ff96d)
<timestamp> INFO using installation set as target 1
Expand Down Expand Up @@ -317,6 +318,7 @@ fn correct_config_update_polling() {
<timestamp> DEBG <percentage>% of the file has been downloaded
<timestamp> DEBG <percentage>% of the file has been downloaded
<timestamp> DEBG 100% of the file has been downloaded
<timestamp> TRCE testfile has status Ready
<timestamp> TRCE starting to handle 'install' state
<timestamp> INFO installing update: 1.2 (87effe73b80453f397cee4db3c3589a8630b220876dff8fb23447315037ff96d)
<timestamp> INFO using installation set as target 1
Expand Down

0 comments on commit fa4f279

Please sign in to comment.