Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/integration/test_query/test_views_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
SecretsSettings,
)
from tests.support.accounts import admin_on_its_own_password, session_token
from tests.support.orgs import name_your_org

pytestmark = [pytest.mark.integration, pytest.mark.own_clickhouse]

Expand Down Expand Up @@ -114,6 +115,9 @@ def stack(ch_params, ch_client, tmp_path, monkeypatch):
try:
with TestClient(app, raise_server_exceptions=False) as client:
admin_on_its_own_password(app)
# An account of any org but yours holds only its org's admin or viewer group,
# so the admin must be bound to your org to keep the groups that grant the view.
name_your_org(app=app, name="default", display_name="Default")
app.state.account_store.update("admin", org="default")
token = session_token(app, settings, {"sub": "admin"})
yield SimpleNamespace(
Expand Down
Loading