test/system: Use fully qualified image names to check the 'list' output
https://github.com/containers/toolbox/pull/1273
This commit is contained in:
parent
164c9eff36
commit
55bf3d06a8
1 changed files with 9 additions and 6 deletions
|
@ -243,6 +243,9 @@ teardown() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "list: Containers and images" {
|
@test "list: Containers and images" {
|
||||||
|
local default_image
|
||||||
|
default_image="$(get_default_image)"
|
||||||
|
|
||||||
# Pull the two images
|
# Pull the two images
|
||||||
pull_default_image
|
pull_default_image
|
||||||
pull_distro_image fedora 34
|
pull_distro_image fedora 34
|
||||||
|
@ -256,8 +259,8 @@ teardown() {
|
||||||
run --keep-empty-lines --separate-stderr $TOOLBOX list --images
|
run --keep-empty-lines --separate-stderr $TOOLBOX list --images
|
||||||
|
|
||||||
assert_success
|
assert_success
|
||||||
assert_line --index 1 --partial "fedora-toolbox:34"
|
assert_line --index 1 --partial "registry.fedoraproject.org/fedora-toolbox:34"
|
||||||
assert_line --index 2 --partial "$(get_system_id)-toolbox:$(get_system_version)"
|
assert_line --index 2 --partial "$default_image"
|
||||||
assert [ ${#lines[@]} -eq 4 ]
|
assert [ ${#lines[@]} -eq 4 ]
|
||||||
assert [ ${#stderr_lines[@]} -eq 0 ]
|
assert [ ${#stderr_lines[@]} -eq 0 ]
|
||||||
|
|
||||||
|
@ -275,8 +278,8 @@ teardown() {
|
||||||
run --keep-empty-lines --separate-stderr $TOOLBOX list
|
run --keep-empty-lines --separate-stderr $TOOLBOX list
|
||||||
|
|
||||||
assert_success
|
assert_success
|
||||||
assert_line --index 1 --partial "fedora-toolbox:34"
|
assert_line --index 1 --partial "registry.fedoraproject.org/fedora-toolbox:34"
|
||||||
assert_line --index 2 --partial "$(get_system_id)-toolbox:$(get_system_version)"
|
assert_line --index 2 --partial "$default_image"
|
||||||
assert_line --index 5 --partial "$(get_system_id)-toolbox-$(get_system_version)"
|
assert_line --index 5 --partial "$(get_system_id)-toolbox-$(get_system_version)"
|
||||||
assert_line --index 6 --partial "non-default-one"
|
assert_line --index 6 --partial "non-default-one"
|
||||||
assert_line --index 7 --partial "non-default-two"
|
assert_line --index 7 --partial "non-default-two"
|
||||||
|
@ -300,7 +303,7 @@ teardown() {
|
||||||
|
|
||||||
assert_success
|
assert_success
|
||||||
assert_line --index 1 --partial "<none>"
|
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_line --index 3 --partial "$default_image"
|
||||||
assert [ ${#lines[@]} -eq 5 ]
|
assert [ ${#lines[@]} -eq 5 ]
|
||||||
assert [ ${#stderr_lines[@]} -eq 0 ]
|
assert [ ${#stderr_lines[@]} -eq 0 ]
|
||||||
|
@ -318,7 +321,7 @@ teardown() {
|
||||||
|
|
||||||
assert_success
|
assert_success
|
||||||
assert_line --index 1 --partial "<none>"
|
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_line --index 3 --partial "$default_image"
|
||||||
assert [ ${#lines[@]} -eq 5 ]
|
assert [ ${#lines[@]} -eq 5 ]
|
||||||
assert [ ${#stderr_lines[@]} -eq 0 ]
|
assert [ ${#stderr_lines[@]} -eq 0 ]
|
||||||
|
|
Loading…
Reference in a new issue