From cf5699a31b2bb406364cf5f9d15330a27fb55d58 Mon Sep 17 00:00:00 2001 From: Alexander Graul Date: Fri, 9 Feb 2024 15:14:07 +0100 Subject: [PATCH] Skip git pillar tests when executed inside a container These tests require a Git repository container, which is hard to correctly set up when executing the tests in the container in GH Actions. Using --network host can help, but there was still an error (the git repos were empty) when I tried to set this up. --- tests/integration/pillar/test_git_pillar.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration/pillar/test_git_pillar.py b/tests/integration/pillar/test_git_pillar.py index 68c14daaa1..5b4cbda95c 100644 --- a/tests/integration/pillar/test_git_pillar.py +++ b/tests/integration/pillar/test_git_pillar.py @@ -63,6 +63,7 @@ https://github.com/unbit/uwsgi/commit/ac1e354 """ +import os import random import string import sys @@ -100,9 +101,11 @@ except Exception: # pylint: disable=broad-except HAS_PYGIT2 = False +INSIDE_CONTAINER = os.getenv("HOSTNAME", "") == "salt-test-container" pytestmark = [ SKIP_INITIAL_PHOTONOS_FAILURES, pytest.mark.skip_on_platforms(windows=True, darwin=True), + pytest.mark.skipif(INSIDE_CONTAINER, reason="Communication problems between containers."), ]