Skip to content

Commit afed2a1

Browse files
committed
fix: make CORE_URL_ENV optional
1 parent b828ce4 commit afed2a1

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

tests/integration/conftest.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@
2727
ENGINE_URL_ENV = "ENGINE_URL"
2828
STOPPED_ENGINE_URL_ENV = "STOPPED_ENGINE_URL"
2929
CORE_URL_ENV = "CORE_URL"
30+
31+
# Variables to configure the Firebolt Core Helm installation
3032
CORE_HELM_CHART_VERSION_ENV = "CORE_HELM_CHART_VERSION"
3133
CORE_DEFAULT_HELM_CHART_VERSION = "0.3.0"
3234
CORE_IMAGE_TAG_ENV = "CORE_IMAGE_TAG"
35+
CORE_PORT = 3473
3336

34-
FIREBOLT_CORE_PORT = 3473
3537
KIND_CLUSTER_NAME = "firebolt-python-sdk"
3638

3739
# https://docs.pytest.org/en/latest/example/simple.html#control-skipping-of-tests-according-to-command-line-option
@@ -179,7 +181,7 @@ def stopped_engine_url(kind_app_setup) -> str:
179181

180182
@fixture(scope="function")
181183
def core_url(kind_app_setup) -> str:
182-
return must_env(CORE_URL_ENV)
184+
return getenv(CORE_URL_ENV, "")
183185

184186

185187
@fixture(scope="function")
@@ -345,7 +347,7 @@ def deploy_app(kind_cluster, helm_values=None):
345347
"--for=condition=ready",
346348
"pod",
347349
"-l",
348-
"app.kubernetes.io/instance=" + release, # Adjust label to match your chart
350+
"app.kubernetes.io/instance=" + release,
349351
"--namespace",
350352
ns,
351353
"--timeout=120s",
@@ -355,7 +357,6 @@ def deploy_app(kind_cluster, helm_values=None):
355357
check=True,
356358
)
357359

358-
# Get pod names
359360
pod_names_result = subprocess.run(
360361
[
361362
"kubectl",
@@ -382,17 +383,15 @@ def deploy_app(kind_cluster, helm_values=None):
382383
ip = "127.0.0.1"
383384
port = local_port + i
384385
ips_with_ports.append(f"{ip}:{port}")
385-
print(
386-
f"[Kind] Port-forward to pod {pod_name} on {ip}:{port}->{FIREBOLT_CORE_PORT}..."
387-
)
386+
print(f"[Kind] Port-forward to pod {pod_name} on {ip}:{port}->{CORE_PORT}...")
388387
pf_proc = subprocess.Popen(
389388
[
390389
"kubectl",
391390
"port-forward",
392391
"--address",
393392
ip,
394393
f"pod/{pod_name}",
395-
f"{port}:{FIREBOLT_CORE_PORT}",
394+
f"{port}:{CORE_PORT}",
396395
"-n",
397396
ns,
398397
"--context",
@@ -401,7 +400,6 @@ def deploy_app(kind_cluster, helm_values=None):
401400
)
402401
pf_procs.append(pf_proc)
403402

404-
sleep(1)
405403
# Wait for port-forward
406404
for i in range(10):
407405
try:

0 commit comments

Comments
 (0)