public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-docker] epel10.2: fix running tests locally in a container
@ 2026-10-13 18:29 Tomas Tomecek
  0 siblings, 0 replies; only message in thread
From: Tomas Tomecek @ 2026-10-13 18:29 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/python-docker
            Branch : epel10.2
            Commit : f3141ba9b5b839f543ba4654d7667555425973e7
            Author : Tomas Tomecek <ttomecek@redhat.com>
            Date   : 2019-02-27T17:20:38+01:00
            Stats  : +18/-9 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-docker/c/f3141ba9b5b839f543ba4654d7667555425973e7?branch=epel10.2

            Log:
            fix running tests locally in a container

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>

---
diff --git a/tests/Makefile b/tests/Makefile
index 2e0785d..f922d17 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -10,18 +10,14 @@ check:
 check-local:
 	ansible-playbook -i inventory-localhost -v -e artifacts=$(CURDIR) -c local ./hydrant.yml
 
-build:
-	sudo podman run \
-		--name $(WORKING_CONT) \
-		$(BASE_IMAGE) \
-		dnf install -y standard-test-roles make
-	sudo podman commit $(WORKING_CONT) $(TESTS_IMAGE)
-	sudo podman rm $(WORKING_CONT)
+build: recipe.yml
+	ansible-bender --debug build ./recipe.yml $(BASE_IMAGE) $(TESTS_IMAGE)
 
 check-in-container:
-	sudo podman run --rm \
+	podman run --rm -ti \
 		-v $(CURDIR):/src \
 		--net host \
+		-e ANSIBLE_PYTHON_INTERPRETER=/usr/bin/python3 \
 		-w /src \
 		-v /var/run/docker.sock:/var/run/docker.sock \
 		$(TESTS_IMAGE) \

diff --git a/tests/integration/runtest.sh b/tests/integration/runtest.sh
old mode 100644
new mode 100755

diff --git a/tests/inventory-localhost b/tests/inventory-localhost
index 2302eda..c1a345d 100644
--- a/tests/inventory-localhost
+++ b/tests/inventory-localhost
@@ -1 +1 @@
-localhost ansible_connection=local
+localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3

diff --git a/tests/recipe.yml b/tests/recipe.yml
new file mode 100644
index 0000000..11280e6
--- /dev/null
+++ b/tests/recipe.yml
@@ -0,0 +1,13 @@
+---
+- name: Ansible recipe for a container image where the tests will run
+  hosts: all
+  tasks:
+  - dnf:
+      name:
+      - standard-test-roles
+      - make
+      state: installed
+  - file:
+      src: /usr/bin/python3
+      dest: /usr/bin/python
+      state: link

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

only message in thread, other threads:[~2026-10-13 18:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-13 18:29 [rpms/python-docker] epel10.2: fix running tests locally in a container Tomas Tomecek

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