Skip to content

Commit

Permalink
sdk: updating to handle deprecations in the plugin sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Dec 14, 2021
1 parent fb12bc0 commit 8ae537f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions internal/provider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func TestResourcesSupportCustomTimeouts(t *testing.T) {
if resource.Timeouts.Create == nil && resource.Create != nil { //nolint:staticcheck
t.Fatalf("Resource %q defines a Create method but no Create Timeout", resourceName)
}
if resource.Timeouts.Delete == nil && resource.Delete != nil {
if resource.Timeouts.Delete == nil && resource.Delete != nil { //nolint:staticcheck
t.Fatalf("Resource %q defines a Delete method but no Delete Timeout", resourceName)
}
if resource.Timeouts.Read == nil {
Expand All @@ -79,7 +79,7 @@ func TestResourcesSupportCustomTimeouts(t *testing.T) {
}

// Optional
if resource.Timeouts.Update == nil && resource.Update != nil {
if resource.Timeouts.Update == nil && resource.Update != nil { //nolint:staticcheck
t.Fatalf("Resource %q defines a Update method but no Update Timeout", resourceName)
}
})
Expand Down
4 changes: 2 additions & 2 deletions internal/sdk/plugin_sdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func TestAccPluginSDKAndDecoder(t *testing.T) {
})
return nil
},
Read: func(d *schema.ResourceData, _ interface{}) error {
Read: func(d *schema.ResourceData, _ interface{}) error { //nolint:SA1019
wrapper := ResourceMetaData{
ResourceData: d,
Logger: ConsoleLogger{},
Expand All @@ -196,7 +196,7 @@ func TestAccPluginSDKAndDecoder(t *testing.T) {

return nil
},
Delete: func(_ *schema.ResourceData, _ interface{}) error {
Delete: func(_ *schema.ResourceData, _ interface{}) error { //nolint:SA1019
return nil
},
},
Expand Down
8 changes: 4 additions & 4 deletions internal/tf/pluginsdk/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ type (
type (
// lint:ignore SA1019 SDKv2 migration - staticcheck's own linter directives are currently being ignored under golanci-lint
CreateFunc = schema.CreateFunc //nolint:staticcheck
DeleteFunc = schema.DeleteFunc
ExistsFunc = schema.ExistsFunc
ReadFunc = schema.ReadFunc
UpdateFunc = schema.UpdateFunc
DeleteFunc = schema.DeleteFunc //nolint:staticcheck
ExistsFunc = schema.ExistsFunc //nolint:staticcheck
ReadFunc = schema.ReadFunc //nolint:staticcheck
UpdateFunc = schema.UpdateFunc //nolint:staticcheck
)

0 comments on commit 8ae537f

Please sign in to comment.