Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Migrate IAM instance profile tests#13754

Merged
dfangl merged 3 commits into
iam/moto-migrationfrom
daniel/unc-218
Feb 13, 2026
Merged

Migrate IAM instance profile tests#13754
dfangl merged 3 commits into
iam/moto-migrationfrom
daniel/unc-218

Conversation

@dfangl

@dfangl dfangl commented Feb 12, 2026

Copy link
Copy Markdown
Member

Motivation

This PR migrates the IAM instance profile tests from moto to LocalStack.
Tests are now snapshot validated, and restructured.

All tests are currently skipped as they will not pass against our current implementation.

Changes

Tests are migrated from test_iam/test_iam.py in moto.

Instance Profile Tests (test_iam_instance_profiles.py)

Moto Test Line LocalStack Test Class
test_get_instance_profile__should_throw__when_instance_profile_does_not_exist 199 test_instance_profile_errors TestInstanceProfileLifecycle
test_create_role_and_instance_profile 209 test_instance_profile_lifecycle TestInstanceProfileLifecycle
test_create_instance_profile_should_throw_when_name_is_not_unique 245 test_instance_profile_errors TestInstanceProfileLifecycle
test_create_add_additional_roles_to_instance_profile_error 253 test_add_second_role_to_instance_profile_error TestInstanceProfileRoles
test_remove_role_from_instance_profile 282 test_add_remove_role_from_instance_profile TestInstanceProfileRoles
test_delete_instance_profile 308 test_delete_instance_profile_with_role_error TestInstanceProfileRoles
test_list_instance_profiles 416 test_list_instance_profiles TestInstanceProfileLifecycle
test_list_instance_profiles_for_role 435 test_list_instance_profiles_for_role TestInstanceProfileRoles
test_tag_instance_profile 4963 test_instance_profile_tag_lifecycle TestInstanceProfileTags
test_untag_instance_profile 4984 test_instance_profile_tag_lifecycle TestInstanceProfileTags

Role Tests (test_iam_roles.py)

Moto Test Line LocalStack Test Class
test_delete_role (instance profile section) 389-403 test_delete_role_with_instance_profile TestRoleLifecycle

Tests

Tests were tested against AWS both with and without snapshots to rule out transformer errors.

Related

Closes UNC-218

@dfangl dfangl added semver: patch Non-breaking changes which can be included in patch releases docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes labels Feb 12, 2026
@github-actions

Copy link
Copy Markdown

Test Results - Preflight, Unit

23 099 tests   - 12   21 237 ✅  - 12   6m 15s ⏱️ -10s
     1 suites ± 0    1 862 💤 ± 0 
     1 files   ± 0        0 ❌ ± 0 

Results for commit 43fcdec. ± Comparison against base commit 5560ec8.

@github-actions

Copy link
Copy Markdown

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   2m 55s ⏱️ -9s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 43fcdec. ± Comparison against base commit 5560ec8.

@github-actions

github-actions Bot commented Feb 12, 2026

Copy link
Copy Markdown

Test Results (amd64) - Integration, Bootstrap

    5 files  ±0      5 suites  ±0   2h 37m 23s ⏱️ - 3m 13s
5 805 tests +6  5 100 ✅  - 7  704 💤 +13  1 ❌ ±0 
5 811 runs  +6  5 100 ✅  - 7  710 💤 +13  1 ❌ ±0 

For more details on these failures, see this check.

Results for commit 43fcdec. ± Comparison against base commit 5560ec8.

♻️ This comment has been updated with latest results.

@github-actions

Copy link
Copy Markdown

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   2h 1m 57s ⏱️ -14s
5 400 tests +6  4 852 ✅  - 7  548 💤 +13  0 ❌ ±0 
5 402 runs  +6  4 852 ✅  - 7  550 💤 +13  0 ❌ ±0 

Results for commit 43fcdec. ± Comparison against base commit 5560ec8.

@pinzon pinzon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 👍

@dfangl dfangl merged commit cdcd4df into iam/moto-migration Feb 13, 2026
61 of 64 checks passed
@dfangl dfangl deleted the daniel/unc-218 branch February 13, 2026 15:20
dfangl added a commit that referenced this pull request Feb 16, 2026
dfangl added a commit that referenced this pull request Feb 17, 2026
dfangl added a commit that referenced this pull request Feb 19, 2026
dfangl added a commit that referenced this pull request Feb 26, 2026
dfangl added a commit that referenced this pull request Feb 26, 2026
dfangl added a commit that referenced this pull request Mar 4, 2026
dfangl added a commit that referenced this pull request Mar 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes semver: patch Non-breaking changes which can be included in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants