Skip to content

Commit dee860a

Browse files
committed
more green
1 parent 426171c commit dee860a

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

statecheck/expect_known_value_test.go

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,8 @@ func TestExpectKnownValue_CheckState_ListNestedBlock(t *testing.T) {
631631
t.Parallel()
632632

633633
r.Test(t, r.TestCase{
634-
ProviderFactories: map[string]func() (*schema.Provider, error){
635-
"test": func() (*schema.Provider, error) { //nolint:unparam // required signature
636-
return testProvider(), nil
637-
},
634+
ProtoV6ProviderFactories: map[string]func() (tfprotov6.ProviderServer, error){
635+
"test": providerserver.NewProviderServer(anTestProvider),
638636
},
639637
Steps: []r.TestStep{
640638
{
@@ -670,10 +668,8 @@ func TestExpectKnownValue_CheckState_ListNestedBlockPartial(t *testing.T) {
670668
t.Parallel()
671669

672670
r.Test(t, r.TestCase{
673-
ProviderFactories: map[string]func() (*schema.Provider, error){
674-
"test": func() (*schema.Provider, error) { //nolint:unparam // required signature
675-
return testProvider(), nil
676-
},
671+
ProtoV6ProviderFactories: map[string]func() (tfprotov6.ProviderServer, error){
672+
"test": providerserver.NewProviderServer(anTestProvider),
677673
},
678674
Steps: []r.TestStep{
679675
{
@@ -706,10 +702,8 @@ func TestExpectKnownValue_CheckState_ListNestedBlockElements(t *testing.T) {
706702
t.Parallel()
707703

708704
r.Test(t, r.TestCase{
709-
ProviderFactories: map[string]func() (*schema.Provider, error){
710-
"test": func() (*schema.Provider, error) { //nolint:unparam // required signature
711-
return testProvider(), nil
712-
},
705+
ProtoV6ProviderFactories: map[string]func() (tfprotov6.ProviderServer, error){
706+
"test": providerserver.NewProviderServer(anTestProvider),
713707
},
714708
Steps: []r.TestStep{
715709
{

statecheck/test_provider_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,21 @@ var anTestProvider = testprovider.Provider{
4848
Optional: true,
4949
},
5050
},
51+
BlockTypes: []*tfprotov6.SchemaNestedBlock{
52+
{
53+
TypeName: "list_nested_block",
54+
Nesting: 2,
55+
Block: &tfprotov6.SchemaBlock{
56+
Attributes: []*tfprotov6.SchemaAttribute{
57+
{
58+
Name: "list_nested_block_attribute",
59+
Type: tftypes.String,
60+
Optional: true,
61+
},
62+
},
63+
},
64+
},
65+
},
5166
},
5267
},
5368
},

0 commit comments

Comments
 (0)