public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Maxwell G <gotmax@e.email>
To: git-commits@fedoraproject.org
Subject: [rpms/ansible-collection-community-docker] epel10: Use new %ansible_test_unit macro
Date: Tue, 10 Nov 2026 21:11:47 GMT	[thread overview]
Message-ID: <179434510751.1.17074233320224908115.rpms-ansible-collection-community-docker-e996983cd2f1@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-11-10 21:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179434510751.1.17074233320224908115.rpms-ansible-collection-community-docker-e996983cd2f1@fedoraproject.org \
    --to=gotmax@e.email \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox