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

Migrate IAM OIDC Tests to LocalStack#13787

Merged
pinzon merged 5 commits into
iam/moto-migrationfrom
cris/unc-267
Feb 18, 2026
Merged

Migrate IAM OIDC Tests to LocalStack#13787
pinzon merged 5 commits into
iam/moto-migrationfrom
cris/unc-267

Conversation

@pinzon

@pinzon pinzon commented Feb 17, 2026

Copy link
Copy Markdown
Member

Motivation

This PR migrates the tests about IAM OIDC from moto to LocalStack

Changes

Moto Tests to LocalStack Tests

# Moto Test Function LocalStack Test Class/Method Status
1 test_create_open_id_connect_provider TestOIDCProviderCreate.test_create_open_id_connect_provider Migrated (partial - query string test removed)
2 test_create_open_id_connect_provider_with_tags - Removed (duplicate of tagging tests)
3 test_create_open_id_connect_provider_invalid_url TestOIDCProviderCreateErrors.test_create_open_id_connect_provider_invalid_url Migrated
4 test_create_open_id_connect_provider_errors TestOIDCProviderCreateErrors.test_create_open_id_connect_provider_duplicate_error Migrated (renamed)
5 test_create_open_id_connect_provider_too_many_entries TestOIDCProviderCreateErrors.test_create_open_id_connect_provider_too_many_thumbprints Migrated (renamed)
6 test_create_open_id_connect_provider_quota_error TestOIDCProviderCreateErrors.test_create_open_id_connect_provider_quota_error Migrated
7 test_create_open_id_connect_provider_multiple_errors TestOIDCProviderCreateErrors.test_create_open_id_connect_provider_validation_errors Migrated (renamed)
8 test_delete_open_id_connect_provider TestOIDCProviderOperations.test_delete_open_id_connect_provider Migrated
9 (part of #8 in moto) - Removed (idempotent delete - AWS raises error)
10 test_get_open_id_connect_provider TestOIDCProviderOperations.test_get_open_id_connect_provider Migrated
11 test_get_open_id_connect_provider_errors TestOIDCProviderOperations.test_get_open_id_connect_provider_not_found Migrated (renamed)
12 test_update_open_id_connect_provider TestOIDCProviderOperations.test_update_open_id_connect_provider_thumbprint Migrated
13 test_list_open_id_connect_providers TestOIDCProviderList.test_list_open_id_connect_providers Migrated
14 test_tag_open_id_connect_provider TestOIDCProviderTags.test_tag_open_id_connect_provider Migrated
15 test_untag_open_id_connect_provider TestOIDCProviderTags.test_untag_open_id_connect_provider Migrated
16 test_list_open_id_connect_provider_tags TestOIDCProviderTags.test_list_open_id_connect_provider_tags Migrated
17 test_list_open_id_connect_provider_tags__paginated - Removed (AWS tag limit is 50, not 150)
18 test_list_open_id_connect_provider_tags__maxitems TestOIDCProviderTags.test_list_open_id_connect_provider_tags_max_items Migrated

Tests Removed and Reasons

Test Reason for Removal
test_create_open_id_connect_provider (query string part) AWS raises an error when URL contains query string parameters
test_create_open_id_connect_provider_with_tags Duplicate functionality - already covered by TestOIDCProviderTags.test_tag_open_id_connect_provider
test_delete_open_id_connect_provider_idempotent AWS raises NoSuchEntity error when deleting a non-existent provider (not idempotent like moto)
test_list_open_id_connect_provider_tags_paginated AWS limits OIDC provider tags to 50 (not 150 as moto allows)

@pinzon pinzon marked this pull request as ready for review February 17, 2026 19:44
@pinzon pinzon requested a review from dfangl as a code owner February 17, 2026 19:44
@github-actions

github-actions Bot commented Feb 17, 2026

Copy link
Copy Markdown

Test Results - Preflight, Unit

23 123 tests  ±0   21 252 ✅ ±0   6m 11s ⏱️ -4s
     1 suites ±0    1 871 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 3092b4b. ± Comparison against base commit 26d1129.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Feb 17, 2026

Copy link
Copy Markdown

LocalStack Community integration with Pro

  2 files  ±    0    2 suites  ±0   2m 39s ⏱️ - 2h 2m 44s
517 tests  - 5 070  268 ✅  - 4 727  249 💤  - 342  0 ❌  - 1 
519 runs   - 5 070  268 ✅  - 4 727  251 💤  - 342  0 ❌  - 1 

Results for commit 3092b4b. ± Comparison against base commit 26d1129.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Feb 17, 2026

Copy link
Copy Markdown

Test Results (amd64) - Acceptance

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

Results for commit 3092b4b. ± Comparison against base commit 26d1129.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Feb 17, 2026

Copy link
Copy Markdown

Test Results (amd64) - Integration, Bootstrap

  5 files  ±    0    5 suites  ±0   11m 3s ⏱️ - 2h 28m 50s
541 tests  - 5 451  292 ✅  - 4 952  249 💤  - 498  0 ❌  - 1 
547 runs   - 5 451  292 ✅  - 4 952  255 💤  - 498  0 ❌  - 1 

Results for commit 3092b4b. ± Comparison against base commit 26d1129.

♻️ This comment has been updated with latest results.

@pinzon pinzon 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 17, 2026

@dfangl dfangl 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.

Thanks for migrating those!
Besides the snapshot issues, I'd lie to raise two more questions:
The migration table lists:

test_delete_open_id_connect_provider_idempotent: AWS raises NoSuchEntity error when deleting a non-existent provider (not idempotent like moto)
Can we assert this then? Same for:
test_list_open_id_connect_provider_tags_paginated: AWS limits OIDC provider tags to 50 (not 150 as moto allows)
This should not be a reason to completely skip the tests, we can just slightly adapt the assertions :)

Comment thread tests/aws/services/iam/test_iam_oidc.py Outdated
Comment thread tests/aws/services/iam/test_iam_oidc.py Outdated
@pinzon

pinzon commented Feb 18, 2026

Copy link
Copy Markdown
Member Author

Can we assert this then?

Done 👍

This should not be a reason to completely skip the tests, we can just slightly adapt the assertions :)

I added a new test that asserts this limit

@pinzon pinzon requested a review from dfangl February 18, 2026 19:28

@dfangl dfangl 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.

Please snapshot that one test, then it is good to merge!

Comment thread tests/aws/services/iam/test_iam_oidc.py Outdated
# Verify operation is not idempotent
with pytest.raises(ClientError) as exc:
aws_client.iam.delete_open_id_connect_provider(OpenIDConnectProviderArn=arn)
assert "NoSuchEntity" in str(exc.value) or "not found" in str(exc.value).lower()

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.

Can we snapshot this error?

@pinzon pinzon added the review: merge when ready Signals to the reviewer that a PR can be merged if accepted label Feb 18, 2026
@pinzon pinzon merged commit 49e13e2 into iam/moto-migration Feb 18, 2026
7 checks passed
@pinzon pinzon deleted the cris/unc-267 branch February 18, 2026 20:28
dfangl pushed a commit that referenced this pull request Feb 19, 2026
dfangl pushed a commit that referenced this pull request Feb 26, 2026
dfangl pushed a commit that referenced this pull request Feb 26, 2026
dfangl pushed a commit that referenced this pull request Mar 4, 2026
dfangl pushed 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 review: merge when ready Signals to the reviewer that a PR can be merged if accepted 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