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/data-source/aws_vpc_dhcp_options: TestAccDataSourceAwsVpcDhcpOptions_Filter Failures #14561

Closed
1 task
bflad opened this issue Aug 11, 2020 · 1 comment · Fixed by #14837
Closed
1 task
Labels
good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/ec2 Issues and PRs that pertain to the ec2 service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Aug 11, 2020

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

Description

We recently upgraded to Terraform Plugin SDK version 2, which uses actual Terraform binaries and command outputs for testing rather than relying on an (aging/divergent) internal Terraform core implementation in the SDK, mostly based on Terraform 0.11 with some shims for 0.12 handling. The shims in the previous version of the acceptance testing framework automatically accepted/consolidated resource addresses of count = 1 to be resource_type.resource_name rather than the more correct resource_type.resource_name.0 in Terraform 0.12 and later, which is now being used and expected. It appears this testing is not accounting for that difference:

=== CONT  TestAccDataSourceAwsVpcDhcpOptions_Filter
TestAccDataSourceAwsVpcDhcpOptions_Filter: data_source_aws_vpc_dhcp_options_test.go:52: Check 1/13 error: Not found: aws_vpc_dhcp_options.test in [root]
--- FAIL: TestAccDataSourceAwsVpcDhcpOptions_Filter (12.61s)

To not affect other testing, the fix for this should theoretically be as simple as adding .0 to the end of the resourceName variable:

https://github.com/terraform-providers/terraform-provider-aws/blob/d148d85330ff4cc95700043d8e6947fa71db7f2f/aws/data_source_aws_vpc_dhcp_options_test.go#L49

Or more preferably removing the count from the existing configuration and creating a separate test configuration for testing multiple matches.

Affected Data Source(s)

  • aws_vpc_dhcp_options

Definition of Done

  • TestAccDataSourceAwsVpcDhcpOptions_Filter testing passes

References

@bflad bflad added good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ec2 Issues and PRs that pertain to the ec2 service. technical-debt Addresses areas of the codebase that need refactoring or redesign. labels Aug 11, 2020
@bflad bflad added this to the Roadmap milestone Aug 11, 2020
@bflad bflad linked a pull request Aug 28, 2020 that will close this issue
@ghost
Copy link

ghost commented Sep 28, 2020

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 and limited conversation to collaborators Sep 28, 2020
@breathingdust breathingdust modified the milestones: Roadmap, v3.5.0 Nov 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/ec2 Issues and PRs that pertain to the ec2 service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants