Skip to content

Commit

Permalink
Merge pull request containers#937 from cgwalters/drop-custom-tmt2
Browse files Browse the repository at this point in the history
tests: Fix lbi test
  • Loading branch information
henrywang authored Dec 5, 2024
2 parents 3b9f4e4 + 3b61d2c commit ff0260a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 1,131 deletions.
8 changes: 3 additions & 5 deletions plans/test-22-logically-bound-install.fmf
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
environment+:
TMT_PLUGINS: ./tests/plugins
provision:
how: bootc
add_deps: false
containerfile: tests/containerfiles/lbi/Containerfile
containerfile_workdir: tests/containerfiles/lbi
add-tmt-dependencies: false
container-file: tests/containerfiles/lbi/Containerfile
container-file-workdir: tests/containerfiles/lbi
disk: 20
summary: Execute logically bound images tests for installing image
execute:
Expand Down
8 changes: 4 additions & 4 deletions tests/booted/test-logically-bound-install.nu
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ let expected_images = [
"registry.access.redhat.com/ubi9/podman:latest" # this image is signed
]

def validate_images [images: table] {
def validate_images [images: list<string>] {
print $"Validating images ($images)"
for expected in $expected_images {
assert ($images | any {|item| $item.image == $expected})
assert ($expected in $images)
}
}

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

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

validate_images $images
}
Expand Down
1 change: 0 additions & 1 deletion tests/plugins/.gitignore

This file was deleted.

312 changes: 0 additions & 312 deletions tests/plugins/bootc-install.py

This file was deleted.

Loading

0 comments on commit ff0260a

Please sign in to comment.