Skip to content

Commit

Permalink
test/system: Test 'list' with an old Fedora Toolbx image
Browse files Browse the repository at this point in the history
It's good to ensure that older well-known Toolbx images continue to work
with newer versions of 'list'.

containers#1273
  • Loading branch information
debarshiray committed Mar 22, 2023
1 parent 50bbc96 commit 14ee7ec
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/system/102-list.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 14ee7ec

Please sign in to comment.