TPT-4397: Refactor of integration tests for IAM RBAC#680
Merged
mawilk90 merged 6 commits intolinode:proj/iamfrom Apr 10, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds SDK + tests around IAM “permissions” endpoints and refactors the RBAC integration test that sets user role permissions so it runs by default.
Changes:
- Add
account_permissions_getandentity_permissions_getmethods toIAMGroup. - Add unit test coverage + fixtures for the new permissions endpoints.
- Refactor and expand IAM integration tests (including un-skipping user role-permission setting).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
linode_api4/groups/iam.py |
Adds IAM permissions getter methods for account and entity scopes. |
test/unit/groups/iam_test.py |
Adds unit tests validating the new IAM permissions getters. |
test/integration/models/iam/iam_test.py |
Refactors RBAC role-permission setter test and adds integration coverage for permissions endpoints. |
test/fixtures/iam_users_myusername_permissions_account.json |
Fixture for account-level permissions response. |
test/fixtures/iam_users_myusername_permissions_linode_1.json |
Fixture for entity-level permissions response. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…n-tests-in-linodepy
dawiddzhafarov
approved these changes
Apr 10, 2026
ckulinsk
approved these changes
Apr 10, 2026
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.
📝 Description
Refactor of test responsible for setting user role permissions as it was skipped by default
PUT /iam/users/{username}/role-permissions✔️ How to Test
make TEST_CASE=test_set_user_role_permissions test-int