-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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_cloudwatch_event_connection: fix expander assertions #38800
Conversation
…tions Changes the location of the type assertion to `[]interface{}` on all expanders to prevent nil values from triggering a crash. ```console % make testacc PKG=events TESTS=TestAccEventsConnection_ make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.22.6 test ./internal/service/events/... -v -count 1 -parallel 20 -run='TestAccEventsConnection_' -timeout 360m --- PASS: TestAccEventsConnection_disappears (14.70s) --- PASS: TestAccEventsConnection_invocationHTTPParameters (31.96s) --- PASS: TestAccEventsConnection_apiKey (33.89s) --- PASS: TestAccEventsConnection_basic (33.99s) --- PASS: TestAccEventsConnection_oAuth (72.01s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/events 77.993s ```
Adjusts all expanders to check for nil items in an `[]interface{}` before asserting to `map[string]interface{}`.
Community NoteVoting for Prioritization
For Submitters
|
```console % make testacc PKG=events TESTS=TestAccEventsConnection_ make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.22.6 test ./internal/service/events/... -v -count 1 -parallel 20 -run='TestAccEventsConnection_' -timeout 360m --- PASS: TestAccEventsConnection_disappears (15.30s) --- PASS: TestAccEventsConnection_invocationHTTPParameters (33.59s) --- PASS: TestAccEventsConnection_basic (35.75s) --- PASS: TestAccEventsConnection_apiKey (36.70s) --- PASS: TestAccEventsConnection_oAuth (69.78s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/events 75.894s ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
This functionality has been released in v5.63.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! |
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. |
Description
Changes the location of the type assertion to
[]interface{}
on all expanders to prevent nil values from triggering a crash. Adjusts all expanders to check for nil items in an[]interface{}
before asserting tomap[string]interface{}
.Relations
Closes #35326
Closes #31671
References
Output from Acceptance Testing