@@ -483,7 +483,7 @@ func TestGRPCProvider_ValidateListResourceConfig(t *testing.T) {
483483 gomock .Any (),
484484 ).Return (& proto.ValidateListResourceConfig_Response {}, nil )
485485
486- cfg := hcl2shim .HCL2ValueFromConfigValue (map [string ]interface {}{ "config" : map [ string ] interface {}{ " filter_attr" : "value" , "nested_filter" : map [string ]interface {}{ "nested_attr" : "value" } }})
486+ cfg := hcl2shim .HCL2ValueFromConfigValue (map [string ]any { " filter_attr" : "value" , "nested_filter" : map [string ]any { "nested_attr" : "value" }})
487487 resp := p .ValidateListResourceConfig (providers.ValidateListResourceConfigRequest {
488488 TypeName : "list" ,
489489 Config : cfg ,
@@ -530,14 +530,10 @@ func TestGRPCProvider_ValidateListResourceConfig_OptionalCfg(t *testing.T) {
530530 ).Return (& proto.ValidateListResourceConfig_Response {}, nil )
531531
532532 converted := convert .ProtoToListSchema (sch .ListResourceSchemas ["list" ])
533- cfg := hcl2shim .HCL2ValueFromConfigValue (map [string ]any {})
534- coercedCfg , err := converted .Body .CoerceValue (cfg )
535- if err != nil {
536- t .Fatalf ("failed to coerce config: %v" , err )
537- }
533+ cfg := converted .Body .BlockTypes ["config" ].Block .EmptyValue ()
538534 resp := p .ValidateListResourceConfig (providers.ValidateListResourceConfigRequest {
539535 TypeName : "list" ,
540- Config : coercedCfg ,
536+ Config : cfg ,
541537 })
542538 checkDiags (t , resp .Diagnostics )
543539}
@@ -1702,11 +1698,9 @@ func TestGRPCProvider_ListResource(t *testing.T) {
17021698
17031699 // Create the request
17041700 configVal := cty .ObjectVal (map [string ]cty.Value {
1705- "config" : cty .ObjectVal (map [string ]cty.Value {
1706- "filter_attr" : cty .StringVal ("filter-value" ),
1707- "nested_filter" : cty .ObjectVal (map [string ]cty.Value {
1708- "nested_attr" : cty .StringVal ("value" ),
1709- }),
1701+ "filter_attr" : cty .StringVal ("filter-value" ),
1702+ "nested_filter" : cty .ObjectVal (map [string ]cty.Value {
1703+ "nested_attr" : cty .StringVal ("value" ),
17101704 }),
17111705 })
17121706 request := providers.ListResourceRequest {
@@ -1787,11 +1781,9 @@ func TestGRPCProvider_ListResource_Error(t *testing.T) {
17871781 ).Return (nil , fmt .Errorf ("provider error" ))
17881782
17891783 configVal := cty .ObjectVal (map [string ]cty.Value {
1790- "config" : cty .ObjectVal (map [string ]cty.Value {
1791- "filter_attr" : cty .StringVal ("filter-value" ),
1792- "nested_filter" : cty .ObjectVal (map [string ]cty.Value {
1793- "nested_attr" : cty .StringVal ("value" ),
1794- }),
1784+ "filter_attr" : cty .StringVal ("filter-value" ),
1785+ "nested_filter" : cty .ObjectVal (map [string ]cty.Value {
1786+ "nested_attr" : cty .StringVal ("value" ),
17951787 }),
17961788 })
17971789 request := providers.ListResourceRequest {
@@ -1805,11 +1797,9 @@ func TestGRPCProvider_ListResource_Error(t *testing.T) {
18051797
18061798func TestGRPCProvider_ListResource_Diagnostics (t * testing.T ) {
18071799 configVal := cty .ObjectVal (map [string ]cty.Value {
1808- "config" : cty .ObjectVal (map [string ]cty.Value {
1809- "filter_attr" : cty .StringVal ("filter-value" ),
1810- "nested_filter" : cty .ObjectVal (map [string ]cty.Value {
1811- "nested_attr" : cty .StringVal ("value" ),
1812- }),
1800+ "filter_attr" : cty .StringVal ("filter-value" ),
1801+ "nested_filter" : cty .ObjectVal (map [string ]cty.Value {
1802+ "nested_attr" : cty .StringVal ("value" ),
18131803 }),
18141804 })
18151805 request := providers.ListResourceRequest {
@@ -2071,11 +2061,9 @@ func TestGRPCProvider_ListResource_Limit(t *testing.T) {
20712061
20722062 // Create the request
20732063 configVal := cty .ObjectVal (map [string ]cty.Value {
2074- "config" : cty .ObjectVal (map [string ]cty.Value {
2075- "filter_attr" : cty .StringVal ("filter-value" ),
2076- "nested_filter" : cty .ObjectVal (map [string ]cty.Value {
2077- "nested_attr" : cty .StringVal ("value" ),
2078- }),
2064+ "filter_attr" : cty .StringVal ("filter-value" ),
2065+ "nested_filter" : cty .ObjectVal (map [string ]cty.Value {
2066+ "nested_attr" : cty .StringVal ("value" ),
20792067 }),
20802068 })
20812069 request := providers.ListResourceRequest {
0 commit comments