Skip to content

Commit 2e64910

Browse files
authored
Merge branch 'main' into dependabot/pip/databricks-sdk-gte-0.40-and-lt-0.43
2 parents 99e3447 + 0202115 commit 2e64910

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/integration/fixtures/test_connect.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ def serverless_env():
1313

1414

1515
@fixture
16-
def debug_env_bugfix(monkeypatch, debug_env):
17-
# This is a workaround to set shared cluster
18-
# TODO: Update secret vault for acceptance testing and remove the bugfix
19-
monkeypatch.setitem(debug_env, "DATABRICKS_CLUSTER_ID", "1114-152544-29g1w07e")
16+
def set_shared_cluster(monkeypatch, debug_env, env_or_skip):
17+
default_cluster_id = debug_env.get("DATABRICKS_CLUSTER_ID")
18+
monkeypatch.setitem(debug_env, "DATABRICKS_CLUSTER_ID", env_or_skip("TEST_USER_ISOLATION_CLUSTER_ID"))
19+
yield
20+
monkeypatch.setitem(debug_env, "DATABRICKS_CLUSTER_ID", default_cluster_id)
2021

2122

2223
@fixture
@@ -30,7 +31,7 @@ def spark_serverless_cluster_id(ws):
3031
spark_serverless.stop()
3132

3233

33-
def test_databricks_connect(debug_env_bugfix, ws, spark):
34+
def test_databricks_connect(set_shared_cluster, ws, spark):
3435
rows = spark.sql("SELECT 1").collect()
3536
assert rows[0][0] == 1
3637
assert not is_serverless_cluster(spark, ws)

0 commit comments

Comments
 (0)