-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Add tmt test for bootc install with LBI
Along with the test, this will install the LBIs on the machine running the tests prior to running the tests. Also refactors the existing LBI test into a separate test plan to make room for the install tests. Signed-off-by: Chris Kyrouac <[email protected]>
- Loading branch information
Showing
9 changed files
with
49 additions
and
2 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,12 @@ | ||
environment+: | ||
TMT_PLUGINS: ./tests/plugins | ||
provision: | ||
how: bootc | ||
add_deps: false | ||
containerfile: tests/containerfiles/lbi/Containerfile | ||
containerfile_workdir: tests/containerfiles/lbi | ||
disk: 20 | ||
summary: Execute logically bound images tests for installing image | ||
execute: | ||
how: tmt | ||
script: exec nu tests/booted/test-logically-bound-install.nu |
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,10 @@ | ||
use std assert | ||
use tap.nu | ||
|
||
let images = podman --storage-opt=additionalimagestore=/usr/lib/bootc/storage images --format {{.Repository}} | from csv --noheaders | ||
print "IMAGES:" | ||
podman --storage-opt=additionalimagestore=/usr/lib/bootc/storage images # for debugging | ||
assert ($images | any {|item| $item.column1 == "quay.io/curl/curl"}) | ||
assert ($images | any {|item| $item.column1 == "quay.io/curl/curl-base"}) | ||
|
||
tap ok |
File renamed without changes.
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,6 @@ | ||
FROM localhost/bootc | ||
|
||
COPY ./usr/. /usr | ||
|
||
RUN ln -s /usr/share/containers/systemd/curl.container /usr/lib/bootc/bound-images.d/curl.container && \ | ||
ln -s /usr/share/containers/systemd/curl-base.image /usr/lib/bootc/bound-images.d/curl-base.image |
2 changes: 2 additions & 0 deletions
2
tests/containerfiles/lbi/usr/share/containers/systemd/curl-base.image
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,2 @@ | ||
[Image] | ||
Image=quay.io/curl/curl-base:latest |
3 changes: 3 additions & 0 deletions
3
tests/containerfiles/lbi/usr/share/containers/systemd/curl.container
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,3 @@ | ||
[Container] | ||
Image=quay.io/curl/curl:latest | ||
GlobalArgs=--storage-opt=additionalimagestore=/usr/lib/bootc/storage |
6 changes: 6 additions & 0 deletions
6
tests/containerfiles/lbi/usr/share/containers/systemd/jboss-webserver-5.image
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,6 @@ | ||
# This is not symlinked to bound-images.d so it should not be pulled. | ||
# It's here to represent an app image that exists | ||
# in a bootc image but is not logically bound. | ||
[Image] | ||
Image=registry.redhat.io/jboss-webserver-5/jws5-rhel8-operator:latest | ||
AuthFile=/root/auth.json |
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