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

            A new commit has been pushed.

            Repo   : rpms/python-docker
            Branch : epel10.2
            Commit : 8196204885c8b2c7aae8b68eec9c4349e1706ca7
            Author : Tomas Tomecek <ttomecek@redhat.com>
            Date   : 2019-01-04T12:22:50+01:00
            Stats  : +6/-6 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-docker/c/8196204885c8b2c7aae8b68eec9c4349e1706ca7?branch=epel10.2

            Log:
            fix invocation of tests

* correctly define the inv file
* use include (static) over import (dynamic)
* use systemctl to detect if we are in a cont

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

---
diff --git a/tests/inventory-localhost b/tests/inventory-localhost
index 2fbb50c..2302eda 100644
--- a/tests/inventory-localhost
+++ b/tests/inventory-localhost
@@ -1 +1 @@
-localhost
+localhost ansible_connection=local

diff --git a/tests/tests.yml b/tests/tests.yml
index 511e457..ca82d2d 100644
--- a/tests/tests.yml
+++ b/tests/tests.yml
@@ -4,15 +4,15 @@
   hosts: all
   tasks:
   - name: check if we are running in a container
-    stat:
-      path: /.dockerenv
-    register: in_docker_cont
+    command: systemctl
+    register: in_host
+    ignore_errors: true
   - name: add docker to req_services if we are not in a dkr cont
     set_fact:
       req_services: ["docker"]
-    when: not in_docker_cont.stat.exists
+    when: in_host.rc == 0
   - name: run them tests
-    import_role:
+    include_role:
       name: standard-test-basic
     tags:
     - classic

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

only message in thread, other threads:[~2026-10-13 18:28 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:28 [rpms/python-docker] epel10.2: fix invocation of tests Tomas Tomecek

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