Skip to content

Commit ff0260a

Browse files
authored
Merge pull request #937 from cgwalters/drop-custom-tmt2
tests: Fix lbi test
2 parents 3b9f4e4 + 3b61d2c commit ff0260a

File tree

7 files changed

+8
-1131
lines changed

7 files changed

+8
-1131
lines changed

plans/test-22-logically-bound-install.fmf

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
environment+:
2-
TMT_PLUGINS: ./tests/plugins
31
provision:
42
how: bootc
5-
add_deps: false
6-
containerfile: tests/containerfiles/lbi/Containerfile
7-
containerfile_workdir: tests/containerfiles/lbi
3+
add-tmt-dependencies: false
4+
container-file: tests/containerfiles/lbi/Containerfile
5+
container-file-workdir: tests/containerfiles/lbi
86
disk: 20
97
summary: Execute logically bound images tests for installing image
108
execute:

tests/booted/test-logically-bound-install.nu

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ let expected_images = [
88
"registry.access.redhat.com/ubi9/podman:latest" # this image is signed
99
]
1010

11-
def validate_images [images: table] {
11+
def validate_images [images: list<string>] {
1212
print $"Validating images ($images)"
1313
for expected in $expected_images {
14-
assert ($images | any {|item| $item.image == $expected})
14+
assert ($expected in $images)
1515
}
1616
}
1717

1818
# This test checks that bootc actually populated the bootc storage with the LBI images
1919
def test_logically_bound_images_in_storage [] {
2020
# Use podman to list the images in the bootc storage
21-
let images = podman --storage-opt=additionalimagestore=/usr/lib/bootc/storage images --format {{.Repository}}:{{.Tag}} | from csv --noheaders | rename --column { column1: image }
21+
let images = podman --storage-opt=additionalimagestore=/usr/lib/bootc/storage images --format {{.Repository}}:{{.Tag}} | split row "\n"
2222

2323
# Debug print
2424
print "IMAGES:"
@@ -30,7 +30,7 @@ def test_logically_bound_images_in_storage [] {
3030
# This test makes sure that bootc itself knows how to list the LBI images in the bootc storage
3131
def test_bootc_image_list [] {
3232
# Use bootc to list the images in the bootc storage
33-
let images = bootc image list --type logical --format json | from json
33+
let images = bootc image list --type logical --format json | from json | get image
3434

3535
validate_images $images
3636
}

tests/plugins/.gitignore

-1
This file was deleted.

tests/plugins/bootc-install.py

-312
This file was deleted.

0 commit comments

Comments
 (0)