Skip to content

TPT-4397: Refactor of integration tests for IAM RBAC#680

Merged
mawilk90 merged 6 commits intolinode:proj/iamfrom
mawilk90:feature/TPT-4397-iam-refactor-integration-tests-in-linodepy
Apr 10, 2026
Merged

TPT-4397: Refactor of integration tests for IAM RBAC#680
mawilk90 merged 6 commits intolinode:proj/iamfrom
mawilk90:feature/TPT-4397-iam-refactor-integration-tests-in-linodepy

Conversation

@mawilk90
Copy link
Copy Markdown
Contributor

@mawilk90 mawilk90 commented Apr 9, 2026

📝 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

@mawilk90 mawilk90 requested a review from a team as a code owner April 9, 2026 14:45
@mawilk90 mawilk90 added improvement for improvements in existing functionality in the changelog. testing for updates to the testing suite in the changelog. do-not-merge PRs that should not be merged until the commented issue is resolved labels Apr 9, 2026
@mawilk90 mawilk90 requested review from ckulinsk, Copilot, dawiddzhafarov, jbilskiAkam and jriddle-linode and removed request for a team and jbilskiAkam April 9, 2026 14:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_get and entity_permissions_get methods to IAMGroup.
  • 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.

@mawilk90 mawilk90 removed the do-not-merge PRs that should not be merged until the commented issue is resolved label Apr 10, 2026
@mawilk90 mawilk90 merged commit 4550037 into linode:proj/iam Apr 10, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement for improvements in existing functionality in the changelog. testing for updates to the testing suite in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants