Skip to content

Commit 5941ec2

Browse files
committed
fix tests
1 parent f86526f commit 5941ec2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

internal/provider/convert_test.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"time"
77

88
"github.com/google/go-cmp/cmp"
9+
"github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes"
910
"github.com/hashicorp/terraform-plugin-framework/attr"
1011
"github.com/hashicorp/terraform-plugin-framework/diag"
1112
"github.com/hashicorp/terraform-plugin-framework/types"
@@ -58,22 +59,22 @@ func TestFromDurationP(t *testing.T) {
5859
tests := []struct {
5960
name string
6061
input *durationpb.Duration
61-
expected types.String
62+
expected timetypes.GoDuration
6263
}{
6364
{
6465
name: "nil duration",
6566
input: nil,
66-
expected: types.StringNull(),
67+
expected: timetypes.NewGoDurationNull(),
6768
},
6869
{
6970
name: "zero duration",
7071
input: durationpb.New(0),
71-
expected: types.StringValue("0s"),
72+
expected: timetypes.NewGoDurationValueFromStringMust("0s"),
7273
},
7374
{
7475
name: "normal duration",
7576
input: durationpb.New(time.Hour + time.Minute),
76-
expected: types.StringValue("1h1m0s"),
77+
expected: timetypes.NewGoDurationValueFromStringMust("1h1m0s"),
7778
},
7879
}
7980

0 commit comments

Comments
 (0)