Skip to content

Commit

Permalink
.github/workflows, test/system: Enable 102-list.bats on Ubuntu 22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
debarshiray committed Nov 11, 2024
1 parent b443428 commit 17852a2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ubuntu-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ jobs:
test/system/001-version.bats \
test/system/002-help.bats \
test/system/101-create.bats \
test/system/102-list.bats \
test/system/103-container.bats \
test/system/105-enter.bats \
test/system/106-rm.bats \
Expand Down
18 changes: 15 additions & 3 deletions test/system/102-list.bats
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,11 @@ teardown() {
local default_image
default_image="$(get_default_image)"

local system_id
system_id="$(get_system_id)"

local default_container
default_container="$(get_system_id)-toolbox-$(get_system_version)"
default_container="$system_id-toolbox-$(get_system_version)"

# Pull the two images
pull_default_image
Expand All @@ -393,8 +396,17 @@ teardown() {
run --keep-empty-lines --separate-stderr "$TOOLBX" list --images

assert_success
assert_line --index 1 --partial "registry.fedoraproject.org/fedora-toolbox:34"
assert_line --index 2 --partial "$default_image"

if [ "$system_id" = "fedora" ]; then
assert_line --index 1 --partial "registry.fedoraproject.org/fedora-toolbox:34"
assert_line --index 2 --partial "$default_image"
elif [ "$system_id" = "ubuntu" ]; then
assert_line --index 1 --partial "$default_image"
assert_line --index 2 --partial "registry.fedoraproject.org/fedora-toolbox:34"
else
fail "Define output for $system_id"
fi

assert [ ${#lines[@]} -eq 3 ]
assert [ ${#stderr_lines[@]} -eq 0 ]

Expand Down

0 comments on commit 17852a2

Please sign in to comment.