Closed austinvalle closed 2 months ago
Just some cleaning up I found while working on something else.
FYI, for the unit tests being uncommented, they were originally failing because collection types with missing element types are considered invalid, and thus not equal: https://github.com/hashicorp/terraform-plugin-framework/blob/91edd79716f11d776a12427a8d49a6a15e0566b9/types/basetypes/list_type.go#L112-L115
Since all these custom type tests were embedding the underlying collection type, the element type was nil, thus failing the cmp.Diff in all the tests with a confusing diff 😆
nil
cmp.Diff
--- FAIL: TestMapNestedAttributeGetType (0.00s) --- FAIL: TestMapNestedAttributeGetType/custom-type (0.00s) /Users/austin.valle/code/terraform-plugin-framework/resource/schema/map_nested_attribute_test.go:411: unexpected difference: testtypes.MapType( - {}, + {}, )
The int64/int32/float64/float32/object unit tests were never failing, but likely just commented out on accident 👍🏻
~Also contains the linter fixes for go 1.23 😆~
Edit: Framework linting fixes are in main now!
Just some cleaning up I found while working on something else.
FYI, for the unit tests being uncommented, they were originally failing because collection types with missing element types are considered invalid, and thus not equal: https://github.com/hashicorp/terraform-plugin-framework/blob/91edd79716f11d776a12427a8d49a6a15e0566b9/types/basetypes/list_type.go#L112-L115
Since all these custom type tests were embedding the underlying collection type, the element type was
nil
, thus failing thecmp.Diff
in all the tests with a confusing diff 😆The int64/int32/float64/float32/object unit tests were never failing, but likely just commented out on accident 👍🏻