Skip to content

fix(tests): bind the views test admin to the deployment org - #1242

Merged
catinspace-au merged 1 commit into
mainfrom
fix/views-reader-grant
Nov 21, 2026
Merged

catinspace-au merged 1 commit into
mainfrom
fix/views-reader-grant

Conversation

@catinspace-au

Copy link
Copy Markdown
Contributor

In the 2.2.3 release run, two view tests failed in the full tier with 403 query:execute denied.

Under #1241, accounts outside the deployment org hold only their org's admin or viewer group (orgs/role_groups.py:61-66, applied at api/deps.py:575-577). The shipped docs describe this rule.

The stack fixture in test_views_api.py bound the admin to org default without setting the deployment org. As an org account, the admin lost the system admin group and its query:execute grant.

The fixture calls name_your_org for default first so the admin is a root account of the deployment org. One test checks that the view runs as dfe_query_reader. The other checks that the reader rejects the url() view with ACCESS_DENIED.

All three tests in test_views_api.py pass on the remote host's integration tier. PR CI covers the core tier only.

Both view tests got 403 because the admin lacked the group that grants query:execute. The test bound the admin to `default` without setting the deployment's own org. Accounts outside the deployment's own org hold only their org's admin or viewer group (orgs/role_groups.py:61-66, applied at api/deps.py:575-577).

The setup uses name_your_org to set `default` as the deployment's own org before binding the admin, as the other API tests do.
@catinspace-au
catinspace-au merged commit 2eb9a54 into main Nov 21, 2026
19 checks passed
@catinspace-au
catinspace-au deleted the fix/views-reader-grant branch November 21, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant