public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ansible-collection-community-docker] epel10: Use new %ansible_test_unit macro
@ 2026-11-10 21:11 Maxwell G
  0 siblings, 0 replies; only message in thread
From: Maxwell G @ 2026-11-10 21:11 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/ansible-collection-community-docker
Branch : epel10
Commit : e996983cd2f10f6b17f71446b4b6fbb660e0a25e
Author : Maxwell G <gotmax@e.email>
Date   : 2022-08-18T21:50:39-05:00
Stats  : +20/-25 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/ansible-collection-community-docker/c/e996983cd2f10f6b17f71446b4b6fbb660e0a25e?branch=epel10

Log:
Use new %ansible_test_unit macro

---
diff --git a/ansible-collection-community-docker.spec b/ansible-collection-community-docker.spec
index 8097ebb..96ecc0c 100644
--- a/ansible-collection-community-docker.spec
+++ b/ansible-collection-community-docker.spec
@@ -2,11 +2,20 @@
 %global collection_name docker
 %global forgeurl https://github.com/ansible-collections/%{collection_namespace}.%{collection_name}
 
-# Only run tests where %%generate_buildrequires and test deps are available.
-%if 0%{?fedora}
-%bcond_without     tests
+# ansible-core in RHEL 8.6 is built against python38. In c8s and the next RHEL
+# 8 minor release, it will be built against python39. The testing dependencies
+# are not yet packaged for either python version in EPEL 8.
+#
+# ansible-test in RHEL 9.0 still needs python3-mock, but this
+# requirement has been removed in c9s.
+# The conditional should be replaced with the line below once RHEL 9.1 is
+# released.
+# %%if (%%{defined fedora} || 0%%{?rhel} >= 9)
+#
+%if %{defined fedora}
+%bcond_without tests
 %else
-%bcond_with        tests
+%bcond_with tests
 %endif
 
 
@@ -76,11 +85,9 @@ BuildArch:      noarch
 Buildrequires:  python3-devel
 
 BuildRequires:  ansible-packaging
-# The new ansible-core, specifically, is required for the `build_ignore:` patch and ansible-test to work properly.
-# Therefore, we cannot rely on ansible-packaging which might pull in ansible 2.9.
-BuildRequires:  ansible-core
 %if %{with tests}
-BuildRequires:  /usr/bin/ansible-test
+BuildRequires:  ansible-packaging-tests
+BuildRequires:  %{py3_dist requests}
 %endif
 
 # This collection contains vendored code from the Docker Python SDK.
@@ -98,12 +105,6 @@ working with Docker.
 find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' +
 
 
-%if %{with tests}
-%generate_buildrequires
-%pyproject_buildrequires -N tests/unit/requirements.txt %{python3_sitelib}/ansible_test/_data/requirements/units.txt
-%endif
-
-
 %build
 %ansible_collection_build
 
@@ -114,14 +115,7 @@ find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{
 
 %check
 %if %{with tests}
-mkdir -p ../ansible_collections/%{collection_namespace}
-cp -a $(pwd) ../ansible_collections/%{collection_namespace}/%{collection_name}
-pushd ../ansible_collections/%{collection_namespace}/%{collection_name}
-# mkdir -p ansible_collections/%%{collection_namespace}
-# ln -sr . ansible_collections/%%{collection_namespace}/%%{collection_name}
-# pushd ansible_collections/%%{collection_namespace}/%%{collection_name}
-ansible-test units --python-interpreter %{__python3} --local
-popd
+%ansible_test_unit
 %endif
 
 

diff --git a/build_ignore-unnecessary-files.patch b/build_ignore-unnecessary-files.patch
index 9586180..2f2e9ae 100644
--- a/build_ignore-unnecessary-files.patch
+++ b/build_ignore-unnecessary-files.patch
@@ -1,7 +1,8 @@
 diff -Naur a/galaxy.yml b/galaxy.yml
---- a/galaxy.yml	2022-04-25 14:32:27.000000000 -0500
-+++ b/galaxy.yml	2022-04-29 21:07:55.917219135 -0500
-@@ -18,3 +18,9 @@
+--- a/galaxy.yml
++++ b/galaxy.yml
+@@ -25,4 +25,10 @@
+ build_ignore:
  # https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#ignoring-files-and-folders
    - .gitignore
    - changelogs/.plugin-cache.yaml

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-10 21:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10 21:11 [rpms/ansible-collection-community-docker] epel10: Use new %ansible_test_unit macro Maxwell G

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox