File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
tests/integration/fixtures Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments