From 3d2c2e60aafd86a9bc1e6d77ee12b8400c680a86 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Wed, 18 May 2022 14:59:01 -0700 Subject: [PATCH] ansible-test - Update distro containers. (#77847) * ansible-test - Add a Ubuntu 22.04 container. * ansible-test - Add a Fedora 36 container. * ansible-test - Update distro containers. * Fix dnf test on Fedora 36. * Work around scp test issues. --- .azure-pipelines/azure-pipelines.yml | 8 ++++---- .../fragments/ansible-test-distro-containers.yml | 3 +++ test/integration/targets/apt/tasks/apt-multiarch.yml | 5 +---- test/integration/targets/apt/vars/Ubuntu-22.yml | 1 + test/integration/targets/connection_ssh/runme.sh | 12 ++++++++---- test/integration/targets/dnf/vars/Fedora-33.yml | 2 -- test/integration/targets/dnf/vars/Fedora-34.yml | 2 -- test/integration/targets/dnf/vars/Fedora-35.yml | 2 -- test/integration/targets/dnf/vars/Fedora.yml | 4 ++-- test/lib/ansible_test/_data/completion/docker.txt | 12 +++++++----- 10 files changed, 26 insertions(+), 25 deletions(-) create mode 100644 changelogs/fragments/ansible-test-distro-containers.yml create mode 100644 test/integration/targets/apt/vars/Ubuntu-22.yml delete mode 100644 test/integration/targets/dnf/vars/Fedora-33.yml delete mode 100644 test/integration/targets/dnf/vars/Fedora-34.yml delete mode 100644 test/integration/targets/dnf/vars/Fedora-35.yml diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index d5ba30b3781..ccb8edc3b04 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -116,16 +116,16 @@ stages: test: alpine3 - name: CentOS 7 test: centos7 - - name: Fedora 34 - test: fedora34 - name: Fedora 35 test: fedora35 + - name: Fedora 36 + test: fedora36 - name: openSUSE 15 test: opensuse15 - - name: Ubuntu 18.04 - test: ubuntu1804 - name: Ubuntu 20.04 test: ubuntu2004 + - name: Ubuntu 22.04 + test: ubuntu2204 groups: - 1 - 2 diff --git a/changelogs/fragments/ansible-test-distro-containers.yml b/changelogs/fragments/ansible-test-distro-containers.yml new file mode 100644 index 00000000000..3aade1565bc --- /dev/null +++ b/changelogs/fragments/ansible-test-distro-containers.yml @@ -0,0 +1,3 @@ +minor_changes: + - ansible-test - Ubuntu 22.04 has been added as a test container. + - ansible-test - Fedora 36 has been added as a test container. diff --git a/test/integration/targets/apt/tasks/apt-multiarch.yml b/test/integration/targets/apt/tasks/apt-multiarch.yml index df008d474a2..01f67662c5d 100644 --- a/test/integration/targets/apt/tasks/apt-multiarch.yml +++ b/test/integration/targets/apt/tasks/apt-multiarch.yml @@ -38,10 +38,7 @@ - "not apt_multi_secondary.changed" - name: remove all {{ apt_foreign_arch }} packages - apt: - name: "*:{{ apt_foreign_arch }}" - state: absent - purge: yes + shell: "apt-get remove -y --allow-remove-essential '*:{{ apt_foreign_arch }}'" - name: remove {{ apt_foreign_arch }} architecture command: dpkg --remove-architecture {{ apt_foreign_arch }} diff --git a/test/integration/targets/apt/vars/Ubuntu-22.yml b/test/integration/targets/apt/vars/Ubuntu-22.yml new file mode 100644 index 00000000000..7b32755fbf7 --- /dev/null +++ b/test/integration/targets/apt/vars/Ubuntu-22.yml @@ -0,0 +1 @@ +multiarch_test_pkg: libunistring2 diff --git a/test/integration/targets/connection_ssh/runme.sh b/test/integration/targets/connection_ssh/runme.sh index 4d4302637de..ad817c83011 100755 --- a/test/integration/targets/connection_ssh/runme.sh +++ b/test/integration/targets/connection_ssh/runme.sh @@ -46,14 +46,18 @@ fi set -e -# temporary work-around for issues due to new scp filename checking -# https://github.com/ansible/ansible/issues/52640 -if [[ "$(scp -T 2>&1)" == "usage: scp "* ]]; then +if [[ "$(scp -O 2>&1)" == "usage: scp "* ]]; then + # scp supports the -O option (and thus the -T option as well) + # work-around required + # see: https://www.openssh.com/txt/release-9.0 + scp_args=("-e" "ansible_scp_extra_args=-TO") +elif [[ "$(scp -T 2>&1)" == "usage: scp "* ]]; then # scp supports the -T option # work-around required + # see: https://github.com/ansible/ansible/issues/52640 scp_args=("-e" "ansible_scp_extra_args=-T") else - # scp does not support the -T option + # scp does not support the -T or -O options # no work-around required # however we need to put something in the array to keep older versions of bash happy scp_args=("-e" "") diff --git a/test/integration/targets/dnf/vars/Fedora-33.yml b/test/integration/targets/dnf/vars/Fedora-33.yml deleted file mode 100644 index 859059f122f..00000000000 --- a/test/integration/targets/dnf/vars/Fedora-33.yml +++ /dev/null @@ -1,2 +0,0 @@ -astream_name: '@httpd:2.4/common' -astream_name_no_stream: '@httpd/common' diff --git a/test/integration/targets/dnf/vars/Fedora-34.yml b/test/integration/targets/dnf/vars/Fedora-34.yml deleted file mode 100644 index 859059f122f..00000000000 --- a/test/integration/targets/dnf/vars/Fedora-34.yml +++ /dev/null @@ -1,2 +0,0 @@ -astream_name: '@httpd:2.4/common' -astream_name_no_stream: '@httpd/common' diff --git a/test/integration/targets/dnf/vars/Fedora-35.yml b/test/integration/targets/dnf/vars/Fedora-35.yml deleted file mode 100644 index f99228fbafd..00000000000 --- a/test/integration/targets/dnf/vars/Fedora-35.yml +++ /dev/null @@ -1,2 +0,0 @@ -astream_name: '@varnish:6.0/default' -astream_name_no_stream: '@varnish/default' diff --git a/test/integration/targets/dnf/vars/Fedora.yml b/test/integration/targets/dnf/vars/Fedora.yml index 6e0a798c085..fff6f4b7cba 100644 --- a/test/integration/targets/dnf/vars/Fedora.yml +++ b/test/integration/targets/dnf/vars/Fedora.yml @@ -1,6 +1,6 @@ -astream_name: '@hub:pre-release/default' +astream_name: '@varnish:6.0/default' # For this to work, it needs to be that only shows once in `dnf module list`. # Such packages, that exist on all the versions we test on, are hard to come by. # TODO: This would be solved by using our own repo with modularity/streams. -astream_name_no_stream: '@hub/default' +astream_name_no_stream: '@varnish/default' diff --git a/test/lib/ansible_test/_data/completion/docker.txt b/test/lib/ansible_test/_data/completion/docker.txt index 24a2d8456b3..d56b51ad06c 100644 --- a/test/lib/ansible_test/_data/completion/docker.txt +++ b/test/lib/ansible_test/_data/completion/docker.txt @@ -1,10 +1,12 @@ base image=quay.io/ansible/base-test-container:3.1.0 python=3.10,2.7,3.5,3.6,3.7,3.8,3.9,3.11 seccomp=unconfined default image=quay.io/ansible/default-test-container:6.3.0 python=3.10,2.7,3.5,3.6,3.7,3.8,3.9,3.11 seccomp=unconfined context=collection default image=quay.io/ansible/ansible-core-test-container:6.3.0 python=3.10,2.7,3.5,3.6,3.7,3.8,3.9,3.11 seccomp=unconfined context=ansible-core -alpine3 image=quay.io/ansible/alpine3-test-container:4.0.0 python=3.9 -centos7 image=quay.io/ansible/centos7-test-container:4.0.0 python=2.7 seccomp=unconfined +alpine3 image=quay.io/ansible/alpine3-test-container:4.1.0 python=3.9 +centos7 image=quay.io/ansible/centos7-test-container:4.1.0 python=2.7 seccomp=unconfined fedora34 image=quay.io/ansible/fedora34-test-container:4.0.0 python=3.9 seccomp=unconfined -fedora35 image=quay.io/ansible/fedora35-test-container:4.0.0 python=3.10 seccomp=unconfined -opensuse15 image=quay.io/ansible/opensuse15-test-container:4.0.0 python=3.6 +fedora35 image=quay.io/ansible/fedora35-test-container:4.1.0 python=3.10 seccomp=unconfined +fedora36 image=quay.io/ansible/fedora36-test-container:4.1.0 python=3.10 seccomp=unconfined +opensuse15 image=quay.io/ansible/opensuse15-test-container:4.1.0 python=3.6 ubuntu1804 image=quay.io/ansible/ubuntu1804-test-container:3.1.0 python=3.6 seccomp=unconfined -ubuntu2004 image=quay.io/ansible/ubuntu2004-test-container:4.0.0 python=3.8 seccomp=unconfined +ubuntu2004 image=quay.io/ansible/ubuntu2004-test-container:4.1.0 python=3.8 seccomp=unconfined +ubuntu2204 image=quay.io/ansible/ubuntu2204-test-container:4.1.0 python=3.10 seccomp=unconfined