Skip to content

Commit

Permalink
Skip hwclock test when executed inside a container
Browse files Browse the repository at this point in the history
  • Loading branch information
agraul committed Feb 12, 2024
1 parent 279a461 commit 1b066da
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/integration-opensuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
runs-on: ubuntu-latest
container:
image: registry.opensuse.org/systemsmanagement/saltstack/products/testing/containers/leap15.5/containers/salt-testsuite-github:leap15.5
options: --hostname=salt-test-container
steps:
- name: Checkout Salt
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unit-opensuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
runs-on: ubuntu-latest
container:
image: registry.opensuse.org/systemsmanagement/saltstack/products/testing/containers/leap15.5/containers/salt-testsuite-github:leap15.5
options: --hostname=salt-test-container
steps:
- name: Checkout Salt
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/modules/test_timezone.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Linux and Solaris are supported
"""
import pytest
import os

from tests.support.case import ModuleCase

Expand All @@ -15,6 +16,8 @@
HAS_TZLOCAL = False


INSIDE_CONTAINER = os.getenv("HOSTNAME", "") == "salt-test-container"
@pytest.mark.skipif(INSIDE_CONTAINER, reason="No hwclock in a container")
class TimezoneLinuxModuleTest(ModuleCase):
def setUp(self):
"""
Expand Down

0 comments on commit 1b066da

Please sign in to comment.