test/system: Test 'list' with an old Fedora Toolbx image

It's good to ensure that older well-known Toolbx images continue to work
with newer versions of 'list'.

https://github.com/containers/toolbox/pull/1278
This commit is contained in:
Debarshi Ray 2023-03-22 08:37:30 +01:00
parent 571cfc1296
commit aa9da193c6

View file

@ -118,6 +118,36 @@ teardown() {
assert [ ${#stderr_lines[@]} -eq 0 ]
}
@test "list: Fedora 34 image" {
pull_distro_image fedora 34
local num_of_images
num_of_images="$(list_images)"
assert_equal "$num_of_images" 1
run --keep-empty-lines --separate-stderr "$TOOLBOX" list
assert_success
assert_line --index 1 --partial "registry.fedoraproject.org/fedora-toolbox:34"
assert [ ${#lines[@]} -eq 3 ]
assert [ ${#stderr_lines[@]} -eq 0 ]
}
@test "list: Fedora 34 image (using --images)" {
pull_distro_image fedora 34
local num_of_images
num_of_images="$(list_images)"
assert_equal "$num_of_images" 1
run --keep-empty-lines --separate-stderr "$TOOLBOX" list --images
assert_success
assert_line --index 1 --partial "registry.fedoraproject.org/fedora-toolbox:34"
assert [ ${#lines[@]} -eq 3 ]
assert [ ${#stderr_lines[@]} -eq 0 ]
}
@test "list: An image without a name" {
build_image_without_name >/dev/null