Repository navigation
fix(tests): bind the views test admin to the deployment org - #1242
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
defaultwithout 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
defaultfirst 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.