diff --git a/pkg/stanza/operator/config.go b/pkg/stanza/operator/config.go index d2067f039d48..0adbce22e15c 100644 --- a/pkg/stanza/operator/config.go +++ b/pkg/stanza/operator/config.go @@ -14,8 +14,6 @@ package operator // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" -//go:generate mockery --name=Builder --output=../testutil --outpkg=testutil --filename=operator_builder.go --structname=OperatorBuilder - import ( "encoding/json" "fmt" diff --git a/pkg/stanza/operator/operator.go b/pkg/stanza/operator/operator.go index 613c891ce51a..cf5a309e4557 100644 --- a/pkg/stanza/operator/operator.go +++ b/pkg/stanza/operator/operator.go @@ -14,8 +14,6 @@ package operator // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" -//go:generate mockery --name=^(Operator)$ --output=../testutil --outpkg=testutil --case=snake - import ( "context" diff --git a/pkg/stanza/pipeline/pipeline.go b/pkg/stanza/pipeline/pipeline.go index 079798b6167a..d5f2b68c1f8f 100644 --- a/pkg/stanza/pipeline/pipeline.go +++ b/pkg/stanza/pipeline/pipeline.go @@ -14,8 +14,6 @@ package pipeline // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/pipeline" -//go:generate mockery --name=^(Pipeline)$ --output=../testutil --outpkg=testutil --case=snake - import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" ) diff --git a/pkg/stanza/testutil/mocks.go b/pkg/stanza/testutil/mocks.go index a8d988ae278c..34ad91bd705d 100644 --- a/pkg/stanza/testutil/mocks.go +++ b/pkg/stanza/testutil/mocks.go @@ -20,10 +20,10 @@ import ( "time" "github.com/stretchr/testify/require" - zap "go.uber.org/zap" + "go.uber.org/zap" "go.uber.org/zap/zaptest" - entry "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" ) diff --git a/pkg/stanza/testutil/operator_builder.go b/pkg/stanza/testutil/operator_builder.go deleted file mode 100644 index a20fde800091..000000000000 --- a/pkg/stanza/testutil/operator_builder.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by mockery v1.0.0. DO NOT EDIT. - -package testutil - -import ( - operator "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - mock "github.com/stretchr/testify/mock" - zap "go.uber.org/zap" -) - -// OperatorBuilder is an autogenerated mock type for the Builder type -type OperatorBuilder struct { - mock.Mock -} - -// Build provides a mock function with given fields: _a0 -func (_m *OperatorBuilder) Build(_a0 *zap.SugaredLogger) (operator.Operator, error) { - ret := _m.Called(_a0) - - var r0 operator.Operator - if rf, ok := ret.Get(0).(func(*zap.SugaredLogger) operator.Operator); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(operator.Operator) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(*zap.SugaredLogger) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ID provides a mock function with given fields: -func (_m *OperatorBuilder) ID() string { - ret := _m.Called() - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// SetID provides a mock function with given fields: _a0 -func (_m *OperatorBuilder) SetID(_a0 string) { - _m.Called(_a0) -} - -// Type provides a mock function with given fields: -func (_m *OperatorBuilder) Type() string { - ret := _m.Called() - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} diff --git a/pkg/stanza/testutil/pipeline.go b/pkg/stanza/testutil/pipeline.go deleted file mode 100644 index 27ab1a2da15c..000000000000 --- a/pkg/stanza/testutil/pipeline.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by mockery v1.0.0. DO NOT EDIT. - -package testutil - -import ( - operator "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - mock "github.com/stretchr/testify/mock" -) - -// Pipeline is an autogenerated mock type for the Pipeline type -type Pipeline struct { - mock.Mock -} - -// Operators provides a mock function with given fields: -func (_m *Pipeline) Operators() []operator.Operator { - ret := _m.Called() - - var r0 []operator.Operator - if rf, ok := ret.Get(0).(func() []operator.Operator); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]operator.Operator) - } - } - - return r0 -} - -// Render provides a mock function with given fields: -func (_m *Pipeline) Render() ([]byte, error) { - ret := _m.Called() - - var r0 []byte - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Start provides a mock function with given fields: persister -func (_m *Pipeline) Start(persister operator.Persister) error { - ret := _m.Called(persister) - - var r0 error - if rf, ok := ret.Get(0).(func(operator.Persister) error); ok { - r0 = rf(persister) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Stop provides a mock function with given fields: -func (_m *Pipeline) Stop() error { - ret := _m.Called() - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -}