Migrate IAM AWS managed policy tests from moto to LS#13767
Open
dfangl wants to merge 2 commits intoiam/moto-migrationfrom
Open
Migrate IAM AWS managed policy tests from moto to LS#13767dfangl wants to merge 2 commits intoiam/moto-migrationfrom
dfangl wants to merge 2 commits intoiam/moto-migrationfrom
Conversation
LocalStack Community integration with Pro 2 files 2 suites 1m 2s ⏱️ Results for commit 3bbdfe0. |
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 9m 38s ⏱️ Results for commit 3bbdfe0. |
pinzon
requested changes
Feb 13, 2026
Member
pinzon
left a comment
There was a problem hiding this comment.
LGTM but there is one change request to be addressed.
Comment on lines
+134
to
+136
| paginator = aws_client.iam.get_paginator("list_policies") | ||
| result = paginator.paginate().build_full_result() | ||
| all_policy_names = {p["PolicyName"] for p in result["Policies"]} |
Member
There was a problem hiding this comment.
comment: 😅 I guess we're not snapshoting this
Comment on lines
+194
to
+195
| class TestAttachAwsManagedPolicyToGroup: | ||
| """Tests for attaching/detaching AWS-managed policies to/from groups.""" |
Member
There was a problem hiding this comment.
Change: I think that at some point this was the original location of test_attach_detach_aws_managed_policy_group that now is in the test_iam_groups.py file. Lets remove this class if it's not necessary anymore.
Member
Author
There was a problem hiding this comment.
Yes, I forgot about that one when moving, will 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.
Motivation
We also want to migrate the IAM managed policy tests. As with the other PRs, this will for now skip most of the new tests, and the tests are migrated to LocalStack standards.
Changes
test_get_aws_managed_policyTestGetAwsManagedPolicytest_get_aws_managed_policypartitionfixturetest_get_aws_managed_policy_versionTestGetAwsManagedPolicytest_get_aws_managed_policy_versiontest_get_aws_managed_policy_v8_versionTestGetAwsManagedPolicytest_get_aws_managed_policy_higher_versiontest_managed_policy(list scope parts)TestListPoliciesScopetest_list_policies_scope_local,test_list_policies_scope_aws,test_list_policies_scope_alltest_managed_policy(attach/detach parts)TestListPoliciesScopetest_list_policies_only_attachedtest_managed_policy(role attach/detach + errors)TestRoleManagedPoliciestest_attach_detach_aws_managed_policy_roletest_attach_group_policiesTestAttachAwsManagedPolicyToGrouptest_attach_detach_aws_managed_policy_grouptest_policies_are_not_kept_after_mock_endstest_policies_are_loaded_when_using_env_variabletest_get_account_authorization_detailsTests
Tests are manually verified, and run against AWS both with and without snapshot updates.
Related
Closes UNC-240