// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "time" mock "github.com/stretchr/testify/mock" "github.com/vmware-tanzu/velero/pkg/exposer" "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/client" ) // NewMockPodVolumeExposer creates a new instance of MockPodVolumeExposer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewMockPodVolumeExposer(t interface { mock.TestingT Cleanup(func()) }) *MockPodVolumeExposer { mock := &MockPodVolumeExposer{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockPodVolumeExposer is an autogenerated mock type for the PodVolumeExposer type type MockPodVolumeExposer struct { mock.Mock } type MockPodVolumeExposer_Expecter struct { mock *mock.Mock } func (_m *MockPodVolumeExposer) EXPECT() *MockPodVolumeExposer_Expecter { return &MockPodVolumeExposer_Expecter{mock: &_m.Mock} } // CleanUp provides a mock function for the type MockPodVolumeExposer func (_mock *MockPodVolumeExposer) CleanUp(context1 context.Context, objectReference v1.ObjectReference) { _mock.Called(context1, objectReference) return } // MockPodVolumeExposer_CleanUp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CleanUp' type MockPodVolumeExposer_CleanUp_Call struct { *mock.Call } // CleanUp is a helper method to define mock.On call // - context1 context.Context // - objectReference v1.ObjectReference func (_e *MockPodVolumeExposer_Expecter) CleanUp(context1 interface{}, objectReference interface{}) *MockPodVolumeExposer_CleanUp_Call { return &MockPodVolumeExposer_CleanUp_Call{Call: _e.mock.On("CleanUp", context1, objectReference)} } func (_c *MockPodVolumeExposer_CleanUp_Call) Run(run func(context1 context.Context, objectReference v1.ObjectReference)) *MockPodVolumeExposer_CleanUp_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 v1.ObjectReference if args[1] != nil { arg1 = args[1].(v1.ObjectReference) } run( arg0, arg1, ) }) return _c } func (_c *MockPodVolumeExposer_CleanUp_Call) Return() *MockPodVolumeExposer_CleanUp_Call { _c.Call.Return() return _c } func (_c *MockPodVolumeExposer_CleanUp_Call) RunAndReturn(run func(context1 context.Context, objectReference v1.ObjectReference)) *MockPodVolumeExposer_CleanUp_Call { _c.Run(run) return _c } // DiagnoseExpose provides a mock function for the type MockPodVolumeExposer func (_mock *MockPodVolumeExposer) DiagnoseExpose(context1 context.Context, objectReference v1.ObjectReference) string { ret := _mock.Called(context1, objectReference) if len(ret) == 0 { panic("no return value specified for DiagnoseExpose") } var r0 string if returnFunc, ok := ret.Get(0).(func(context.Context, v1.ObjectReference) string); ok { r0 = returnFunc(context1, objectReference) } else { r0 = ret.Get(0).(string) } return r0 } // MockPodVolumeExposer_DiagnoseExpose_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DiagnoseExpose' type MockPodVolumeExposer_DiagnoseExpose_Call struct { *mock.Call } // DiagnoseExpose is a helper method to define mock.On call // - context1 context.Context // - objectReference v1.ObjectReference func (_e *MockPodVolumeExposer_Expecter) DiagnoseExpose(context1 interface{}, objectReference interface{}) *MockPodVolumeExposer_DiagnoseExpose_Call { return &MockPodVolumeExposer_DiagnoseExpose_Call{Call: _e.mock.On("DiagnoseExpose", context1, objectReference)} } func (_c *MockPodVolumeExposer_DiagnoseExpose_Call) Run(run func(context1 context.Context, objectReference v1.ObjectReference)) *MockPodVolumeExposer_DiagnoseExpose_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 v1.ObjectReference if args[1] != nil { arg1 = args[1].(v1.ObjectReference) } run( arg0, arg1, ) }) return _c } func (_c *MockPodVolumeExposer_DiagnoseExpose_Call) Return(s string) *MockPodVolumeExposer_DiagnoseExpose_Call { _c.Call.Return(s) return _c } func (_c *MockPodVolumeExposer_DiagnoseExpose_Call) RunAndReturn(run func(context1 context.Context, objectReference v1.ObjectReference) string) *MockPodVolumeExposer_DiagnoseExpose_Call { _c.Call.Return(run) return _c } // Expose provides a mock function for the type MockPodVolumeExposer func (_mock *MockPodVolumeExposer) Expose(context1 context.Context, objectReference v1.ObjectReference, podVolumeExposeParam exposer.PodVolumeExposeParam) error { ret := _mock.Called(context1, objectReference, podVolumeExposeParam) if len(ret) == 0 { panic("no return value specified for Expose") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, v1.ObjectReference, exposer.PodVolumeExposeParam) error); ok { r0 = returnFunc(context1, objectReference, podVolumeExposeParam) } else { r0 = ret.Error(0) } return r0 } // MockPodVolumeExposer_Expose_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Expose' type MockPodVolumeExposer_Expose_Call struct { *mock.Call } // Expose is a helper method to define mock.On call // - context1 context.Context // - objectReference v1.ObjectReference // - podVolumeExposeParam exposer.PodVolumeExposeParam func (_e *MockPodVolumeExposer_Expecter) Expose(context1 interface{}, objectReference interface{}, podVolumeExposeParam interface{}) *MockPodVolumeExposer_Expose_Call { return &MockPodVolumeExposer_Expose_Call{Call: _e.mock.On("Expose", context1, objectReference, podVolumeExposeParam)} } func (_c *MockPodVolumeExposer_Expose_Call) Run(run func(context1 context.Context, objectReference v1.ObjectReference, podVolumeExposeParam exposer.PodVolumeExposeParam)) *MockPodVolumeExposer_Expose_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 v1.ObjectReference if args[1] != nil { arg1 = args[1].(v1.ObjectReference) } var arg2 exposer.PodVolumeExposeParam if args[2] != nil { arg2 = args[2].(exposer.PodVolumeExposeParam) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockPodVolumeExposer_Expose_Call) Return(err error) *MockPodVolumeExposer_Expose_Call { _c.Call.Return(err) return _c } func (_c *MockPodVolumeExposer_Expose_Call) RunAndReturn(run func(context1 context.Context, objectReference v1.ObjectReference, podVolumeExposeParam exposer.PodVolumeExposeParam) error) *MockPodVolumeExposer_Expose_Call { _c.Call.Return(run) return _c } // GetExposed provides a mock function for the type MockPodVolumeExposer func (_mock *MockPodVolumeExposer) GetExposed(context1 context.Context, objectReference v1.ObjectReference, client1 client.Client, s string, duration time.Duration) (*exposer.ExposeResult, error) { ret := _mock.Called(context1, objectReference, client1, s, duration) if len(ret) == 0 { panic("no return value specified for GetExposed") } var r0 *exposer.ExposeResult var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, v1.ObjectReference, client.Client, string, time.Duration) (*exposer.ExposeResult, error)); ok { return returnFunc(context1, objectReference, client1, s, duration) } if returnFunc, ok := ret.Get(0).(func(context.Context, v1.ObjectReference, client.Client, string, time.Duration) *exposer.ExposeResult); ok { r0 = returnFunc(context1, objectReference, client1, s, duration) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*exposer.ExposeResult) } } if returnFunc, ok := ret.Get(1).(func(context.Context, v1.ObjectReference, client.Client, string, time.Duration) error); ok { r1 = returnFunc(context1, objectReference, client1, s, duration) } else { r1 = ret.Error(1) } return r0, r1 } // MockPodVolumeExposer_GetExposed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExposed' type MockPodVolumeExposer_GetExposed_Call struct { *mock.Call } // GetExposed is a helper method to define mock.On call // - context1 context.Context // - objectReference v1.ObjectReference // - client1 client.Client // - s string // - duration time.Duration func (_e *MockPodVolumeExposer_Expecter) GetExposed(context1 interface{}, objectReference interface{}, client1 interface{}, s interface{}, duration interface{}) *MockPodVolumeExposer_GetExposed_Call { return &MockPodVolumeExposer_GetExposed_Call{Call: _e.mock.On("GetExposed", context1, objectReference, client1, s, duration)} } func (_c *MockPodVolumeExposer_GetExposed_Call) Run(run func(context1 context.Context, objectReference v1.ObjectReference, client1 client.Client, s string, duration time.Duration)) *MockPodVolumeExposer_GetExposed_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 v1.ObjectReference if args[1] != nil { arg1 = args[1].(v1.ObjectReference) } var arg2 client.Client if args[2] != nil { arg2 = args[2].(client.Client) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 time.Duration if args[4] != nil { arg4 = args[4].(time.Duration) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *MockPodVolumeExposer_GetExposed_Call) Return(exposeResult *exposer.ExposeResult, err error) *MockPodVolumeExposer_GetExposed_Call { _c.Call.Return(exposeResult, err) return _c } func (_c *MockPodVolumeExposer_GetExposed_Call) RunAndReturn(run func(context1 context.Context, objectReference v1.ObjectReference, client1 client.Client, s string, duration time.Duration) (*exposer.ExposeResult, error)) *MockPodVolumeExposer_GetExposed_Call { _c.Call.Return(run) return _c } // PeekExposed provides a mock function for the type MockPodVolumeExposer func (_mock *MockPodVolumeExposer) PeekExposed(context1 context.Context, objectReference v1.ObjectReference) error { ret := _mock.Called(context1, objectReference) if len(ret) == 0 { panic("no return value specified for PeekExposed") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, v1.ObjectReference) error); ok { r0 = returnFunc(context1, objectReference) } else { r0 = ret.Error(0) } return r0 } // MockPodVolumeExposer_PeekExposed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PeekExposed' type MockPodVolumeExposer_PeekExposed_Call struct { *mock.Call } // PeekExposed is a helper method to define mock.On call // - context1 context.Context // - objectReference v1.ObjectReference func (_e *MockPodVolumeExposer_Expecter) PeekExposed(context1 interface{}, objectReference interface{}) *MockPodVolumeExposer_PeekExposed_Call { return &MockPodVolumeExposer_PeekExposed_Call{Call: _e.mock.On("PeekExposed", context1, objectReference)} } func (_c *MockPodVolumeExposer_PeekExposed_Call) Run(run func(context1 context.Context, objectReference v1.ObjectReference)) *MockPodVolumeExposer_PeekExposed_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 v1.ObjectReference if args[1] != nil { arg1 = args[1].(v1.ObjectReference) } run( arg0, arg1, ) }) return _c } func (_c *MockPodVolumeExposer_PeekExposed_Call) Return(err error) *MockPodVolumeExposer_PeekExposed_Call { _c.Call.Return(err) return _c } func (_c *MockPodVolumeExposer_PeekExposed_Call) RunAndReturn(run func(context1 context.Context, objectReference v1.ObjectReference) error) *MockPodVolumeExposer_PeekExposed_Call { _c.Call.Return(run) return _c }