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

r/aws_vpn_gateway: Fix acceptance tests #35772

Merged
merged 5 commits into from
Feb 12, 2024
Merged

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Feb 12, 2024

Description

Address failing aws_vpn_gateway acceptance test by introducing waiters for Create and Delete.
Fixes:

=== RUN   TestAccSiteVPNGateway_disappears
=== PAUSE TestAccSiteVPNGateway_disappears
=== CONT  TestAccSiteVPNGateway_disappears
    vpnsite_gateway_test.go:141: Step 1/1 error: Error running apply: exit status 1
        Error: creating EC2 VPN Gateway: attaching EC2 VPN Gateway (vgw-04d50bfe2d2e5397e) to VPC (vpc-03def81e63e9deaa0): InvalidParameterValue: This call cannot be completed because there is a conflicting pending workflow for vgw-04d50bfe2d2e5397e
          status code: 400, request id: d728e6eb-490a-4a41-b627-1d676d2ba74c
          with aws_vpn_gateway.test,
          on terraform_plugin_test.tf line 20, in resource "aws_vpn_gateway" "test":
          20: resource "aws_vpn_gateway" "test" {
    testing_new.go:91: Error running post-test destroy, there may be dangling resources: exit status 1
        Error: deleting EC2 VPN Gateway (vgw-04d50bfe2d2e5397e): detaching EC2 VPN Gateway (vgw-04d50bfe2d2e5397e) from VPC (vpc-03def81e63e9deaa0): InvalidParameterValue: This call cannot be completed because there is a conflicting pending workflow for vgw-04d50bfe2d2e5397e
          status code: 400, request id: bddf1e96-3ffe-4d9a-9e66-636483f643dd
--- FAIL: TestAccSiteVPNGateway_disappears (71.94s)

Relations

Relates #35747.

References

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccSiteVPNGateway_' PKG=ec2 ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 3  -run=TestAccSiteVPNGateway_ -timeout 360m
=== RUN   TestAccSiteVPNGateway_basic
=== PAUSE TestAccSiteVPNGateway_basic
=== RUN   TestAccSiteVPNGateway_withAvailabilityZoneSetToState
=== PAUSE TestAccSiteVPNGateway_withAvailabilityZoneSetToState
=== RUN   TestAccSiteVPNGateway_amazonSideASN
=== PAUSE TestAccSiteVPNGateway_amazonSideASN
=== RUN   TestAccSiteVPNGateway_disappears
=== PAUSE TestAccSiteVPNGateway_disappears
=== RUN   TestAccSiteVPNGateway_reattach
=== PAUSE TestAccSiteVPNGateway_reattach
=== RUN   TestAccSiteVPNGateway_tags
=== PAUSE TestAccSiteVPNGateway_tags
=== CONT  TestAccSiteVPNGateway_basic
=== CONT  TestAccSiteVPNGateway_disappears
=== CONT  TestAccSiteVPNGateway_tags
--- PASS: TestAccSiteVPNGateway_tags (139.06s)
=== CONT  TestAccSiteVPNGateway_amazonSideASN
--- PASS: TestAccSiteVPNGateway_disappears (156.22s)
=== CONT  TestAccSiteVPNGateway_reattach
--- PASS: TestAccSiteVPNGateway_basic (266.08s)
=== CONT  TestAccSiteVPNGateway_withAvailabilityZoneSetToState
--- PASS: TestAccSiteVPNGateway_amazonSideASN (130.85s)
--- PASS: TestAccSiteVPNGateway_withAvailabilityZoneSetToState (127.91s)
--- PASS: TestAccSiteVPNGateway_reattach (360.98s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	528.175s

% make testacc TESTARGS='-run=TestAccSiteVPNGateway_' PKG=ec2 ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 3  -run=TestAccSiteVPNGateway_ -timeout 360m
=== RUN   TestAccSiteVPNGateway_basic
=== PAUSE TestAccSiteVPNGateway_basic
=== RUN   TestAccSiteVPNGateway_withAvailabilityZoneSetToState
=== PAUSE TestAccSiteVPNGateway_withAvailabilityZoneSetToState
=== RUN   TestAccSiteVPNGateway_amazonSideASN
=== PAUSE TestAccSiteVPNGateway_amazonSideASN
=== RUN   TestAccSiteVPNGateway_disappears
=== PAUSE TestAccSiteVPNGateway_disappears
=== RUN   TestAccSiteVPNGateway_reattach
=== PAUSE TestAccSiteVPNGateway_reattach
=== RUN   TestAccSiteVPNGateway_tags
=== PAUSE TestAccSiteVPNGateway_tags
=== CONT  TestAccSiteVPNGateway_basic
=== CONT  TestAccSiteVPNGateway_disappears
=== CONT  TestAccSiteVPNGateway_tags
--- PASS: TestAccSiteVPNGateway_tags (139.06s)
=== CONT  TestAccSiteVPNGateway_amazonSideASN
--- PASS: TestAccSiteVPNGateway_disappears (156.22s)
=== CONT  TestAccSiteVPNGateway_reattach
--- PASS: TestAccSiteVPNGateway_basic (266.08s)
=== CONT  TestAccSiteVPNGateway_withAvailabilityZoneSetToState
--- PASS: TestAccSiteVPNGateway_amazonSideASN (130.85s)
--- PASS: TestAccSiteVPNGateway_withAvailabilityZoneSetToState (127.91s)
--- PASS: TestAccSiteVPNGateway_reattach (360.98s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	528.175s
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 size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/vpnsite Issues and PRs that pertain to the vpnsite service. labels Feb 12, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Feb 12, 2024
@ewbankkit ewbankkit merged commit d4aaf7c into main Feb 12, 2024
36 checks passed
@ewbankkit ewbankkit deleted the b-aws_vpn_gateway-state branch February 12, 2024 19:19
@github-actions github-actions bot added this to the v5.37.0 milestone Feb 12, 2024
github-actions bot pushed a commit that referenced this pull request Feb 12, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Feb 15, 2024
Copy link

This functionality has been released in v5.37.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!

Copy link

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 Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/vpnsite Issues and PRs that pertain to the vpnsite service. size/M 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