Skip to content

Commit

Permalink
test: skip schduler integration tests if in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
aaraney committed Feb 5, 2024
1 parent ce624aa commit 5ada9be
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion python/lib/scheduler/dmod/test/it_RedisBackedJobManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@

# TODO: also add another test for the job manager factory and its factory method


try:
import pytest
import os
# https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
in_ci = os.environ.get("CI", False) == "true"
skip_in_ci = pytest.mark.skipif(in_ci, reason="Tests require access to Docker Daemon. Do not have access to Docker Daemon in GH Actions.")
except ImportError:
def skip_in_ci(fn):
return fn


@skip_in_ci
class IntegrationTestRedisBackedJobManager(unittest.TestCase):

_TEST_ENV_FILE_BASENAME = ".test_env"
Expand Down

0 comments on commit 5ada9be

Please sign in to comment.