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

td/Add tests to slot_type and fixes #39353

Merged
merged 5 commits into from
Sep 17, 2024
Merged

td/Add tests to slot_type and fixes #39353

merged 5 commits into from
Sep 17, 2024

Conversation

nam054
Copy link
Contributor

@nam054 nam054 commented Sep 17, 2024

Description

Add tests for composite_slot_type_setting as well as various fixes for naming errors and mix match.

Previously the nested argument sub_slots was misnamed. There was a discrepancy between between the struct and schema - when the current name in the schema is used this error would occur:

        Error: Unable to Convert Configuration
        
          with aws_lexv2models_slot_type.test,
          on terraform_plugin_test.tf line 62, in resource "aws_lexv2models_slot_type" "test":
          62: resource "aws_lexv2models_slot_type" "test" {
        
        An unexpected error was encountered when converting the configuration from
        the protocol type. This is always an issue in terraform-plugin-framework used
        to implement the provider and should be reported to the provider developers.
        
        Please report this to the provider developer:
        
        Unable to unmarshal DynamicValue:
        AttributeName("composite_slot_type_setting").ElementKeyInt(0): unknown
        attribute "subslots"

As such, though technically a break change, it is deemed acceptable within a minor release.

Relations

References

Output from Acceptance Testing

> make testacc TESTARGS="-run=TestAccLexV2ModelsSlotType_" PKG=lexv2models
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.6 test ./internal/service/lexv2models/... -v -count 1 -parallel 20  -run=TestAccLexV2ModelsSlotType_ -timeout 360m
=== RUN   TestAccLexV2ModelsSlotType_basic
=== PAUSE TestAccLexV2ModelsSlotType_basic
=== RUN   TestAccLexV2ModelsSlotType_values
=== PAUSE TestAccLexV2ModelsSlotType_values
=== RUN   TestAccLexV2ModelsSlotType_disappears
=== PAUSE TestAccLexV2ModelsSlotType_disappears
=== RUN   TestAccLexV2ModelsSlotType_valueSelectionSetting
=== PAUSE TestAccLexV2ModelsSlotType_valueSelectionSetting
=== RUN   TestAccLexV2ModelsSlotType_compositeSlotTypeSetting
=== PAUSE TestAccLexV2ModelsSlotType_compositeSlotTypeSetting
=== CONT  TestAccLexV2ModelsSlotType_basic
=== CONT  TestAccLexV2ModelsSlotType_valueSelectionSetting
=== CONT  TestAccLexV2ModelsSlotType_compositeSlotTypeSetting
=== CONT  TestAccLexV2ModelsSlotType_values
=== CONT  TestAccLexV2ModelsSlotType_disappears
--- PASS: TestAccLexV2ModelsSlotType_compositeSlotTypeSetting (49.64s)
--- PASS: TestAccLexV2ModelsSlotType_valueSelectionSetting (49.70s)
--- PASS: TestAccLexV2ModelsSlotType_values (51.75s)
--- PASS: TestAccLexV2ModelsSlotType_basic (51.78s)
--- PASS: TestAccLexV2ModelsSlotType_disappears (52.22s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/lexv2models        58.422s

...

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 tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/lexv2models Issues and PRs that pertain to the lexv2models service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Sep 17, 2024
@nam054 nam054 changed the title Add sub_slot tests and fix naming td/Add tests to slot_type and fixes Sep 17, 2024
@nam054 nam054 marked this pull request as ready for review September 17, 2024 08:38
@nam054 nam054 requested a review from a team as a code owner September 17, 2024 08:38
@jar-b jar-b self-assigned this Sep 17, 2024
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

Just needs a changelog.

% make testacc PKG=lexv2models TESTS=TestAccLexV2ModelsSlotType_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.6 test ./internal/service/lexv2models/... -v -count 1 -parallel 20 -run='TestAccLexV2ModelsSlotType_'  -timeout 360m

--- PASS: TestAccLexV2ModelsSlotType_compositeSlotTypeSetting (42.88s)
--- PASS: TestAccLexV2ModelsSlotType_valueSelectionSetting (42.91s)
--- PASS: TestAccLexV2ModelsSlotType_disappears (43.63s)
--- PASS: TestAccLexV2ModelsSlotType_values (43.84s)
--- PASS: TestAccLexV2ModelsSlotType_basic (45.66s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/lexv2models        51.940s

internal/service/lexv2models/slot_type.go Show resolved Hide resolved
@nam054 nam054 merged commit 1d128ad into main Sep 17, 2024
34 checks passed
@nam054 nam054 deleted the td/add-more-tests branch September 17, 2024 19:08
@github-actions github-actions bot added this to the v5.68.0 milestone Sep 17, 2024
terraform-aws-provider bot pushed a commit that referenced this pull request Sep 17, 2024
Copy link

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

@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Sep 20, 2024
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 Oct 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/lexv2models Issues and PRs that pertain to the lexv2models service. 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.

2 participants