diff --git a/CHANGELOG.md b/CHANGELOG.md index 242f95a1f3..6d9bfe57b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.12.7](https://github.com/cloudquery/plugin-sdk/compare/v1.12.6...v1.12.7) (2022-12-19) + + +### Bug Fixes + +* **destination:** Rename `NewDestinationPlugin` to `NewPlugin` ([#519](https://github.com/cloudquery/plugin-sdk/issues/519)) ([3934775](https://github.com/cloudquery/plugin-sdk/commit/39347757ba443e93ab36de86c8672223f9554145)) + ## [1.12.6](https://github.com/cloudquery/plugin-sdk/compare/v1.12.5...v1.12.6) (2022-12-18) diff --git a/plugins/destination/plugin.go b/plugins/destination/plugin.go index 697be753f6..970ebf623a 100644 --- a/plugins/destination/plugin.go +++ b/plugins/destination/plugin.go @@ -46,7 +46,7 @@ type Plugin struct { const writeWorkers = 1 -func NewDestinationPlugin(name string, version string, newDestinationClient NewClientFunc) *Plugin { +func NewPlugin(name string, version string, newDestinationClient NewClientFunc) *Plugin { p := &Plugin{ name: name, version: version, diff --git a/plugins/destination/plugin_test.go b/plugins/destination/plugin_test.go index 219da4410c..7feba261f5 100644 --- a/plugins/destination/plugin_test.go +++ b/plugins/destination/plugin_test.go @@ -11,14 +11,14 @@ import ( ) func TestPlugin(t *testing.T) { - p := NewDestinationPlugin("test", "development", NewTestDestinationMemDBClient) + p := NewPlugin("test", "development", NewTestDestinationMemDBClient) PluginTestSuiteRunner(t, p, nil, TestSuiteTests{}) } func TestOnNewError(t *testing.T) { ctx := context.Background() - p := NewDestinationPlugin("test", "development", newTestDestinationMemDBClientErrOnNew) + p := NewPlugin("test", "development", newTestDestinationMemDBClientErrOnNew) err := p.Init(ctx, getTestLogger(t), specs.Destination{}) if err == nil { @@ -29,7 +29,7 @@ func TestOnNewError(t *testing.T) { func TestOnWriteError(t *testing.T) { ctx := context.Background() newClientFunc := getNewTestDestinationMemDBClient(withErrOnWrite()) - p := NewDestinationPlugin("test", "development", newClientFunc) + p := NewPlugin("test", "development", newClientFunc) if err := p.Init(ctx, getTestLogger(t), specs.Destination{}); err != nil { t.Fatal(err) } @@ -56,7 +56,7 @@ func TestOnWriteError(t *testing.T) { func TestOnWriteCtxCancelled(t *testing.T) { ctx := context.Background() newClientFunc := getNewTestDestinationMemDBClient(withBlockingWrite()) - p := NewDestinationPlugin("test", "development", newClientFunc) + p := NewPlugin("test", "development", newClientFunc) if err := p.Init(ctx, getTestLogger(t), specs.Destination{}); err != nil { t.Fatal(err) } diff --git a/serve/destination_test.go b/serve/destination_test.go index 23c1200215..3594d15632 100644 --- a/serve/destination_test.go +++ b/serve/destination_test.go @@ -24,7 +24,7 @@ func bufDestinationDialer(context.Context, string) (net.Conn, error) { } func TestDestination(t *testing.T) { - plugin := destination.NewDestinationPlugin("testDestinationPlugin", "development", destination.NewTestDestinationMemDBClient) + plugin := destination.NewPlugin("testDestinationPlugin", "development", destination.NewTestDestinationMemDBClient) s := &destinationServe{ plugin: plugin, }