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

tests/resource/aws_network_acl: Failing acceptance test 'TestAccAWSNetworkAcl_SubnetChange' #17857

Closed
ewbankkit opened this issue Feb 27, 2021 · 2 comments
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Comments

@ewbankkit
Copy link
Contributor

ewbankkit commented Feb 27, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Acceptance Test

TestAccAWSNetworkAcl_SubnetChange is failing:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSNetworkAcl_SubnetChange' ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 2 -run=TestAccAWSNetworkAcl_SubnetChange -timeout 120m
=== RUN   TestAccAWSNetworkAcl_SubnetChange
=== PAUSE TestAccAWSNetworkAcl_SubnetChange
=== CONT  TestAccAWSNetworkAcl_SubnetChange
    resource_aws_network_acl_test.go:489: Step 3/3 error: Error running apply: exit status 1
        2021/02/27 16:54:11 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.13.0
        
        Error: InvalidAssociationID.NotFound: The association ID 'aclassoc-09274245ba45bbe14' does not exist
        	status code: 400, request id: d0d44bde-e226-4d81-b09c-34e6e39092b9
        
          on terraform_plugin_test.tf line 30, in resource "aws_network_acl" "test":
          30: resource "aws_network_acl" "test" {
        
        
--- FAIL: TestAccAWSNetworkAcl_SubnetChange (51.95s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	52.061s
FAIL
GNUmakefile:27: recipe for target 'testacc' failed
make: *** [testacc] Error 1

Affected Resource(s)

  • aws_network_acl

References

Noticed while testing (but unrelated to the changes in) #17834.

My initial guess is that this code

_, err = conn.ReplaceNetworkAclAssociation(&ec2.ReplaceNetworkAclAssociationInput{
AssociationId: association.NetworkAclAssociationId,
NetworkAclId: aws.String(d.Id()),
})
if err != nil {
return err
}

is the cause as it seems like the only code in the update path that returns an undecorated AWS error.

@ghost ghost added the service/ec2 Issues and PRs that pertain to the ec2 service. label Feb 27, 2021
@ewbankkit ewbankkit added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label Feb 27, 2021
@ewbankkit
Copy link
Contributor Author

No longer failing:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSNetworkAcl_SubnetChange'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSNetworkAcl_SubnetChange -timeout 180m
=== RUN   TestAccAWSNetworkAcl_SubnetChange
=== PAUSE TestAccAWSNetworkAcl_SubnetChange
=== CONT  TestAccAWSNetworkAcl_SubnetChange
--- PASS: TestAccAWSNetworkAcl_SubnetChange (68.44s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	68.536s

@ghost
Copy link

ghost commented Apr 26, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

No branches or pull requests

1 participant