Skip to content

Commit c222794

Browse files
committed
fix(testing): remove version fixture
Signed-off-by: Fatih Acar <[email protected]>
1 parent e40d942 commit c222794

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,6 @@ jobs:
288288
pip install invoke toml codecov
289289
- name: "Install Package"
290290
run: "poetry install --all-extras"
291-
- name: "Set environment variables for python_testcontainers"
292-
run: |
293-
echo INFRAHUB_TESTING_IMAGE_VER=latest >> $GITHUB_ENV
294291
- name: "Integration Tests"
295292
run: |
296293
poetry run pytest --cov infrahub_sdk tests/integration/

infrahub_sdk/testing/docker.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@
88

99
from .. import Config, InfrahubClient, InfrahubClientSync
1010

11-
INFRAHUB_VERSION = os.getenv("INFRAHUB_TESTING_IMAGE_VER", "latest")
11+
INFRAHUB_VERSION = os.getenv("INFRAHUB_TESTING_IMAGE_VER")
1212

1313

1414
def skip_version(min_infrahub_version: str | None = None, max_infrahub_version: str | None = None) -> bool:
1515
"""
1616
Check if a test should be skipped depending on infrahub version.
1717
"""
18+
if INFRAHUB_VERSION is None:
19+
return True
20+
1821
try:
1922
version = Version(INFRAHUB_VERSION)
2023
except InvalidVersion:
@@ -31,10 +34,6 @@ def skip_version(min_infrahub_version: str | None = None, max_infrahub_version:
3134

3235

3336
class TestInfrahubDockerClient(TestInfrahubDocker):
34-
@pytest.fixture(scope="class")
35-
def infrahub_version(self) -> str:
36-
return INFRAHUB_VERSION
37-
3837
@pytest.fixture(scope="class")
3938
def client(self, infrahub_port: int) -> InfrahubClient:
4039
return InfrahubClient(

0 commit comments

Comments
 (0)