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

Fix AuditManager post-test destroy s3_bucket errors #30249

Merged
merged 2 commits into from
Mar 24, 2023

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Mar 24, 2023

Description

Adds force_destroy = true to the S3 Bucket resources used in Audit Manager acceptance tests to prevent post-test destroy errors:

=== NAME  TestAccAuditManagerAssessmentReport_basic
    testing_new.go:82: Error running post-test destroy, there may be dangling resources: exit status 1

        Error: deleting S3 Bucket (tf-acc-test-3052686201411694568): BucketNotEmpty: The bucket you tried to delete is not empty
                status code: 409, request id: E4QS7ACHVC70DG46, host id: xH1DwPLjtA2LWZaKlRKNZTh83RpGzaBT6iGM4dhvL/iFLGQDe9XOBi2s4AtlwRDgkx403Rke+rM=

Output from Acceptance Testing

$ make testacc PKG=auditmanager TESTS=TestAccAuditManagerAssessment
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/auditmanager/... -v -count 1 -parallel 20 -run='TestAccAuditManagerAssessment'  -timeout 180m
=== RUN   TestAccAuditManagerAssessmentDelegation_basic
=== PAUSE TestAccAuditManagerAssessmentDelegation_basic
=== RUN   TestAccAuditManagerAssessmentDelegation_disappears
=== PAUSE TestAccAuditManagerAssessmentDelegation_disappears
=== RUN   TestAccAuditManagerAssessmentDelegation_optional
=== PAUSE TestAccAuditManagerAssessmentDelegation_optional
=== RUN   TestAccAuditManagerAssessmentDelegation_multiple
=== PAUSE TestAccAuditManagerAssessmentDelegation_multiple
=== RUN   TestAccAuditManagerAssessmentReport_basic
=== PAUSE TestAccAuditManagerAssessmentReport_basic
=== RUN   TestAccAuditManagerAssessmentReport_disappears
=== PAUSE TestAccAuditManagerAssessmentReport_disappears
=== RUN   TestAccAuditManagerAssessmentReport_optional
=== PAUSE TestAccAuditManagerAssessmentReport_optional
=== RUN   TestAccAuditManagerAssessment_basic
=== PAUSE TestAccAuditManagerAssessment_basic
=== RUN   TestAccAuditManagerAssessment_disappears
=== PAUSE TestAccAuditManagerAssessment_disappears
=== RUN   TestAccAuditManagerAssessment_tags
=== PAUSE TestAccAuditManagerAssessment_tags
=== RUN   TestAccAuditManagerAssessment_optional
=== PAUSE TestAccAuditManagerAssessment_optional
=== CONT  TestAccAuditManagerAssessmentDelegation_basic
=== CONT  TestAccAuditManagerAssessmentReport_optional
=== CONT  TestAccAuditManagerAssessment_optional
=== CONT  TestAccAuditManagerAssessment_tags
=== CONT  TestAccAuditManagerAssessment_disappears
=== CONT  TestAccAuditManagerAssessment_basic
=== CONT  TestAccAuditManagerAssessmentDelegation_multiple
=== CONT  TestAccAuditManagerAssessmentReport_disappears
=== CONT  TestAccAuditManagerAssessmentReport_basic
=== CONT  TestAccAuditManagerAssessmentDelegation_optional
=== CONT  TestAccAuditManagerAssessmentDelegation_disappears
--- PASS: TestAccAuditManagerAssessment_disappears (45.23s)
--- PASS: TestAccAuditManagerAssessmentDelegation_disappears (47.64s)
--- PASS: TestAccAuditManagerAssessment_basic (50.09s)
--- PASS: TestAccAuditManagerAssessmentReport_basic (52.01s)
--- PASS: TestAccAuditManagerAssessmentDelegation_basic (53.21s)
--- PASS: TestAccAuditManagerAssessmentReport_disappears (54.20s)
--- PASS: TestAccAuditManagerAssessmentDelegation_multiple (57.39s)
--- PASS: TestAccAuditManagerAssessment_optional (72.36s)
--- PASS: TestAccAuditManagerAssessment_tags (89.19s)
--- PASS: TestAccAuditManagerAssessmentReport_optional (93.94s)
--- PASS: TestAccAuditManagerAssessmentDelegation_optional (94.00s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/auditmanager       97.290s

@github-actions
Copy link

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added service/auditmanager Issues and PRs that pertain to the auditmanager service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/XS Managed by automation to categorize the size of a PR. labels Mar 24, 2023
@github-actions github-actions bot added the service/cognitoidp Issues and PRs that pertain to the cognitoidp service. label Mar 24, 2023
@jar-b jar-b merged commit dfcbc2c into main Mar 24, 2023
@jar-b jar-b deleted the td-auditmanager-acctest-fix branch March 24, 2023 21:07
@github-actions github-actions bot added this to the v4.61.0 milestone Mar 24, 2023
@github-actions
Copy link

This functionality has been released in v4.61.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 May 1, 2023

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 May 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/auditmanager Issues and PRs that pertain to the auditmanager service. service/cognitoidp Issues and PRs that pertain to the cognitoidp service. size/XS 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