Skip to content

Commit

Permalink
Merge pull request #2 from matthewhartstonge/dependabot/go_modules/gi…
Browse files Browse the repository at this point in the history
…thub.com/hashicorp/terraform-plugin-framework-0.14.0

chore(deps): bump github.com/hashicorp/terraform-plugin-framework from 0.13.0 to 0.14.0
  • Loading branch information
matthewhartstonge committed Oct 5, 2022
2 parents 72743a5 + ef1fcf5 commit 77ec783
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -5,7 +5,7 @@ go 1.18
require (
github.com/google/go-cmp v0.5.9
github.com/google/uuid v1.3.0
github.com/hashicorp/terraform-plugin-framework v0.13.0
github.com/hashicorp/terraform-plugin-framework v0.14.0
github.com/hashicorp/terraform-plugin-go v0.14.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -9,8 +9,8 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hashicorp/terraform-plugin-framework v0.13.0 h1:tGnqttzZwU3FKc+HasHr2Yi5L81FcQbdc8zQhbBD9jQ=
github.com/hashicorp/terraform-plugin-framework v0.13.0/go.mod h1:wcZdk4+Uef6Ng+BiBJjGAcIPlIs5bhlEV/TA1k6Xkq8=
github.com/hashicorp/terraform-plugin-framework v0.14.0 h1:Mwj55u+Jc/QGM6fLBPCe1P+ZF3cuYs6wbCdB15lx/Dg=
github.com/hashicorp/terraform-plugin-framework v0.14.0/go.mod h1:wcZdk4+Uef6Ng+BiBJjGAcIPlIs5bhlEV/TA1k6Xkq8=
github.com/hashicorp/terraform-plugin-go v0.14.0 h1:ttnSlS8bz3ZPYbMb84DpcPhY4F5DsQtcAS7cHo8uvP4=
github.com/hashicorp/terraform-plugin-go v0.14.0/go.mod h1:2nNCBeRLaenyQEi78xrGrs9hMbulveqG/zDMQSvVJTE=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
Expand Down
5 changes: 5 additions & 0 deletions uuidtypes/uuid_type.go
Expand Up @@ -110,3 +110,8 @@ func (u UUIDType) ValueFromTerraform(_ context.Context, value tftypes.Value) (at

return UUIDFromGoogleUUID(parsedUUID), nil
}

// ValueType returns attr.Value type returned by ValueFromTerraform.
func (u UUIDType) ValueType(context.Context) attr.Value {
return UUID{}
}
34 changes: 34 additions & 0 deletions uuidtypes/uuid_type_test.go
Expand Up @@ -412,3 +412,37 @@ func TestType_ValueFromTerraform(t *testing.T) {
})
}
}

func TestUUIDType_ValueType(t *testing.T) {
t.Parallel()

tests := []struct {
name string
value uuidtypes.UUIDType
expected attr.Value
}{
{
name: "always",
value: uuidtypes.UUIDType{},
expected: uuidtypes.UUID{},
},
}
for _, testcase := range tests {
testcase := testcase

t.Run(testcase.name, func(t *testing.T) {
t.Parallel()

got := testcase.value.ValueType(context.Background())

if diff := cmp.Diff(got, testcase.expected); diff != "" {
t.Errorf(
"Type()\ngot : %v\nexpected: %v\ndiff: %v\n",
got,
testcase.expected,
diff,
)
}
})
}
}

0 comments on commit 77ec783

Please sign in to comment.