Skip to content

Commit

Permalink
test/system: Use fully qualified image names to check the 'list' output
Browse files Browse the repository at this point in the history
  • Loading branch information
debarshiray committed Mar 22, 2023
1 parent 164c9ef commit 55bf3d0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions test/system/102-list.bats
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ teardown() {
}

@test "list: Containers and images" {
local default_image
default_image="$(get_default_image)"

# Pull the two images
pull_default_image
pull_distro_image fedora 34
Expand All @@ -256,8 +259,8 @@ teardown() {
run --keep-empty-lines --separate-stderr $TOOLBOX list --images

assert_success
assert_line --index 1 --partial "fedora-toolbox:34"
assert_line --index 2 --partial "$(get_system_id)-toolbox:$(get_system_version)"
assert_line --index 1 --partial "registry.fedoraproject.org/fedora-toolbox:34"
assert_line --index 2 --partial "$default_image"
assert [ ${#lines[@]} -eq 4 ]
assert [ ${#stderr_lines[@]} -eq 0 ]

Expand All @@ -275,8 +278,8 @@ teardown() {
run --keep-empty-lines --separate-stderr $TOOLBOX list

assert_success
assert_line --index 1 --partial "fedora-toolbox:34"
assert_line --index 2 --partial "$(get_system_id)-toolbox:$(get_system_version)"
assert_line --index 1 --partial "registry.fedoraproject.org/fedora-toolbox:34"
assert_line --index 2 --partial "$default_image"
assert_line --index 5 --partial "$(get_system_id)-toolbox-$(get_system_version)"
assert_line --index 6 --partial "non-default-one"
assert_line --index 7 --partial "non-default-two"
Expand All @@ -300,7 +303,7 @@ teardown() {

assert_success
assert_line --index 1 --partial "<none>"
assert_line --index 2 --partial "fedora-toolbox:34"
assert_line --index 2 --partial "registry.fedoraproject.org/fedora-toolbox:34"
assert_line --index 3 --partial "$default_image"
assert [ ${#lines[@]} -eq 5 ]
assert [ ${#stderr_lines[@]} -eq 0 ]
Expand All @@ -318,7 +321,7 @@ teardown() {

assert_success
assert_line --index 1 --partial "<none>"
assert_line --index 2 --partial "fedora-toolbox:34"
assert_line --index 2 --partial "registry.fedoraproject.org/fedora-toolbox:34"
assert_line --index 3 --partial "$default_image"
assert [ ${#lines[@]} -eq 5 ]
assert [ ${#stderr_lines[@]} -eq 0 ]
Expand Down

0 comments on commit 55bf3d0

Please sign in to comment.