Skip to content

Commit 53fd330

Browse files
committed
test in grpc_provider
1 parent 8724d55 commit 53fd330

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

internal/plugin/grpc_provider_test.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,23 @@ func providerProtoSchema() *proto.GetProviderSchema_Response {
146146
Required: true,
147147
},
148148
},
149+
BlockTypes: []*proto.Schema_NestedBlock{
150+
{
151+
TypeName: "nested_filter",
152+
Nesting: proto.Schema_NestedBlock_SINGLE,
153+
Block: &proto.Schema_Block{
154+
Attributes: []*proto.Schema_Attribute{
155+
{
156+
Name: "nested_attr",
157+
Type: []byte(`"string"`),
158+
Required: false,
159+
},
160+
},
161+
},
162+
MinItems: 1,
163+
MaxItems: 1,
164+
},
165+
},
149166
},
150167
},
151168
},
@@ -1438,6 +1455,21 @@ func TestGRPCProvider_GetSchema_ListResourceTypes(t *testing.T) {
14381455
Required: true,
14391456
},
14401457
},
1458+
BlockTypes: map[string]*configschema.NestedBlock{
1459+
"nested_filter": {
1460+
Block: configschema.Block{
1461+
Attributes: map[string]*configschema.Attribute{
1462+
"nested_attr": {
1463+
Type: cty.String,
1464+
Required: false,
1465+
},
1466+
},
1467+
},
1468+
Nesting: configschema.NestingSingle,
1469+
MinItems: 1,
1470+
MaxItems: 1,
1471+
},
1472+
},
14411473
},
14421474
Nesting: configschema.NestingSingle,
14431475
MinItems: 1,

internal/terraform/context_plan_query_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ func TestContext2Plan_queryList(t *testing.T) {
264264
},
265265
},
266266
{
267-
// want this to fail
268267
name: "with empty config when it is required",
269268
mainConfig: `
270269
terraform {
@@ -777,7 +776,6 @@ func TestContext2Plan_queryList(t *testing.T) {
777776
},
778777
},
779778
{
780-
// Test list reference with index but without data field
781779
name: "list reference as for_each",
782780
mainConfig: `
783781
terraform {

0 commit comments

Comments
 (0)