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: Add Common (semgrepable) ErrorCheck functionality #18057

Merged
merged 9 commits into from
Mar 17, 2021

Conversation

YakDriver
Copy link
Member

@YakDriver YakDriver commented Mar 11, 2021

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 #17566
Fixes #16390

Output from acceptance testing (GovCloud):

--- SKIP: TestAccAWSRoute53Record_Alias_VpcEndpoint (423.10s)
--- SKIP: TestAccAWSRoute53Record_Alias_Elb (20.22s)
--- SKIP: TestAccAWSRoute53Record_Alias_S3 (19.21s)
--- SKIP: TestAccAWSRoute53Record_Alias_Uppercase (22.64s)
--- SKIP: TestAccAWSRoute53Record_AliasChange (19.60s)
--- SKIP: TestAccAWSRoute53Record_allowOverwrite (10.72s)
--- SKIP: TestAccAWSRoute53Record_basic (11.17s)
--- SKIP: TestAccAWSRoute53Record_basic_fqdn (13.62s)
--- SKIP: TestAccAWSRoute53Record_basic_trailingPeriodAndZoneID (33.44s)
--- SKIP: TestAccAWSRoute53Record_caaSupport (20.31s)
--- SKIP: TestAccAWSRoute53Record_disappears (36.86s)
--- SKIP: TestAccAWSRoute53Record_disappears_MultipleRecords (33.15s)
--- SKIP: TestAccAWSRoute53Record_doNotAllowOverwrite (11.80s)
--- SKIP: TestAccAWSRoute53Record_dsSupport (11.24s)
--- SKIP: TestAccAWSRoute53Record_empty (11.20s)
--- SKIP: TestAccAWSRoute53Record_failover (15.42s)
--- SKIP: TestAccAWSRoute53Record_generatesSuffix (11.53s)
--- SKIP: TestAccAWSRoute53Record_geolocation_basic (10.19s)
--- SKIP: TestAccAWSRoute53Record_HealthCheckId_SetIdentifierChange (21.36s)
--- SKIP: TestAccAWSRoute53Record_HealthCheckId_TypeChange (15.29s)
--- SKIP: TestAccAWSRoute53Record_latency_basic (62.97s)
--- SKIP: TestAccAWSRoute53Record_longTXTrecord (11.53s)
--- SKIP: TestAccAWSRoute53Record_multivalue_answer_basic (10.03s)
--- SKIP: TestAccAWSRoute53Record_NameChange (33.84s)
--- SKIP: TestAccAWSRoute53Record_SetIdentifierChange (11.58s)
--- SKIP: TestAccAWSRoute53Record_spfSupport (20.75s)
--- SKIP: TestAccAWSRoute53Record_txtSupport (14.06s)
--- SKIP: TestAccAWSRoute53Record_TypeChange (34.83s)
--- SKIP: TestAccAWSRoute53Record_underscored (30.38s)
--- SKIP: TestAccAWSRoute53Record_weighted_alias (42.74s)
--- SKIP: TestAccAWSRoute53Record_weighted_basic (11.65s)
--- SKIP: TestAccAWSRoute53Record_weighted_to_simple_basic (11.53s)
--- SKIP: TestAccAWSRoute53Record_wildcard (11.62s)

On commercial (us-west-2):

--- PASS: TestAccAWSRoute53Record_doNotAllowOverwrite (135.39s)
--- PASS: TestAccAWSRoute53Record_Alias_S3 (152.89s)
--- PASS: TestAccAWSRoute53Record_dsSupport (174.82s)
--- PASS: TestAccAWSRoute53Record_caaSupport (175.10s)
--- PASS: TestAccAWSRoute53Record_multivalue_answer_basic (175.78s)
--- PASS: TestAccAWSRoute53Record_failover (178.10s)
--- PASS: TestAccAWSRoute53Record_generatesSuffix (179.49s)
--- PASS: TestAccAWSRoute53Record_geolocation_basic (182.96s)
--- PASS: TestAccAWSRoute53Record_latency_basic (183.92s)
--- PASS: TestAccAWSRoute53Record_empty (190.77s)
--- PASS: TestAccAWSRoute53Record_longTXTrecord (197.37s)
--- PASS: TestAccAWSRoute53Record_TypeChange (198.71s)
--- PASS: TestAccAWSRoute53Record_basic (207.94s)
--- PASS: TestAccAWSRoute53Record_SetIdentifierChange (221.32s)
--- PASS: TestAccAWSRoute53Record_allowOverwrite (221.76s)
--- PASS: TestAccAWSRoute53Record_wildcard (245.64s)
--- PASS: TestAccAWSRoute53Record_HealthCheckId_SetIdentifierChange (250.42s)
--- PASS: TestAccAWSRoute53Record_AliasChange (256.13s)
--- PASS: TestAccAWSRoute53Record_NameChange (282.15s)
--- PASS: TestAccAWSRoute53Record_Alias_Uppercase (162.23s)
--- PASS: TestAccAWSRoute53Record_HealthCheckId_TypeChange (305.46s)
--- PASS: TestAccAWSRoute53Record_spfSupport (131.32s)
--- PASS: TestAccAWSRoute53Record_Alias_Elb (125.85s)
--- PASS: TestAccAWSRoute53Record_basic_trailingPeriodAndZoneID (146.32s)
--- PASS: TestAccAWSRoute53Record_disappears (135.23s)
--- PASS: TestAccAWSRoute53Record_txtSupport (156.31s)
--- PASS: TestAccAWSRoute53Record_basic_fqdn (161.19s)
--- PASS: TestAccAWSRoute53Record_underscored (147.12s)
--- PASS: TestAccAWSRoute53Record_weighted_to_simple_basic (179.77s)
--- PASS: TestAccAWSRoute53Record_weighted_basic (182.45s)
--- PASS: TestAccAWSRoute53Record_disappears_MultipleRecords (191.86s)
--- PASS: TestAccAWSRoute53Record_weighted_alias (317.13s)
--- PASS: TestAccAWSRoute53Record_Alias_VpcEndpoint (461.22s)

@YakDriver YakDriver requested a review from a team as a code owner March 11, 2021 19:29
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/route53 Issues and PRs that pertain to the route53 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Mar 11, 2021
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good starting implementation. 👍

In the future, we will likely want to consider implementing this where it can read a Terraform configuration to determine all of its resource types, then use those resource types to determine the appropriate error checking functions. This will prevent the multiple AWS SDK Go service import issue and remove the manual coding work.

Output from acceptance testing in AWS Commercial:

--- PASS: TestAccAWSRoute53Record_basic (113.20s)

Output from acceptance testing in AWS GovCloud (US):

--- SKIP: TestAccAWSRoute53Record_basic (9.52s)

aws/provider_test.go Show resolved Hide resolved
aws/provider_test.go Outdated Show resolved Hide resolved
@bflad bflad self-assigned this Mar 15, 2021
@YakDriver YakDriver added this to the v3.33.0 milestone Mar 17, 2021
@YakDriver YakDriver merged commit a45c974 into main Mar 17, 2021
@YakDriver YakDriver deleted the td-add-errorcheck-mech branch March 17, 2021 21:24
@ghost
Copy link

ghost commented Mar 18, 2021

This has been released in version 3.33.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 for triage. Thanks!

@ghost
Copy link

ghost commented Apr 17, 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 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/route53 Issues and PRs that pertain to the route53 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.

tests/resource/route53_record: Hosted zone does not exist (GovCloud)
2 participants