Migrate IAM OIDC Tests to LocalStack#13787
Conversation
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 2m 39s ⏱️ - 2h 2m 44s Results for commit 3092b4b. ± Comparison against base commit 26d1129. ♻️ This comment has been updated with latest results. |
Test Results (amd64) - Integration, Bootstrap 5 files ± 0 5 suites ±0 11m 3s ⏱️ - 2h 28m 50s Results for commit 3092b4b. ± Comparison against base commit 26d1129. ♻️ This comment has been updated with latest results. |
dfangl
left a comment
There was a problem hiding this comment.
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 :)
Done 👍
I added a new test that asserts this limit |
dfangl
left a comment
There was a problem hiding this comment.
Please snapshot that one test, then it is good to merge!
| # 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() |
Motivation
This PR migrates the tests about IAM OIDC from moto to LocalStack
Changes
Moto Tests to LocalStack Tests
test_create_open_id_connect_providerTestOIDCProviderCreate.test_create_open_id_connect_providertest_create_open_id_connect_provider_with_tagstest_create_open_id_connect_provider_invalid_urlTestOIDCProviderCreateErrors.test_create_open_id_connect_provider_invalid_urltest_create_open_id_connect_provider_errorsTestOIDCProviderCreateErrors.test_create_open_id_connect_provider_duplicate_errortest_create_open_id_connect_provider_too_many_entriesTestOIDCProviderCreateErrors.test_create_open_id_connect_provider_too_many_thumbprintstest_create_open_id_connect_provider_quota_errorTestOIDCProviderCreateErrors.test_create_open_id_connect_provider_quota_errortest_create_open_id_connect_provider_multiple_errorsTestOIDCProviderCreateErrors.test_create_open_id_connect_provider_validation_errorstest_delete_open_id_connect_providerTestOIDCProviderOperations.test_delete_open_id_connect_providertest_get_open_id_connect_providerTestOIDCProviderOperations.test_get_open_id_connect_providertest_get_open_id_connect_provider_errorsTestOIDCProviderOperations.test_get_open_id_connect_provider_not_foundtest_update_open_id_connect_providerTestOIDCProviderOperations.test_update_open_id_connect_provider_thumbprinttest_list_open_id_connect_providersTestOIDCProviderList.test_list_open_id_connect_providerstest_tag_open_id_connect_providerTestOIDCProviderTags.test_tag_open_id_connect_providertest_untag_open_id_connect_providerTestOIDCProviderTags.test_untag_open_id_connect_providertest_list_open_id_connect_provider_tagsTestOIDCProviderTags.test_list_open_id_connect_provider_tagstest_list_open_id_connect_provider_tags__paginatedtest_list_open_id_connect_provider_tags__maxitemsTestOIDCProviderTags.test_list_open_id_connect_provider_tags_max_itemsTests Removed and Reasons
test_create_open_id_connect_provider(query string part)test_create_open_id_connect_provider_with_tagsTestOIDCProviderTags.test_tag_open_id_connect_providertest_delete_open_id_connect_provider_idempotentNoSuchEntityerror when deleting a non-existent provider (not idempotent like moto)test_list_open_id_connect_provider_tags_paginated