Skip to content

Commit 28e85e6

Browse files
committed
tests: Adapt for newer nushell
It looks like the default `column1` became `column0` which broke this. But really we don't need a table, we just need a list; and piping to `from csv` was a weird way to go about splitting lines into a list. Change the assertion to just expect a list which simplifies the code. Signed-off-by: Colin Walters <[email protected]>
1 parent 4690143 commit 28e85e6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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
}

0 commit comments

Comments
 (0)