Skip to content

Commit a82f517

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

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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)