From fb77fe50132ed21ae13b5145f4713b92fc6fc06a Mon Sep 17 00:00:00 2001 From: Daniel Mikusa Date: Wed, 12 Apr 2023 09:00:51 -0400 Subject: [PATCH] Regenerate mocks with latest version of `mockery` Signed-off-by: Daniel Mikusa --- mocks/builder.go | 25 +++++++++++++++++++++---- mocks/detector.go | 25 +++++++++++++++++++++---- mocks/environment_writer.go | 17 ++++++++++++++++- mocks/exec_d.go | 22 ++++++++++++++++++++-- mocks/exec_d_writer.go | 17 ++++++++++++++++- mocks/exit_handler.go | 17 ++++++++++++++++- mocks/layer_contributor.go | 25 +++++++++++++++++++++---- mocks/toml_writer.go | 17 ++++++++++++++++- 8 files changed, 147 insertions(+), 18 deletions(-) diff --git a/mocks/builder.go b/mocks/builder.go index 44ea7a7..7e23f8d 100644 --- a/mocks/builder.go +++ b/mocks/builder.go @@ -1,11 +1,10 @@ -// Code generated by mockery 2.9.4. DO NOT EDIT. +// Code generated by mockery v2.24.0. DO NOT EDIT. package mocks import ( - mock "github.com/stretchr/testify/mock" - libcnb "github.com/buildpacks/libcnb" + mock "github.com/stretchr/testify/mock" ) // Builder is an autogenerated mock type for the Builder type @@ -18,13 +17,16 @@ func (_m *Builder) Build(context libcnb.BuildContext) (libcnb.BuildResult, error ret := _m.Called(context) var r0 libcnb.BuildResult + var r1 error + if rf, ok := ret.Get(0).(func(libcnb.BuildContext) (libcnb.BuildResult, error)); ok { + return rf(context) + } if rf, ok := ret.Get(0).(func(libcnb.BuildContext) libcnb.BuildResult); ok { r0 = rf(context) } else { r0 = ret.Get(0).(libcnb.BuildResult) } - var r1 error if rf, ok := ret.Get(1).(func(libcnb.BuildContext) error); ok { r1 = rf(context) } else { @@ -33,3 +35,18 @@ func (_m *Builder) Build(context libcnb.BuildContext) (libcnb.BuildResult, error return r0, r1 } + +type mockConstructorTestingTNewBuilder interface { + mock.TestingT + Cleanup(func()) +} + +// NewBuilder creates a new instance of Builder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewBuilder(t mockConstructorTestingTNewBuilder) *Builder { + mock := &Builder{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mocks/detector.go b/mocks/detector.go index 8d3174f..6a1e965 100644 --- a/mocks/detector.go +++ b/mocks/detector.go @@ -1,11 +1,10 @@ -// Code generated by mockery 2.9.4. DO NOT EDIT. +// Code generated by mockery v2.24.0. DO NOT EDIT. package mocks import ( - mock "github.com/stretchr/testify/mock" - libcnb "github.com/buildpacks/libcnb" + mock "github.com/stretchr/testify/mock" ) // Detector is an autogenerated mock type for the Detector type @@ -18,13 +17,16 @@ func (_m *Detector) Detect(context libcnb.DetectContext) (libcnb.DetectResult, e ret := _m.Called(context) var r0 libcnb.DetectResult + var r1 error + if rf, ok := ret.Get(0).(func(libcnb.DetectContext) (libcnb.DetectResult, error)); ok { + return rf(context) + } if rf, ok := ret.Get(0).(func(libcnb.DetectContext) libcnb.DetectResult); ok { r0 = rf(context) } else { r0 = ret.Get(0).(libcnb.DetectResult) } - var r1 error if rf, ok := ret.Get(1).(func(libcnb.DetectContext) error); ok { r1 = rf(context) } else { @@ -33,3 +35,18 @@ func (_m *Detector) Detect(context libcnb.DetectContext) (libcnb.DetectResult, e return r0, r1 } + +type mockConstructorTestingTNewDetector interface { + mock.TestingT + Cleanup(func()) +} + +// NewDetector creates a new instance of Detector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewDetector(t mockConstructorTestingTNewDetector) *Detector { + mock := &Detector{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mocks/environment_writer.go b/mocks/environment_writer.go index 3e24d95..ba9269d 100644 --- a/mocks/environment_writer.go +++ b/mocks/environment_writer.go @@ -1,4 +1,4 @@ -// Code generated by mockery 2.9.4. DO NOT EDIT. +// Code generated by mockery v2.24.0. DO NOT EDIT. package mocks @@ -22,3 +22,18 @@ func (_m *EnvironmentWriter) Write(dir string, environment map[string]string) er return r0 } + +type mockConstructorTestingTNewEnvironmentWriter interface { + mock.TestingT + Cleanup(func()) +} + +// NewEnvironmentWriter creates a new instance of EnvironmentWriter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewEnvironmentWriter(t mockConstructorTestingTNewEnvironmentWriter) *EnvironmentWriter { + mock := &EnvironmentWriter{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mocks/exec_d.go b/mocks/exec_d.go index 7d8075e..8988f11 100644 --- a/mocks/exec_d.go +++ b/mocks/exec_d.go @@ -1,4 +1,4 @@ -// Code generated by mockery 2.9.4. DO NOT EDIT. +// Code generated by mockery v2.24.0. DO NOT EDIT. package mocks @@ -14,6 +14,10 @@ func (_m *ExecD) Execute() (map[string]string, error) { ret := _m.Called() var r0 map[string]string + var r1 error + if rf, ok := ret.Get(0).(func() (map[string]string, error)); ok { + return rf() + } if rf, ok := ret.Get(0).(func() map[string]string); ok { r0 = rf() } else { @@ -22,7 +26,6 @@ func (_m *ExecD) Execute() (map[string]string, error) { } } - var r1 error if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { @@ -31,3 +34,18 @@ func (_m *ExecD) Execute() (map[string]string, error) { return r0, r1 } + +type mockConstructorTestingTNewExecD interface { + mock.TestingT + Cleanup(func()) +} + +// NewExecD creates a new instance of ExecD. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewExecD(t mockConstructorTestingTNewExecD) *ExecD { + mock := &ExecD{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mocks/exec_d_writer.go b/mocks/exec_d_writer.go index 81323a9..39b9dfc 100644 --- a/mocks/exec_d_writer.go +++ b/mocks/exec_d_writer.go @@ -1,4 +1,4 @@ -// Code generated by mockery 2.9.4. DO NOT EDIT. +// Code generated by mockery v2.24.0. DO NOT EDIT. package mocks @@ -22,3 +22,18 @@ func (_m *ExecDWriter) Write(value map[string]string) error { return r0 } + +type mockConstructorTestingTNewExecDWriter interface { + mock.TestingT + Cleanup(func()) +} + +// NewExecDWriter creates a new instance of ExecDWriter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewExecDWriter(t mockConstructorTestingTNewExecDWriter) *ExecDWriter { + mock := &ExecDWriter{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mocks/exit_handler.go b/mocks/exit_handler.go index 3ac5ed5..b2e97cb 100644 --- a/mocks/exit_handler.go +++ b/mocks/exit_handler.go @@ -1,4 +1,4 @@ -// Code generated by mockery 2.9.4. DO NOT EDIT. +// Code generated by mockery v2.24.0. DO NOT EDIT. package mocks @@ -23,3 +23,18 @@ func (_m *ExitHandler) Fail() { func (_m *ExitHandler) Pass() { _m.Called() } + +type mockConstructorTestingTNewExitHandler interface { + mock.TestingT + Cleanup(func()) +} + +// NewExitHandler creates a new instance of ExitHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewExitHandler(t mockConstructorTestingTNewExitHandler) *ExitHandler { + mock := &ExitHandler{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mocks/layer_contributor.go b/mocks/layer_contributor.go index 23ef13d..e075a8c 100644 --- a/mocks/layer_contributor.go +++ b/mocks/layer_contributor.go @@ -1,11 +1,10 @@ -// Code generated by mockery 2.9.4. DO NOT EDIT. +// Code generated by mockery v2.24.0. DO NOT EDIT. package mocks import ( - mock "github.com/stretchr/testify/mock" - libcnb "github.com/buildpacks/libcnb" + mock "github.com/stretchr/testify/mock" ) // LayerContributor is an autogenerated mock type for the LayerContributor type @@ -18,13 +17,16 @@ func (_m *LayerContributor) Contribute(layer libcnb.Layer) (libcnb.Layer, error) ret := _m.Called(layer) var r0 libcnb.Layer + var r1 error + if rf, ok := ret.Get(0).(func(libcnb.Layer) (libcnb.Layer, error)); ok { + return rf(layer) + } if rf, ok := ret.Get(0).(func(libcnb.Layer) libcnb.Layer); ok { r0 = rf(layer) } else { r0 = ret.Get(0).(libcnb.Layer) } - var r1 error if rf, ok := ret.Get(1).(func(libcnb.Layer) error); ok { r1 = rf(layer) } else { @@ -47,3 +49,18 @@ func (_m *LayerContributor) Name() string { return r0 } + +type mockConstructorTestingTNewLayerContributor interface { + mock.TestingT + Cleanup(func()) +} + +// NewLayerContributor creates a new instance of LayerContributor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewLayerContributor(t mockConstructorTestingTNewLayerContributor) *LayerContributor { + mock := &LayerContributor{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mocks/toml_writer.go b/mocks/toml_writer.go index aad4357..3de0e55 100644 --- a/mocks/toml_writer.go +++ b/mocks/toml_writer.go @@ -1,4 +1,4 @@ -// Code generated by mockery 2.9.4. DO NOT EDIT. +// Code generated by mockery v2.24.0. DO NOT EDIT. package mocks @@ -22,3 +22,18 @@ func (_m *TOMLWriter) Write(path string, value interface{}) error { return r0 } + +type mockConstructorTestingTNewTOMLWriter interface { + mock.TestingT + Cleanup(func()) +} + +// NewTOMLWriter creates a new instance of TOMLWriter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewTOMLWriter(t mockConstructorTestingTNewTOMLWriter) *TOMLWriter { + mock := &TOMLWriter{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +}