framework: Add semantic equality tests for set bug fix #297
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ref: hashicorp/terraform-plugin-framework#1061
Ref: hashicorp/terraform-plugin-framework#1064
This PR adds a test + resource that recreates the linked bug and tests the fix from framework in the linked PR.
Test failures without the fix (v5, but v6 are the same error messages):
https://github.com/hashicorp/terraform-provider-corner/actions/runs/12830667560/job/35779457519?pr=297
CLI Output
=== RUN TestSetSemanticEqualityResource set_semantic_equality_resource_test.go:18: Step 1/3 error: Error running apply: exit status 1 Error: Provider produced inconsistent result after apply When applying changes to framework_set_semantic_equality.test, provider "provider[\"registry.terraform.io/hashicorp/framework\"]" produced an unexpected new value: .set_of_ipv6: planned set element cty.StringVal("0:0:0:0:0:0:0:0") does not correlate with any element in actual. This is a bug in the provider, which should be reported in the provider's own issue tracker. Error: Provider produced inconsistent result after apply When applying changes to framework_set_semantic_equality.test, provider "provider[\"registry.terraform.io/hashicorp/framework\"]" produced an unexpected new value: .set_of_ipv6: planned set element cty.StringVal("0:0:0:0:0:0:0:101") does not correlate with any element in actual. This is a bug in the provider, which should be reported in the provider's own issue tracker. Error: Provider produced inconsistent result after apply When applying changes to framework_set_semantic_equality.test, provider "provider[\"registry.terraform.io/hashicorp/framework\"]" produced an unexpected new value: .set_of_ipv6: planned set element cty.StringVal("0:0:0:0:0:FFFF:192.168.255.255") does not correlate with any element in actual. This is a bug in the provider, which should be reported in the provider's own issue tracker. Error: Provider produced inconsistent result after apply When applying changes to framework_set_semantic_equality.test, provider "provider[\"registry.terraform.io/hashicorp/framework\"]" produced an unexpected new value: .set_of_ipv6: planned set element cty.StringVal("2001:0DB8:0000:0000:0008:0800:200C:417A") does not correlate with any element in actual. This is a bug in the provider, which should be reported in the provider's own issue tracker. Error: Provider produced inconsistent result after apply When applying changes to framework_set_semantic_equality.test, provider "provider[\"registry.terraform.io/hashicorp/framework\"]" produced an unexpected new value: .set_nested_block: planned set element cty.ObjectVal(map[string]cty.Value{"ipv6":cty.StringVal("2001:db8::8:800:200c:417a")}) does not correlate with any element in actual. This is a bug in the provider, which should be reported in the provider's own issue tracker. Error: Provider produced inconsistent result after apply When applying changes to framework_set_semantic_equality.test, provider "provider[\"registry.terraform.io/hashicorp/framework\"]" produced an unexpected new value: .set_nested_block: planned set element cty.ObjectVal(map[string]cty.Value{"ipv6":cty.StringVal("FF01:0:0:0:0:0:0:0")}) does not correlate with any element in actual. This is a bug in the provider, which should be reported in the provider's own issue tracker.