From 33b9b46fb635cf15e0aa35099110aeaa3a9c55b7 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Thu, 24 Oct 2019 02:44:15 +0300 Subject: [PATCH] tests: switch to using podman instead of docker Note: use podman-docker to avoid changing tests too much. This is also what we have on the RHEL branches. There's no service to be started/restarted so remove everything related to docker service. Cherry-picked from e1b45958f4a6262027bbfc9052f8a968417d1b96 Related: rhbz#1770193 --- test/vm.install | 9 ++++++++- tests/cli/test_compose_tar.sh | 9 --------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/test/vm.install b/test/vm.install index 31573554..1f0be3b7 100755 --- a/test/vm.install +++ b/test/vm.install @@ -81,4 +81,11 @@ rpm -e --verbose $(basename -a ${packages[@]} | sed 's/-[0-9].*.rpm$//') || true yum install -y $packages systemctl enable lorax-composer.socket -systemctl enable docker.service + +if [ -f /usr/bin/docker ]; then + yum remove -y $(rpm -qf /usr/bin/docker) +fi + +if ! rpm -q podman-docker; then + yum install -y podman-docker +fi diff --git a/tests/cli/test_compose_tar.sh b/tests/cli/test_compose_tar.sh index c14b49e2..2b56c46e 100755 --- a/tests/cli/test_compose_tar.sh +++ b/tests/cli/test_compose_tar.sh @@ -18,7 +18,6 @@ CLI="${CLI:-./src/bin/composer-cli}" rlJournalStart rlPhaseStartSetup rlAssertExists /usr/bin/docker - rlRun -t -c "systemctl restart docker" rlPhaseEnd rlPhaseStartTest "compose start" @@ -31,14 +30,6 @@ rlJournalStart rlPhaseStartTest "compose finished" wait_for_compose $UUID - - # Running a compose can lead to a different selinux policy in the - # kernel, which may break docker. Reload the policy from the host and - # restart docker as a workaround. - # See https://bugzilla.redhat.com/show_bug.cgi?id=1711813 - semodule -R - systemctl restart docker - rlRun -t -c "$CLI compose image $UUID" IMAGE="$UUID-root.tar.xz" rlPhaseEnd