Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace use of acctest.ProviderFactories with acctest.ProtoV5ProviderFactories #25733

Merged

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Jul 7, 2022

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates #23948.
Relates #25606.
Relates #24680.

This PR replaces all uses of acctest.ProviderFactories in acceptance test code with acctest.ProtoV5ProviderFactories to ensure that the multiplexed provider introduced in #25606 is used.
Also updated are skaff templates and contributor documentation.
An existing semgrep rule has been modified to ensure compliance.

Those uses of acctest.FactoriesAlternate that used the returned providers (e.g. in acctest.CheckWithProviders) have not (yet) been replaced.

Ensure that contributor documentation changes are propagated to #25304: a083e96.

ewbankkit added 30 commits July 7, 2022 12:10
Acceptance test output:

% make testacc TESTARGS='-run=TestAccProvider_' PKG_NAME=./internal/acctest ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ././internal/acctest/... -v -count 1 -parallel 3  -run=TestAccProvider_ -timeout 180m
=== RUN   TestAccProvider_DefaultTags_emptyBlock
=== PAUSE TestAccProvider_DefaultTags_emptyBlock
=== RUN   TestAccProvider_DefaultTagsTags_none
=== PAUSE TestAccProvider_DefaultTagsTags_none
=== RUN   TestAccProvider_DefaultTagsTags_one
=== PAUSE TestAccProvider_DefaultTagsTags_one
=== RUN   TestAccProvider_DefaultTagsTags_multiple
=== PAUSE TestAccProvider_DefaultTagsTags_multiple
=== RUN   TestAccProvider_DefaultAndIgnoreTags_emptyBlocks
=== PAUSE TestAccProvider_DefaultAndIgnoreTags_emptyBlocks
=== RUN   TestAccProvider_endpoints
=== PAUSE TestAccProvider_endpoints
=== RUN   TestAccProvider_fipsEndpoint
=== PAUSE TestAccProvider_fipsEndpoint
=== RUN   TestAccProvider_unusualEndpoints
=== PAUSE TestAccProvider_unusualEndpoints
=== RUN   TestAccProvider_IgnoreTags_emptyBlock
=== PAUSE TestAccProvider_IgnoreTags_emptyBlock
=== RUN   TestAccProvider_IgnoreTagsKeyPrefixes_none
=== PAUSE TestAccProvider_IgnoreTagsKeyPrefixes_none
=== RUN   TestAccProvider_IgnoreTagsKeyPrefixes_one
=== PAUSE TestAccProvider_IgnoreTagsKeyPrefixes_one
=== RUN   TestAccProvider_IgnoreTagsKeyPrefixes_multiple
=== PAUSE TestAccProvider_IgnoreTagsKeyPrefixes_multiple
=== RUN   TestAccProvider_IgnoreTagsKeys_none
=== PAUSE TestAccProvider_IgnoreTagsKeys_none
=== RUN   TestAccProvider_IgnoreTagsKeys_one
=== PAUSE TestAccProvider_IgnoreTagsKeys_one
=== RUN   TestAccProvider_IgnoreTagsKeys_multiple
=== PAUSE TestAccProvider_IgnoreTagsKeys_multiple
=== RUN   TestAccProvider_Region_c2s
=== PAUSE TestAccProvider_Region_c2s
=== RUN   TestAccProvider_Region_china
=== PAUSE TestAccProvider_Region_china
=== RUN   TestAccProvider_Region_commercial
=== PAUSE TestAccProvider_Region_commercial
=== RUN   TestAccProvider_Region_govCloud
=== PAUSE TestAccProvider_Region_govCloud
=== RUN   TestAccProvider_Region_sc2s
=== PAUSE TestAccProvider_Region_sc2s
=== RUN   TestAccProvider_Region_stsRegion
=== PAUSE TestAccProvider_Region_stsRegion
=== RUN   TestAccProvider_AssumeRole_empty
=== PAUSE TestAccProvider_AssumeRole_empty
=== CONT  TestAccProvider_DefaultTags_emptyBlock
=== CONT  TestAccProvider_IgnoreTagsKeyPrefixes_multiple
=== CONT  TestAccProvider_Region_commercial
--- PASS: TestAccProvider_Region_commercial (6.09s)
=== CONT  TestAccProvider_AssumeRole_empty
--- PASS: TestAccProvider_DefaultTags_emptyBlock (7.64s)
=== CONT  TestAccProvider_Region_stsRegion
--- PASS: TestAccProvider_IgnoreTagsKeyPrefixes_multiple (7.66s)
=== CONT  TestAccProvider_fipsEndpoint
--- PASS: TestAccProvider_Region_stsRegion (4.42s)
=== CONT  TestAccProvider_IgnoreTagsKeyPrefixes_one
--- PASS: TestAccProvider_AssumeRole_empty (10.47s)
=== CONT  TestAccProvider_IgnoreTagsKeyPrefixes_none
--- PASS: TestAccProvider_IgnoreTagsKeyPrefixes_one (5.73s)
=== CONT  TestAccProvider_IgnoreTags_emptyBlock
--- PASS: TestAccProvider_IgnoreTagsKeyPrefixes_none (6.06s)
=== CONT  TestAccProvider_unusualEndpoints
--- PASS: TestAccProvider_IgnoreTags_emptyBlock (6.03s)
=== CONT  TestAccProvider_Region_sc2s
--- PASS: TestAccProvider_fipsEndpoint (18.90s)
=== CONT  TestAccProvider_Region_govCloud
--- PASS: TestAccProvider_Region_sc2s (4.78s)
=== CONT  TestAccProvider_IgnoreTagsKeys_multiple
--- PASS: TestAccProvider_unusualEndpoints (7.04s)
=== CONT  TestAccProvider_Region_china
--- PASS: TestAccProvider_Region_govCloud (5.05s)
=== CONT  TestAccProvider_Region_c2s
--- PASS: TestAccProvider_Region_china (5.07s)
=== CONT  TestAccProvider_DefaultTagsTags_multiple
--- PASS: TestAccProvider_IgnoreTagsKeys_multiple (6.84s)
=== CONT  TestAccProvider_IgnoreTagsKeys_one
--- PASS: TestAccProvider_Region_c2s (5.13s)
=== CONT  TestAccProvider_endpoints
--- PASS: TestAccProvider_DefaultTagsTags_multiple (7.27s)
=== CONT  TestAccProvider_DefaultTagsTags_one
--- PASS: TestAccProvider_IgnoreTagsKeys_one (7.18s)
=== CONT  TestAccProvider_DefaultAndIgnoreTags_emptyBlocks
--- PASS: TestAccProvider_endpoints (7.62s)
=== CONT  TestAccProvider_DefaultTagsTags_none
--- PASS: TestAccProvider_DefaultTagsTags_one (6.72s)
=== CONT  TestAccProvider_IgnoreTagsKeys_none
--- PASS: TestAccProvider_DefaultAndIgnoreTags_emptyBlocks (7.00s)
--- PASS: TestAccProvider_DefaultTagsTags_none (6.59s)
--- PASS: TestAccProvider_IgnoreTagsKeys_none (5.38s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/acctest	58.425s
@ewbankkit ewbankkit marked this pull request as ready for review July 8, 2022 19:55
ewbankkit added 18 commits July 23, 2022 17:15
…rotoV5FactoriesAlternate'.

Acceptance test output:

% make testacc TESTARGS='-run=TestAccVPCSecurityGroupRule_Ingress_peeredVPC' PKG=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20  -run=TestAccVPCSecurityGroupRule_Ingress_peeredVPC -timeout 180m
=== RUN   TestAccVPCSecurityGroupRule_Ingress_peeredVPC
=== PAUSE TestAccVPCSecurityGroupRule_Ingress_peeredVPC
=== CONT  TestAccVPCSecurityGroupRule_Ingress_peeredVPC
--- PASS: TestAccVPCSecurityGroupRule_Ingress_peeredVPC (31.85s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	36.516s
@ewbankkit ewbankkit merged commit 1bc96e1 into main Jul 25, 2022
@ewbankkit ewbankkit deleted the td-acctest.ProviderFactories-to-acctest.ProtoV5ProviderFactories branch July 25, 2022 11:48
@github-actions github-actions bot added this to the v4.24.0 milestone Jul 25, 2022
@github-actions
Copy link

github-actions bot commented Aug 3, 2022

This functionality has been released in v4.24.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Sep 3, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant