Skip to content

Commit

Permalink
test: More precise bootc check
Browse files Browse the repository at this point in the history
The latest Fedora CoreOS image [1] adds the `bootc` package by default,
but it's not actually booted with bootc:

```
No staged image present
Current booted image: localhost/bootc:latest
    Image version: stream9.20241108.0 (2024-11-09 22:42:18.512463512 UTC)
    Image digest: sha256:7e1298b4888321b4ce4b497a2db0f9786e701cc1435957501049ef80194bba1d
No rollback image present
```

So query for the currently booted bootc image, like `bootc status --help`
suggests.

[1] cockpit-project/bots#7103
  • Loading branch information
martinpitt committed Nov 15, 2024
1 parent 1d47c32 commit c9df20c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/vm.install
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ else
rpm2archive /tmp/cockpit-ostree-*.rpm | tar -C / --transform 's,/usr/,/usr/local/,' -xzv
fi

if bootc status >/dev/null; then
if bootc status --json | jq .status.booted.image | grep -q version; then
# for bootc, create a "cockpit1" tag with a removed package, so that we can tell apart the versions in the UI
podman run -d --name ostree-registry -p 5000:5000 -v /var/lib/cockpit-test-registry/:/var/lib/registry localhost/test-registry
printf 'FROM localhost:5000/bootc:latest\nRUN rpm -e --verbose less' | podman build -t localhost:5000/bootc:cockpit1 -
Expand Down

0 comments on commit c9df20c

Please sign in to comment.