diff --git a/.zuul.yaml b/.zuul.yaml index c8c734a9a..03352da6d 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -59,6 +59,17 @@ pre-run: playbooks/setup-env.yaml run: playbooks/system-test.yaml +- job: + name: system-test-fedora-42 + description: Run Toolbx's system tests in Fedora 42 + timeout: 9000 + nodeset: + nodes: + - name: fedora-42 + label: cloud-fedora-42 + pre-run: playbooks/setup-env.yaml + run: playbooks/system-test.yaml + - job: name: system-test-fedora-41 description: Run Toolbx's system tests in Fedora 41 @@ -81,39 +92,28 @@ pre-run: playbooks/setup-env.yaml run: playbooks/system-test.yaml -- job: - name: system-test-fedora-39 - description: Run Toolbx's system tests in Fedora 39 - timeout: 9000 - nodeset: - nodes: - - name: fedora-39 - label: cloud-fedora-39 - pre-run: playbooks/setup-env.yaml - run: playbooks/system-test.yaml - - project: periodic: jobs: - system-test-fedora-rawhide + - system-test-fedora-42 - system-test-fedora-41 - system-test-fedora-40 - - system-test-fedora-39 check: jobs: - unit-test - unit-test-migration-path-for-coreos-toolbox - unit-test-restricted - system-test-fedora-rawhide + - system-test-fedora-42 - system-test-fedora-41 - system-test-fedora-40 - - system-test-fedora-39 gate: jobs: - unit-test - unit-test-migration-path-for-coreos-toolbox - unit-test-restricted - system-test-fedora-rawhide + - system-test-fedora-42 - system-test-fedora-41 - system-test-fedora-40 - - system-test-fedora-39 diff --git a/test/system/002-help.bats b/test/system/002-help.bats index 695c51f92..38ff39743 100644 --- a/test/system/002-help.bats +++ b/test/system/002-help.bats @@ -21,6 +21,11 @@ load 'libs/helpers.bash' setup() { _setup_environment + pushd "$HOME" || return 1 +} + +teardown() { + popd || return 1 } @test "help: Smoke test" { diff --git a/test/system/101-create.bats b/test/system/101-create.bats index 02791673e..097929666 100644 --- a/test/system/101-create.bats +++ b/test/system/101-create.bats @@ -639,8 +639,6 @@ teardown() { } @test "create: Try using both --distro and --image" { - pull_distro_image fedora 34 - run "$TOOLBOX" --assumeyes create --distro fedora --image fedora-toolbox:34 assert_failure @@ -650,8 +648,6 @@ teardown() { } @test "create: Try using both --image and --release" { - pull_distro_image fedora 34 - run "$TOOLBOX" --assumeyes create --image fedora-toolbox:34 --release 34 assert_failure diff --git a/test/system/203-network.bats b/test/system/203-network.bats index 4d88dc4e6..73fc5f88b 100644 --- a/test/system/203-network.bats +++ b/test/system/203-network.bats @@ -31,14 +31,21 @@ print(addr)' readonly RESOLVER_SH='resolvectl --legend false --no-pager --type "$0" query "$1" \ | cut --delimiter " " --fields 4' -setup() { +setup_file() { bats_require_minimum_version 1.7.0 _setup_environment cleanup_all pushd "$HOME" || return 1 + create_default_container + create_distro_container arch latest arch-toolbox-latest + create_distro_container fedora 34 fedora-toolbox-34 + create_distro_container rhel 8.7 rhel-toolbox-8.7 + create_distro_container ubuntu 16.04 ubuntu-toolbox-16.04 + create_distro_container ubuntu 18.04 ubuntu-toolbox-18.04 + create_distro_container ubuntu 20.04 ubuntu-toolbox-20.04 } -teardown() { +teardown_file() { popd || return 1 cleanup_all } @@ -47,8 +54,6 @@ teardown() { local ns_host ns_host=$(readlink /proc/$$/ns/net) - create_default_container - run --keep-empty-lines --separate-stderr "$TOOLBOX" run sh -c 'readlink /proc/$$/ns/net' assert_success @@ -65,8 +70,6 @@ teardown() { } @test "network: /etc/resolv.conf inside the default container" { - create_default_container - run --keep-empty-lines --separate-stderr "$TOOLBOX" run readlink /etc/resolv.conf assert_success @@ -83,8 +86,6 @@ teardown() { } @test "network: /etc/resolv.conf inside Arch Linux" { - create_distro_container arch latest arch-toolbox-latest - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro arch readlink /etc/resolv.conf assert_success @@ -101,8 +102,6 @@ teardown() { } @test "network: /etc/resolv.conf inside Fedora 34" { - create_distro_container fedora 34 fedora-toolbox-34 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro fedora --release 34 readlink /etc/resolv.conf assert_success @@ -119,8 +118,6 @@ teardown() { } @test "network: /etc/resolv.conf inside RHEL 8.7" { - create_distro_container rhel 8.7 rhel-toolbox-8.7 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro rhel --release 8.7 readlink /etc/resolv.conf assert_success @@ -137,8 +134,6 @@ teardown() { } @test "network: /etc/resolv.conf inside Ubuntu 16.04" { - create_distro_container ubuntu 16.04 ubuntu-toolbox-16.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro ubuntu --release 16.04 readlink /etc/resolv.conf assert_success @@ -155,8 +150,6 @@ teardown() { } @test "network: /etc/resolv.conf inside Ubuntu 18.04" { - create_distro_container ubuntu 18.04 ubuntu-toolbox-18.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro ubuntu --release 18.04 readlink /etc/resolv.conf assert_success @@ -173,8 +166,6 @@ teardown() { } @test "network: /etc/resolv.conf inside Ubuntu 20.04" { - create_distro_container ubuntu 20.04 ubuntu-toolbox-20.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro ubuntu --release 20.04 readlink /etc/resolv.conf assert_success @@ -207,8 +198,6 @@ teardown() { skip "DNS not working on host" fi - create_default_container - if ! $ipv4_skip; then run --keep-empty-lines --separate-stderr "$TOOLBOX" run python3 -c "$RESOLVER_PYTHON3" A k.root-servers.net @@ -257,8 +246,6 @@ teardown() { skip "DNS not working on host" fi - create_distro_container arch latest arch-toolbox-latest - if ! $ipv4_skip; then run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro arch \ @@ -311,8 +298,6 @@ teardown() { skip "DNS not working on host" fi - create_distro_container fedora 34 fedora-toolbox-34 - if ! $ipv4_skip; then run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro fedora \ @@ -367,8 +352,6 @@ teardown() { skip "DNS not working on host" fi - create_distro_container rhel 8.7 rhel-toolbox-8.7 - if ! $ipv4_skip; then run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro rhel \ @@ -423,8 +406,6 @@ teardown() { skip "DNS not working on host" fi - create_distro_container ubuntu 16.04 ubuntu-toolbox-16.04 - if ! $ipv4_skip; then run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro ubuntu \ @@ -479,8 +460,6 @@ teardown() { skip "DNS not working on host" fi - create_distro_container ubuntu 18.04 ubuntu-toolbox-18.04 - if ! $ipv4_skip; then run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro ubuntu \ @@ -535,8 +514,6 @@ teardown() { skip "DNS not working on host" fi - create_distro_container ubuntu 20.04 ubuntu-toolbox-20.04 - if ! $ipv4_skip; then run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro ubuntu \ @@ -575,8 +552,6 @@ teardown() { } @test "network: ping(8) inside the default container" { - create_default_container - run --keep-empty-lines --separate-stderr "$TOOLBOX" run ping -c 2 f.root-servers.net if [ "$status" -eq 1 ]; then @@ -591,8 +566,6 @@ teardown() { } @test "network: ping(8) inside Arch Linux" { - create_distro_container arch latest arch-toolbox-latest - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro arch ping -c 2 f.root-servers.net if [ "$status" -eq 1 ]; then @@ -607,8 +580,6 @@ teardown() { } @test "network: ping(8) inside Fedora 34" { - create_distro_container fedora 34 fedora-toolbox-34 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro fedora --release 34 ping -c 2 f.root-servers.net if [ "$status" -eq 1 ]; then @@ -623,8 +594,6 @@ teardown() { } @test "network: ping(8) inside RHEL 8.7" { - create_distro_container rhel 8.7 rhel-toolbox-8.7 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro rhel --release 8.7 ping -c 2 f.root-servers.net if [ "$status" -eq 1 ]; then @@ -639,8 +608,6 @@ teardown() { } @test "network: ping(8) inside Ubuntu 16.04" { - create_distro_container ubuntu 16.04 ubuntu-toolbox-16.04 - run -2 --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro ubuntu --release 16.04 ping -c 2 f.root-servers.net assert_failure @@ -653,8 +620,6 @@ teardown() { } @test "network: ping(8) inside Ubuntu 18.04" { - create_distro_container ubuntu 18.04 ubuntu-toolbox-18.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro ubuntu --release 18.04 ping -c 2 f.root-servers.net if [ "$status" -eq 1 ]; then @@ -669,8 +634,6 @@ teardown() { } @test "network: ping(8) inside Ubuntu 20.04" { - create_distro_container ubuntu 20.04 ubuntu-toolbox-20.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro ubuntu --release 20.04 ping -c 2 f.root-servers.net if [ "$status" -eq 1 ]; then diff --git a/test/system/206-user.bats b/test/system/206-user.bats index b51434ac2..5d31ae032 100644 --- a/test/system/206-user.bats +++ b/test/system/206-user.bats @@ -19,14 +19,21 @@ load 'libs/bats-support/load' load 'libs/bats-assert/load' load 'libs/helpers' -setup() { +setup_file() { bats_require_minimum_version 1.7.0 _setup_environment cleanup_all pushd "$HOME" || return 1 + create_default_container + create_distro_container arch latest arch-toolbox-latest + create_distro_container fedora 34 fedora-toolbox-34 + create_distro_container rhel 8.7 rhel-toolbox-8.7 + create_distro_container ubuntu 16.04 ubuntu-toolbox-16.04 + create_distro_container ubuntu 18.04 ubuntu-toolbox-18.04 + create_distro_container ubuntu 20.04 ubuntu-toolbox-20.04 } -teardown() { +teardown_file() { popd || return 1 cleanup_all } @@ -35,8 +42,6 @@ teardown() { local ns_host ns_host=$(readlink /proc/$$/ns/user) - create_default_container - run --keep-empty-lines --separate-stderr "$TOOLBOX" run sh -c 'readlink /proc/$$/ns/user' assert_success @@ -57,7 +62,6 @@ teardown() { local default_container default_container="$(get_system_id)-toolbox-$(get_system_version)" - create_default_container container_root_file_system="$("$PODMAN" unshare "$PODMAN" mount "$default_container")" "$TOOLBOX" run true @@ -74,7 +78,6 @@ teardown() { } @test "user: root in shadow(5) inside Arch Linux" { - create_distro_container arch latest arch-toolbox-latest container_root_file_system="$("$PODMAN" unshare "$PODMAN" mount arch-toolbox-latest)" "$TOOLBOX" run --distro arch true @@ -91,7 +94,6 @@ teardown() { } @test "user: root in shadow(5) inside Fedora 34" { - create_distro_container fedora 34 fedora-toolbox-34 container_root_file_system="$("$PODMAN" unshare "$PODMAN" mount fedora-toolbox-34)" "$TOOLBOX" run --distro fedora --release 34 true @@ -108,7 +110,6 @@ teardown() { } @test "user: root in shadow(5) inside RHEL 8.7" { - create_distro_container rhel 8.7 rhel-toolbox-8.7 container_root_file_system="$("$PODMAN" unshare "$PODMAN" mount rhel-toolbox-8.7)" "$TOOLBOX" run --distro rhel --release 8.7 true @@ -125,7 +126,6 @@ teardown() { } @test "user: root in shadow(5) inside Ubuntu 16.04" { - create_distro_container ubuntu 16.04 ubuntu-toolbox-16.04 container_root_file_system="$("$PODMAN" unshare "$PODMAN" mount ubuntu-toolbox-16.04)" "$TOOLBOX" run --distro ubuntu --release 16.04 true @@ -142,7 +142,6 @@ teardown() { } @test "user: root in shadow(5) inside Ubuntu 18.04" { - create_distro_container ubuntu 18.04 ubuntu-toolbox-18.04 container_root_file_system="$("$PODMAN" unshare "$PODMAN" mount ubuntu-toolbox-18.04)" "$TOOLBOX" run --distro ubuntu --release 18.04 true @@ -159,7 +158,6 @@ teardown() { } @test "user: root in shadow(5) inside Ubuntu 20.04" { - create_distro_container ubuntu 20.04 ubuntu-toolbox-20.04 container_root_file_system="$("$PODMAN" unshare "$PODMAN" mount ubuntu-toolbox-20.04)" "$TOOLBOX" run --distro ubuntu --release 20.04 true @@ -182,8 +180,6 @@ teardown() { local user_id_real user_id_real="$(id --real --user)" - create_default_container - run --keep-empty-lines --separate-stderr "$TOOLBOX" run cat /etc/passwd assert_success @@ -201,8 +197,6 @@ teardown() { local user_id_real user_id_real="$(id --real --user)" - create_distro_container arch latest arch-toolbox-latest - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro arch cat /etc/passwd assert_success @@ -220,8 +214,6 @@ teardown() { local user_id_real user_id_real="$(id --real --user)" - create_distro_container fedora 34 fedora-toolbox-34 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro fedora --release 34 cat /etc/passwd assert_success @@ -239,8 +231,6 @@ teardown() { local user_id_real user_id_real="$(id --real --user)" - create_distro_container rhel 8.7 rhel-toolbox-8.7 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro rhel --release 8.7 cat /etc/passwd assert_success @@ -258,8 +248,6 @@ teardown() { local user_id_real user_id_real="$(id --real --user)" - create_distro_container ubuntu 16.04 ubuntu-toolbox-16.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro ubuntu --release 16.04 cat /etc/passwd assert_success @@ -277,8 +265,6 @@ teardown() { local user_id_real user_id_real="$(id --real --user)" - create_distro_container ubuntu 18.04 ubuntu-toolbox-18.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro ubuntu --release 18.04 cat /etc/passwd assert_success @@ -296,8 +282,6 @@ teardown() { local user_id_real user_id_real="$(id --real --user)" - create_distro_container ubuntu 20.04 ubuntu-toolbox-20.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro ubuntu --release 20.04 cat /etc/passwd assert_success @@ -312,7 +296,6 @@ teardown() { local default_container default_container="$(get_system_id)-toolbox-$(get_system_version)" - create_default_container container_root_file_system="$("$PODMAN" unshare "$PODMAN" mount "$default_container")" "$TOOLBOX" run true @@ -329,7 +312,6 @@ teardown() { } @test "user: $USER in shadow(5) inside Arch Linux" { - create_distro_container arch latest arch-toolbox-latest container_root_file_system="$("$PODMAN" unshare "$PODMAN" mount arch-toolbox-latest)" "$TOOLBOX" run --distro arch true @@ -346,7 +328,6 @@ teardown() { } @test "user: $USER in shadow(5) inside Fedora 34" { - create_distro_container fedora 34 fedora-toolbox-34 container_root_file_system="$("$PODMAN" unshare "$PODMAN" mount fedora-toolbox-34)" "$TOOLBOX" run --distro fedora --release 34 true @@ -363,7 +344,6 @@ teardown() { } @test "user: $USER in shadow(5) inside RHEL 8.7" { - create_distro_container rhel 8.7 rhel-toolbox-8.7 container_root_file_system="$("$PODMAN" unshare "$PODMAN" mount rhel-toolbox-8.7)" "$TOOLBOX" run --distro rhel --release 8.7 true @@ -380,7 +360,6 @@ teardown() { } @test "user: $USER in shadow(5) inside Ubuntu 16.04" { - create_distro_container ubuntu 16.04 ubuntu-toolbox-16.04 container_root_file_system="$("$PODMAN" unshare "$PODMAN" mount ubuntu-toolbox-16.04)" "$TOOLBOX" run --distro ubuntu --release 16.04 true @@ -397,7 +376,6 @@ teardown() { } @test "user: $USER in shadow(5) inside Ubuntu 18.04" { - create_distro_container ubuntu 18.04 ubuntu-toolbox-18.04 container_root_file_system="$("$PODMAN" unshare "$PODMAN" mount ubuntu-toolbox-18.04)" "$TOOLBOX" run --distro ubuntu --release 18.04 true @@ -414,7 +392,6 @@ teardown() { } @test "user: $USER in shadow(5) inside Ubuntu 20.04" { - create_distro_container ubuntu 20.04 ubuntu-toolbox-20.04 container_root_file_system="$("$PODMAN" unshare "$PODMAN" mount ubuntu-toolbox-20.04)" "$TOOLBOX" run --distro ubuntu --release 20.04 true @@ -431,8 +408,6 @@ teardown() { } @test "user: $USER in group(5) inside the default container" { - create_default_container - run --keep-empty-lines --separate-stderr "$TOOLBOX" run cat /etc/group assert_success @@ -444,8 +419,6 @@ teardown() { } @test "user: $USER in group(5) inside Arch Linux" { - create_distro_container arch latest arch-toolbox-latest - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro arch cat /etc/group assert_success @@ -457,8 +430,6 @@ teardown() { } @test "user: $USER in group(5) inside Fedora 34" { - create_distro_container fedora 34 fedora-toolbox-34 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro fedora --release 34 cat /etc/group assert_success @@ -470,8 +441,6 @@ teardown() { } @test "user: $USER in group(5) inside RHEL 8.7" { - create_distro_container rhel 8.7 rhel-toolbox-8.7 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro rhel --release 8.7 cat /etc/group assert_success @@ -483,8 +452,6 @@ teardown() { } @test "user: $USER in group(5) inside Ubuntu 16.04" { - create_distro_container ubuntu 16.04 ubuntu-toolbox-16.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro ubuntu --release 16.04 cat /etc/group assert_success @@ -496,8 +463,6 @@ teardown() { } @test "user: $USER in group(5) inside Ubuntu 18.04" { - create_distro_container ubuntu 18.04 ubuntu-toolbox-18.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro ubuntu --release 18.04 cat /etc/group assert_success @@ -509,8 +474,6 @@ teardown() { } @test "user: $USER in group(5) inside Ubuntu 20.04" { - create_distro_container ubuntu 20.04 ubuntu-toolbox-20.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run --distro ubuntu --release 20.04 cat /etc/group assert_success diff --git a/test/system/211-dbus.bats b/test/system/211-dbus.bats index ca34101ac..2eb3de198 100644 --- a/test/system/211-dbus.bats +++ b/test/system/211-dbus.bats @@ -19,14 +19,21 @@ load 'libs/bats-support/load' load 'libs/bats-assert/load' load 'libs/helpers' -setup() { +setup_file() { bats_require_minimum_version 1.7.0 _setup_environment cleanup_all pushd "$HOME" || return 1 + create_default_container + create_distro_container arch latest arch-toolbox-latest + create_distro_container fedora 34 fedora-toolbox-34 + create_distro_container rhel 8.7 rhel-toolbox-8.7 + create_distro_container ubuntu 16.04 ubuntu-toolbox-16.04 + create_distro_container ubuntu 18.04 ubuntu-toolbox-18.04 + create_distro_container ubuntu 20.04 ubuntu-toolbox-20.04 } -teardown() { +teardown_file() { popd || return 1 cleanup_all } @@ -39,8 +46,6 @@ teardown() { --object-path /org/freedesktop/DBus \ --method org.freedesktop.DBus.Peer.Ping)" - create_default_container - run --keep-empty-lines --separate-stderr "$TOOLBOX" run gdbus call \ --session \ --dest org.freedesktop.DBus \ @@ -68,8 +73,6 @@ teardown() { --object-path /org/freedesktop/DBus \ --method org.freedesktop.DBus.Peer.Ping)" - create_distro_container arch latest arch-toolbox-latest - run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro arch \ gdbus call \ @@ -99,8 +102,6 @@ teardown() { --object-path /org/freedesktop/DBus \ --method org.freedesktop.DBus.Peer.Ping)" - create_distro_container fedora 34 fedora-toolbox-34 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro fedora \ --release 34 \ @@ -131,8 +132,6 @@ teardown() { --object-path /org/freedesktop/DBus \ --method org.freedesktop.DBus.Peer.Ping)" - create_distro_container rhel 8.7 rhel-toolbox-8.7 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro rhel \ --release 8.7 \ @@ -158,8 +157,6 @@ teardown() { @test "dbus: session bus inside Ubuntu 16.04" { busctl --user call org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.Peer Ping - create_distro_container ubuntu 16.04 ubuntu-toolbox-16.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro ubuntu \ --release 16.04 \ @@ -177,8 +174,6 @@ teardown() { @test "dbus: session bus inside Ubuntu 18.04" { busctl --user call org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.Peer Ping - create_distro_container ubuntu 18.04 ubuntu-toolbox-18.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro ubuntu \ --release 18.04 \ @@ -196,8 +191,6 @@ teardown() { @test "dbus: session bus inside Ubuntu 20.04" { busctl --user call org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.Peer Ping - create_distro_container ubuntu 20.04 ubuntu-toolbox-20.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro ubuntu \ --release 20.04 \ @@ -222,8 +215,6 @@ teardown() { org.freedesktop.systemd1.Manager \ Version)" - create_default_container - run --keep-empty-lines --separate-stderr "$TOOLBOX" run gdbus call \ --system \ --dest org.freedesktop.systemd1 \ @@ -255,8 +246,6 @@ teardown() { org.freedesktop.systemd1.Manager \ Version)" - create_distro_container arch latest arch-toolbox-latest - run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro arch \ gdbus call \ @@ -290,8 +279,6 @@ teardown() { org.freedesktop.systemd1.Manager \ Version)" - create_distro_container fedora 34 fedora-toolbox-34 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro fedora \ --release 34 \ @@ -326,8 +313,6 @@ teardown() { org.freedesktop.systemd1.Manager \ Version)" - create_distro_container rhel 8.7 rhel-toolbox-8.7 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro rhel \ --release 8.7 \ @@ -360,8 +345,6 @@ teardown() { org.freedesktop.systemd1.Manager \ Version)" - create_distro_container ubuntu 16.04 ubuntu-toolbox-16.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro ubuntu \ --release 16.04 \ @@ -392,8 +375,6 @@ teardown() { org.freedesktop.systemd1.Manager \ Version)" - create_distro_container ubuntu 18.04 ubuntu-toolbox-18.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro ubuntu \ --release 18.04 \ @@ -424,8 +405,6 @@ teardown() { org.freedesktop.systemd1.Manager \ Version)" - create_distro_container ubuntu 20.04 ubuntu-toolbox-20.04 - run --keep-empty-lines --separate-stderr "$TOOLBOX" run \ --distro ubuntu \ --release 20.04 \ diff --git a/test/system/220-environment-variables.bats b/test/system/220-environment-variables.bats index bc818b29c..21062efcf 100644 --- a/test/system/220-environment-variables.bats +++ b/test/system/220-environment-variables.bats @@ -19,21 +19,26 @@ load 'libs/bats-support/load' load 'libs/bats-assert/load' load 'libs/helpers' -setup() { +setup_file() { bats_require_minimum_version 1.7.0 _setup_environment cleanup_all pushd "$HOME" || return 1 + create_default_container + create_distro_container arch latest arch-toolbox-latest + create_distro_container fedora 34 fedora-toolbox-34 + create_distro_container rhel 8.7 rhel-toolbox-8.7 + create_distro_container ubuntu 16.04 ubuntu-toolbox-16.04 + create_distro_container ubuntu 18.04 ubuntu-toolbox-18.04 + create_distro_container ubuntu 20.04 ubuntu-toolbox-20.04 } -teardown() { +teardown_file() { popd || return 1 cleanup_all } @test "environment variables: HISTFILESIZE inside the default container" { - create_default_container - if [ "$HISTFILESIZE" = "" ]; then # shellcheck disable=SC2030 HISTFILESIZE=1001 @@ -62,8 +67,6 @@ teardown() { @test "environment variables: HISTSIZE inside the default container" { skip "https://pagure.io/setup/pull-request/48" - create_default_container - if [ "$HISTSIZE" = "" ]; then # shellcheck disable=SC2030 HISTSIZE=1001 @@ -90,8 +93,6 @@ teardown() { } @test "environment variables: HISTFILESIZE inside Arch Linux" { - create_distro_container arch latest arch-toolbox-latest - # shellcheck disable=SC2031 if [ "$HISTFILESIZE" = "" ]; then # shellcheck disable=SC2030 @@ -119,8 +120,6 @@ teardown() { } @test "environment variables: HISTSIZE inside Arch Linux" { - create_distro_container arch latest arch-toolbox-latest - # shellcheck disable=SC2031 if [ "$HISTSIZE" = "" ]; then # shellcheck disable=SC2030 @@ -148,8 +147,6 @@ teardown() { } @test "environment variables: HISTFILESIZE inside Fedora 34" { - create_distro_container fedora 34 fedora-toolbox-34 - # shellcheck disable=SC2031 if [ "$HISTFILESIZE" = "" ]; then # shellcheck disable=SC2030 @@ -179,8 +176,6 @@ teardown() { @test "environment variables: HISTSIZE inside Fedora 34" { skip "https://pagure.io/setup/pull-request/48" - create_distro_container fedora 34 fedora-toolbox-34 - # shellcheck disable=SC2031 if [ "$HISTSIZE" = "" ]; then # shellcheck disable=SC2030 @@ -208,8 +203,6 @@ teardown() { } @test "environment variables: HISTFILESIZE inside RHEL 8.7" { - create_distro_container rhel 8.7 rhel-toolbox-8.7 - # shellcheck disable=SC2031 if [ "$HISTFILESIZE" = "" ]; then # shellcheck disable=SC2030 @@ -239,8 +232,6 @@ teardown() { @test "environment variables: HISTSIZE inside RHEL 8.7" { skip "https://pagure.io/setup/pull-request/48" - create_distro_container rhel 8.7 rhel-toolbox-8.7 - # shellcheck disable=SC2031 if [ "$HISTSIZE" = "" ]; then # shellcheck disable=SC2030 @@ -268,8 +259,6 @@ teardown() { } @test "environment variables: HISTFILESIZE inside Ubuntu 16.04" { - create_distro_container ubuntu 16.04 ubuntu-toolbox-16.04 - # shellcheck disable=SC2031 if [ "$HISTFILESIZE" = "" ]; then # shellcheck disable=SC2030 @@ -298,8 +287,6 @@ teardown() { } @test "environment variables: HISTSIZE inside Ubuntu 16.04" { - create_distro_container ubuntu 16.04 ubuntu-toolbox-16.04 - # shellcheck disable=SC2031 if [ "$HISTSIZE" = "" ]; then # shellcheck disable=SC2030 @@ -327,8 +314,6 @@ teardown() { } @test "environment variables: HISTFILESIZE inside Ubuntu 18.04" { - create_distro_container ubuntu 18.04 ubuntu-toolbox-18.04 - # shellcheck disable=SC2031 if [ "$HISTFILESIZE" = "" ]; then # shellcheck disable=SC2030 @@ -357,8 +342,6 @@ teardown() { } @test "environment variables: HISTSIZE inside Ubuntu 18.04" { - create_distro_container ubuntu 18.04 ubuntu-toolbox-18.04 - # shellcheck disable=SC2031 if [ "$HISTSIZE" = "" ]; then # shellcheck disable=SC2030 @@ -386,8 +369,6 @@ teardown() { } @test "environment variables: HISTFILESIZE inside Ubuntu 20.04" { - create_distro_container ubuntu 20.04 ubuntu-toolbox-20.04 - # shellcheck disable=SC2031 if [ "$HISTFILESIZE" = "" ]; then HISTFILESIZE=1001 @@ -415,8 +396,6 @@ teardown() { } @test "environment variables: HISTSIZE inside Ubuntu 20.04" { - create_distro_container ubuntu 20.04 ubuntu-toolbox-20.04 - # shellcheck disable=SC2031 if [ "$HISTSIZE" = "" ]; then HISTSIZE=1001