File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 6
6
"time"
7
7
8
8
"github.com/google/go-cmp/cmp"
9
+ "github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes"
9
10
"github.com/hashicorp/terraform-plugin-framework/attr"
10
11
"github.com/hashicorp/terraform-plugin-framework/diag"
11
12
"github.com/hashicorp/terraform-plugin-framework/types"
@@ -58,22 +59,22 @@ func TestFromDurationP(t *testing.T) {
58
59
tests := []struct {
59
60
name string
60
61
input * durationpb.Duration
61
- expected types. String
62
+ expected timetypes. GoDuration
62
63
}{
63
64
{
64
65
name : "nil duration" ,
65
66
input : nil ,
66
- expected : types . StringNull (),
67
+ expected : timetypes . NewGoDurationNull (),
67
68
},
68
69
{
69
70
name : "zero duration" ,
70
71
input : durationpb .New (0 ),
71
- expected : types . StringValue ("0s" ),
72
+ expected : timetypes . NewGoDurationValueFromStringMust ("0s" ),
72
73
},
73
74
{
74
75
name : "normal duration" ,
75
76
input : durationpb .New (time .Hour + time .Minute ),
76
- expected : types . StringValue ("1h1m0s" ),
77
+ expected : timetypes . NewGoDurationValueFromStringMust ("1h1m0s" ),
77
78
},
78
79
}
79
80
You can’t perform that action at this time.
0 commit comments