Skip to content

Commit

Permalink
Merge pull request containers#817 from cgwalters/config-ts
Browse files Browse the repository at this point in the history
store: Get timestamp from config or annotation
  • Loading branch information
cgwalters authored Oct 11, 2024
2 parents 927ad1a + ca9534c commit 4621d76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/src/store/ostree_container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ fn create_imagestatus(
l.get(oci_spec::image::ANNOTATION_CREATED)
.map(|s| s.as_str())
})
.or_else(|| config.created().as_deref())
.and_then(try_deserialize_timestamp);

let version = ostree_container::version_for_config(config).map(ToOwned::to_owned);
Expand Down
1 change: 1 addition & 0 deletions tests/booted/readonly/001-test-status.nu
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ let st = bootc status --json --format-version=0 | from json
assert equal $st.apiVersion org.containers.bootc/v1
let st = bootc status --format=yaml | from yaml
assert equal $st.apiVersion org.containers.bootc/v1
assert ($st.status.booted.image.timestamp != null)
tap ok

0 comments on commit 4621d76

Please sign in to comment.