From fead837404355dfb258fcb98bd15521f4f0aec11 Mon Sep 17 00:00:00 2001 From: Penn Bauman Date: Fri, 15 Nov 2024 21:36:04 +0100 Subject: [PATCH] test/system: Enable 101-create.bats on Arch Linux This is a step towards running the CI on Arch Linux. https://github.com/containers/toolbox/issues/1438 https://github.com/containers/toolbox/pull/1535 --- test/system/101-create.bats | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/test/system/101-create.bats b/test/system/101-create.bats index e905e6944..eceaee7e6 100644 --- a/test/system/101-create.bats +++ b/test/system/101-create.bats @@ -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 ] @@ -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 ] @@ -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 ]