Skip to content

Commit 6163b79

Browse files
committed
fix: add default remote backend
1 parent 5742fe1 commit 6163b79

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

tests/integration/conftest.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,12 @@ def pytest_generate_tests(metafunc):
226226
if run_kind:
227227
backends.append("kind")
228228

229+
# Default to remote if no other backend is specified
230+
if not backends:
231+
backends.append("remote")
232+
229233
# Apply the parametrization
230-
if backends:
231-
metafunc.parametrize("app_setup", backends, indirect=True)
232-
else:
233-
# If no backends match (e.g. kind_only test but no --run-kind flag),
234-
# we parametrize with an empty list which skips the test.
235-
metafunc.parametrize("app_setup", [], indirect=True)
234+
metafunc.parametrize("app_setup", backends, indirect=True)
236235

237236

238237
@fixture(scope="session")
@@ -307,8 +306,8 @@ def session_compose_install(request):
307306
run_kind = request.config.getoption("--run-kind")
308307
run_compose = request.config.getoption("--run-compose")
309308

310-
# Default is compose if nothing else is specified
311-
if not run_compose and run_kind:
309+
# Only run if --run-compose is explicitly requested
310+
if not run_compose:
312311
yield None
313312
return
314313

@@ -359,13 +358,15 @@ def app_setup(
359358
"""
360359
Dynamically injects the required environment variables from active setup.
361360
"""
362-
backend = getattr(request, "param", "docker-compose")
361+
backend = getattr(request, "param", "remote")
363362
run_https = request.config.getoption("--run-https")
364363

365364
if backend == "kind":
366365
active_setup = dedicated_helm_install or session_helm_install
367-
else:
366+
elif backend == "docker-compose":
368367
active_setup = dedicated_compose_install or session_compose_install
368+
else:
369+
active_setup = None
369370

370371
if active_setup:
371372
if active_setup in (dedicated_helm_install, dedicated_compose_install):
@@ -417,5 +418,5 @@ def app_setup(
417418
else:
418419
os.environ[k] = v
419420
else:
420-
# Fallback if no setup is active (e.g. external compose)
421+
# Fallback if no setup is active (e.g. external compose or remote)
421422
yield backend

0 commit comments

Comments
 (0)