forked from containers/bootc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: Wrap ostree-ext via
bootc internals
Today rpm-ostree exposes the `ostree container` verb. As part of taking over from rpm-ostree we need to do the same. Followup to merging ostree-rs-ext in this repository. A next step here is for us to start owning the /usr/libexec/libostree/ext/ostree-container symlink but that will be a followup. Signed-off-by: Colin Walters <[email protected]>
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Verify our wrapped "bootc internals ostree-container" calling into | ||
# the legacy ostree-ext CLI. | ||
use std assert | ||
use tap.nu | ||
|
||
tap begin "verify bootc wrapping ostree-ext" | ||
|
||
# Parse the status and get the booted image | ||
let st = bootc status --json | from json | ||
let booted = $st.status.booted.image | ||
# Then verify we can extract its metadata via the ostree-container code. | ||
let metadata = bootc internals ostree-container image metadata --repo=/ostree/repo $"($booted.image.transport):($booted.image.image)" | from json | ||
assert equal $metadata.mediaType "application/vnd.oci.image.manifest.v1+json" |