diff --git a/.github/Dockerfile.c7-network-role b/.github/Dockerfile.c7-network-role index 31e49434..97c765f8 100644 --- a/.github/Dockerfile.c7-network-role +++ b/.github/Dockerfile.c7-network-role @@ -1,6 +1,7 @@ FROM quay.io/centos/centos:centos7 -RUN yum -y install epel-release && \ +RUN yum -y install https://dl.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm && \ + sed -i '/^mirror/d;s/#\?\(baseurl=http:\/\/\)mirror/\1vault/' /etc/yum.repos.d/*.repo && \ yum -y upgrade && \ yum -y install NetworkManager NetworkManager-wifi \ procps-ng iproute ansible openssh-server openssh-clients \ diff --git a/.github/Dockerfile.c8s-network-role b/.github/Dockerfile.c8s-network-role index fade9d98..3569f2a3 100644 --- a/.github/Dockerfile.c8s-network-role +++ b/.github/Dockerfile.c8s-network-role @@ -1,6 +1,7 @@ FROM quay.io/centos/centos:stream8 -RUN dnf -y install dnf-plugins-core epel-release && \ +RUN sed -i '/^mirror/d;s/#\(baseurl=http:\/\/\)mirror/\1vault/' /etc/yum.repos.d/*.repo && \ + dnf -y install dnf-plugins-core epel-release && \ dnf config-manager --set-enabled powertools && \ dnf -y upgrade && \ dnf -y install NetworkManager NetworkManager-wifi \ diff --git a/.github/run_test.sh b/.github/run_test.sh index aa837e3b..6a809092 100755 --- a/.github/run_test.sh +++ b/.github/run_test.sh @@ -20,6 +20,7 @@ EXCLUDE_TESTS_C7=' -e tests/tests_bond_removal_initscripts.yml -e tests/tests_infiniband_nm.yml -e tests/tests_team_nm.yml +-e tests/tests_team_plugin_installation_nm.yml -e tests/tests_unit.yml -e tests/tests_wireless_nm.yml ' @@ -37,6 +38,7 @@ EXCLUDE_TESTS_C8S=' -e tests/tests_infiniband_nm.yml -e tests/tests_integration_pytest.yml -e tests/tests_team_nm.yml +-e tests/tests_team_plugin_installation_nm.yml -e tests/tests_unit.yml -e tests/tests_wireless_wpa3_owe_nm.yml -e tests/tests_wireless_wpa3_sae_nm.yml @@ -52,6 +54,7 @@ EXCLUDE_TESTS_C9S=' -e tests/tests_provider_nm.yml -e tests/tests_regression_nm.yml -e tests/tests_team_nm.yml +-e tests/tests_team_plugin_installation_nm.yml -e tests/tests_unit.yml -e tests/tests_wireless_wpa3_owe_nm.yml -e tests/tests_wireless_wpa3_sae_nm.yml @@ -107,6 +110,8 @@ EOF ;; esac +echo "::group::Start test container" + # shellcheck disable=SC2086 CONTAINER_ID=$(podman run -d $PODMAN_OPTS \ -v "$PROJECT_PATH":$TEST_SOURCE_DIR $CONTAINER_IMAGE) @@ -116,6 +121,8 @@ if [ -z "$CONTAINER_ID" ];then exit 1 fi +echo ::endgroup:: + function clean_up { podman rm -f "$CONTAINER_ID" || true } @@ -124,6 +131,8 @@ if [ -z "${DEBUG:-}" ];then trap clean_up ERR EXIT fi +echo "::group::Set up container for testing" + # Ensure we are testing the latest packages and ignore upgrade failure sudo podman exec -i "$CONTAINER_ID" /bin/bash -c 'dnf upgrade -y' || true @@ -163,16 +172,22 @@ for req in meta/collection-requirements.yml tests/collection-requirements.yml; d fi" done +echo ::endgroup:: + for test_file in $TEST_FILES; do + echo "::group::Test $test_file" podman exec -i "$CONTAINER_ID" \ /bin/bash -c \ "cd $TEST_SOURCE_DIR; env ANSIBLE_HOST_KEY_CHECKING=False \ ansible-playbook -i localhost, \ $test_file" + echo ::endgroup:: done if [ -n "${DEBUG:-}" ];then + echo "::group::Cleanup" podman exec -it "$CONTAINER_ID" bash clean_up + echo ::endgroup:: fi