Skip to content

Commit

Permalink
test/system: Enable 101-create.bats on Arch Linux
Browse files Browse the repository at this point in the history
This is a step towards running the CI on Arch Linux.

#1438
#1535
  • Loading branch information
pennbauman authored and debarshiray committed Nov 17, 2024
1 parent e805291 commit fead837
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions test/system/101-create.bats
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,22 @@ teardown() {
}

@test "create: Arch Linux" {
local system_id
system_id="$(get_system_id)"

pull_distro_image arch latest

run --separate-stderr "$TOOLBX" create --distro arch

assert_success
assert_line --index 0 "Created container: arch-toolbox-latest"
assert_line --index 1 "Enter with: toolbox enter arch-toolbox-latest"

if [ "$system_id" = "arch" ]; then
assert_line --index 1 "Enter with: toolbox enter"
else
assert_line --index 1 "Enter with: toolbox enter arch-toolbox-latest"
fi

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

Expand All @@ -155,13 +164,22 @@ teardown() {
}

@test "create: Arch Linux ('--release latest')" {
local system_id
system_id="$(get_system_id)"

pull_distro_image arch latest

run --separate-stderr "$TOOLBX" create --distro arch --release latest

assert_success
assert_line --index 0 "Created container: arch-toolbox-latest"
assert_line --index 1 "Enter with: toolbox enter arch-toolbox-latest"

if [ "$system_id" = "arch" ]; then
assert_line --index 1 "Enter with: toolbox enter"
else
assert_line --index 1 "Enter with: toolbox enter arch-toolbox-latest"
fi

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

Expand All @@ -171,13 +189,22 @@ teardown() {
}

@test "create: Arch Linux ('--release rolling')" {
local system_id
system_id="$(get_system_id)"

pull_distro_image arch latest

run --separate-stderr "$TOOLBX" create --distro arch --release rolling

assert_success
assert_line --index 0 "Created container: arch-toolbox-latest"
assert_line --index 1 "Enter with: toolbox enter arch-toolbox-latest"

if [ "$system_id" = "arch" ]; then
assert_line --index 1 "Enter with: toolbox enter"
else
assert_line --index 1 "Enter with: toolbox enter arch-toolbox-latest"
fi

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

Expand Down

0 comments on commit fead837

Please sign in to comment.