summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2024-06-18 01:17:04 +0200
committerGitHub <noreply@github.com>2024-06-18 01:17:04 +0200
commitdad6f077319d993c0fa440dd426174a54f034c53 (patch)
tree533515cd9542f01b458216209ffba9c9ff9da41f /test
parentAdded docstrings to V2 methods in the CallbackBase Class (2 & 3 of 27) (#83342) (diff)
downloadansible-dad6f077319d993c0fa440dd426174a54f034c53.tar.xz
ansible-dad6f077319d993c0fa440dd426174a54f034c53.zip
ansible-test - Update tested platforms (#83446)
* ansible-test - Update tested platforms * Add work-around for Alpine tests * Fix prepare_http_tests on Fedora * Fix deb-src setup for Ubuntu 24.04+ * Set multiarch_test_pkg for Ubuntu 24.04 * Update AZP test matrix
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/targets/ansible-test-container/runme.py18
-rw-r--r--test/integration/targets/apt/vars/Ubuntu-24.yml1
-rw-r--r--test/integration/targets/prepare_http_tests/tasks/default.yml2
-rw-r--r--test/integration/targets/setup_deb_repo/tasks/main.yml7
-rw-r--r--test/lib/ansible_test/_data/completion/docker.txt8
-rw-r--r--test/lib/ansible_test/_data/completion/remote.txt7
-rw-r--r--test/lib/ansible_test/_util/target/setup/bootstrap.sh15
7 files changed, 36 insertions, 22 deletions
diff --git a/test/integration/targets/ansible-test-container/runme.py b/test/integration/targets/ansible-test-container/runme.py
index 9cfdd0e3d3..b29e18344d 100755
--- a/test/integration/targets/ansible-test-container/runme.py
+++ b/test/integration/targets/ansible-test-container/runme.py
@@ -320,7 +320,23 @@ def run_test(scenario: TestScenario) -> TestResult:
run_command('update-crypto-policies', '--set', 'DEFAULT:SHA1')
for test_command in test_commands:
- retry_command(lambda: run_command(*test_command))
+ def run_test_command() -> SubprocessResult:
+ if os_release.id == 'alpine' and scenario.user_scenario.actual.name != 'root':
+ # Make sure rootless networking works on Alpine.
+ # NOTE: The path used below differs slightly from the referenced issue.
+ # See: https://gitlab.alpinelinux.org/alpine/aports/-/issues/16137
+ actual_pwnam = scenario.user_scenario.actual.pwnam
+ root_path = pathlib.Path(f'/tmp/storage-run-{actual_pwnam.pw_uid}')
+ run_path = root_path / 'containers/networks/rootless-netns/run'
+ run_path.mkdir(mode=0o755, parents=True, exist_ok=True)
+
+ while run_path.is_relative_to(root_path):
+ os.chown(run_path, actual_pwnam.pw_uid, actual_pwnam.pw_gid)
+ run_path = run_path.parent
+
+ return run_command(*test_command)
+
+ retry_command(run_test_command)
except SubprocessError as ex:
message = str(ex)
display.error(f'{scenario} {message}')
diff --git a/test/integration/targets/apt/vars/Ubuntu-24.yml b/test/integration/targets/apt/vars/Ubuntu-24.yml
new file mode 100644
index 0000000000..6a6bb8e6b9
--- /dev/null
+++ b/test/integration/targets/apt/vars/Ubuntu-24.yml
@@ -0,0 +1 @@
+multiarch_test_pkg: libunistring5
diff --git a/test/integration/targets/prepare_http_tests/tasks/default.yml b/test/integration/targets/prepare_http_tests/tasks/default.yml
index 2fb26a1248..50e3978860 100644
--- a/test/integration/targets/prepare_http_tests/tasks/default.yml
+++ b/test/integration/targets/prepare_http_tests/tasks/default.yml
@@ -1,6 +1,6 @@
- name: RedHat - Enable the dynamic CA configuration feature
command: update-ca-trust force-enable
- when: ansible_os_family == 'RedHat'
+ when: ansible_os_family == 'RedHat' and ansible_distribution != "Fedora"
- name: RedHat - Retrieve test cacert
get_url:
diff --git a/test/integration/targets/setup_deb_repo/tasks/main.yml b/test/integration/targets/setup_deb_repo/tasks/main.yml
index 3e640f69e8..434fa7b3f7 100644
--- a/test/integration/targets/setup_deb_repo/tasks/main.yml
+++ b/test/integration/targets/setup_deb_repo/tasks/main.yml
@@ -72,5 +72,12 @@
with_items:
- ''
- -updates
+ when: ansible_distribution_version is version('24.04', '<')
+
+ - name: Enable deb-src in ubuntu.sources
+ # see: https://askubuntu.com/questions/1512042/ubuntu-24-04-getting-error-you-must-put-some-deb-src-uris-in-your-sources-list
+ command: |
+ sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources
+ when: ansible_distribution_version is version('24.04', '>=')
when: ansible_distribution in ['Ubuntu', 'Debian']
diff --git a/test/lib/ansible_test/_data/completion/docker.txt b/test/lib/ansible_test/_data/completion/docker.txt
index 5d750e7797..1f209a1fb1 100644
--- a/test/lib/ansible_test/_data/completion/docker.txt
+++ b/test/lib/ansible_test/_data/completion/docker.txt
@@ -1,7 +1,7 @@
base image=quay.io/ansible/base-test-container:7.1.0 python=3.12,3.8,3.9,3.10,3.11,3.13
default image=quay.io/ansible/default-test-container:10.1.0 python=3.12,3.8,3.9,3.10,3.11,3.13 context=collection
default image=quay.io/ansible/ansible-core-test-container:10.1.0 python=3.12,3.8,3.9,3.10,3.11,3.13 context=ansible-core
-alpine319 image=quay.io/ansible/alpine319-test-container:7.1.0 python=3.11 cgroup=none audit=none
-fedora39 image=quay.io/ansible/fedora39-test-container:7.1.0 python=3.12
-ubuntu2004 image=quay.io/ansible/ubuntu2004-test-container:7.1.0 python=3.8
-ubuntu2204 image=quay.io/ansible/ubuntu2204-test-container:7.1.0 python=3.10
+alpine320 image=quay.io/ansible/alpine320-test-container:8.0.0 python=3.12 cgroup=none audit=none
+fedora40 image=quay.io/ansible/fedora40-test-container:8.0.0 python=3.12
+ubuntu2204 image=quay.io/ansible/ubuntu2204-test-container:8.0.0 python=3.10
+ubuntu2404 image=quay.io/ansible/ubuntu2404-test-container:8.0.0 python=3.12
diff --git a/test/lib/ansible_test/_data/completion/remote.txt b/test/lib/ansible_test/_data/completion/remote.txt
index cad7fa4192..0f5ed00143 100644
--- a/test/lib/ansible_test/_data/completion/remote.txt
+++ b/test/lib/ansible_test/_data/completion/remote.txt
@@ -1,13 +1,14 @@
-alpine/3.19 python=3.11 become=doas_sudo provider=aws arch=x86_64
+alpine/3.20 python=3.12 become=doas_sudo provider=aws arch=x86_64
alpine become=doas_sudo provider=aws arch=x86_64
-fedora/39 python=3.12 become=sudo provider=aws arch=x86_64
+fedora/40 python=3.12 become=sudo provider=aws arch=x86_64
fedora become=sudo provider=aws arch=x86_64
freebsd/13.3 python=3.9,3.11 python_dir=/usr/local/bin become=su_sudo provider=aws arch=x86_64
freebsd/14.0 python=3.9,3.11 python_dir=/usr/local/bin become=su_sudo provider=aws arch=x86_64
freebsd python_dir=/usr/local/bin become=su_sudo provider=aws arch=x86_64
macos/14.3 python=3.11 python_dir=/usr/local/bin become=sudo provider=parallels arch=x86_64
macos python_dir=/usr/local/bin become=sudo provider=parallels arch=x86_64
-rhel/9.3 python=3.9,3.11 become=sudo provider=aws arch=x86_64
+rhel/9.4 python=3.9,3.12 become=sudo provider=aws arch=x86_64
rhel become=sudo provider=aws arch=x86_64
ubuntu/22.04 python=3.10 become=sudo provider=aws arch=x86_64
+ubuntu/24.04 python=3.12 become=sudo provider=aws arch=x86_64
ubuntu become=sudo provider=aws arch=x86_64
diff --git a/test/lib/ansible_test/_util/target/setup/bootstrap.sh b/test/lib/ansible_test/_util/target/setup/bootstrap.sh
index 69a826ac8a..709d7f6e64 100644
--- a/test/lib/ansible_test/_util/target/setup/bootstrap.sh
+++ b/test/lib/ansible_test/_util/target/setup/bootstrap.sh
@@ -268,19 +268,12 @@ bootstrap_remote_rhel_9()
packages="
gcc
${py_pkg_prefix}-devel
+ ${py_pkg_prefix}-pip
"
- # pip is not included in the Python devel package under Python 3.11
- if [ "${python_version}" != "3.9" ]; then
- packages="
- ${packages}
- ${py_pkg_prefix}-pip
- "
- fi
-
# Jinja2 is not installed with an OS package since the provided version is too old.
# Instead, ansible-test will install it using pip.
- # packaging and resolvelib are missing for Python 3.11 (and possible later) so we just
+ # packaging and resolvelib are missing for controller supported Python versions, so we just
# skip them and let ansible-test install them from PyPI.
if [ "${controller}" ]; then
packages="
@@ -329,10 +322,6 @@ bootstrap_remote_ubuntu()
# For these ansible-test will use pip to install the requirements instead.
# Only the platform is checked since Ubuntu shares Python packages across Python versions.
case "${platform_version}" in
- "20.04")
- jinja2_pkg="" # too old
- resolvelib_pkg="" # not available
- ;;
esac
packages="