Skip to content

Commit 5d8495a

Browse files
committed
Use TACL cluster as sql backend for grants integration tests
1 parent 5807002 commit 5d8495a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/integration/hive_metastore/test_grant_detail.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from collections.abc import Callable, Iterable
55

66
import pytest
7-
from databricks.labs.lsql.backends import StatementExecutionBackend
7+
from databricks.labs.lsql.backends import CommandExecutionBackend, SqlBackend
88
from databricks.sdk.errors import NotFound
99
from databricks.sdk.retries import retried
1010

@@ -17,6 +17,16 @@
1717
logger = logging.getLogger(__name__)
1818

1919

20+
@pytest.fixture
21+
def sql_backend(ws, env_or_skip) -> SqlBackend:
22+
"""Ensure the SQL backend used during fixture setup is using the TACL cluster.
23+
24+
The TACL cluster is used for grants.
25+
"""
26+
cluster_id = env_or_skip("TEST_LEGACY_TABLE_ACL_CLUSTER_ID")
27+
return CommandExecutionBackend(ws, cluster_id)
28+
29+
2030
@pytest.fixture()
2131
def _deployed_schema(runtime_ctx) -> None:
2232
"""Ensure that the schemas (and views) are initialized."""

0 commit comments

Comments
 (0)