// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "github.com/bnema/gordon/internal/adapters/dto" mock "github.com/stretchr/testify/mock" ) // NewMockvolumesClient creates a new instance of MockvolumesClient. 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 NewMockvolumesClient(t interface { mock.TestingT Cleanup(func()) }) *MockvolumesClient { mock := &MockvolumesClient{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockvolumesClient is an autogenerated mock type for the volumesClient type type MockvolumesClient struct { mock.Mock } type MockvolumesClient_Expecter struct { mock *mock.Mock } func (_m *MockvolumesClient) EXPECT() *MockvolumesClient_Expecter { return &MockvolumesClient_Expecter{mock: &_m.Mock} } // ListVolumes provides a mock function for the type MockvolumesClient func (_mock *MockvolumesClient) ListVolumes(ctx context.Context) ([]dto.Volume, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListVolumes") } var r0 []dto.Volume var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]dto.Volume, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []dto.Volume); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]dto.Volume) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MockvolumesClient_ListVolumes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListVolumes' type MockvolumesClient_ListVolumes_Call struct { *mock.Call } // ListVolumes is a helper method to define mock.On call // - ctx context.Context func (_e *MockvolumesClient_Expecter) ListVolumes(ctx any) *MockvolumesClient_ListVolumes_Call { return &MockvolumesClient_ListVolumes_Call{Call: _e.mock.On("ListVolumes", ctx)} } func (_c *MockvolumesClient_ListVolumes_Call) Run(run func(ctx context.Context)) *MockvolumesClient_ListVolumes_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockvolumesClient_ListVolumes_Call) Return(volumes []dto.Volume, err error) *MockvolumesClient_ListVolumes_Call { _c.Call.Return(volumes, err) return _c } func (_c *MockvolumesClient_ListVolumes_Call) RunAndReturn(run func(ctx context.Context) ([]dto.Volume, error)) *MockvolumesClient_ListVolumes_Call { _c.Call.Return(run) return _c } // PruneVolumes provides a mock function for the type MockvolumesClient func (_mock *MockvolumesClient) PruneVolumes(ctx context.Context, req dto.VolumePruneRequest) (*dto.VolumePruneResponse, error) { ret := _mock.Called(ctx, req) if len(ret) == 0 { panic("no return value specified for PruneVolumes") } var r0 *dto.VolumePruneResponse var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, dto.VolumePruneRequest) (*dto.VolumePruneResponse, error)); ok { return returnFunc(ctx, req) } if returnFunc, ok := ret.Get(0).(func(context.Context, dto.VolumePruneRequest) *dto.VolumePruneResponse); ok { r0 = returnFunc(ctx, req) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*dto.VolumePruneResponse) } } if returnFunc, ok := ret.Get(1).(func(context.Context, dto.VolumePruneRequest) error); ok { r1 = returnFunc(ctx, req) } else { r1 = ret.Error(1) } return r0, r1 } // MockvolumesClient_PruneVolumes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PruneVolumes' type MockvolumesClient_PruneVolumes_Call struct { *mock.Call } // PruneVolumes is a helper method to define mock.On call // - ctx context.Context // - req dto.VolumePruneRequest func (_e *MockvolumesClient_Expecter) PruneVolumes(ctx any, req any) *MockvolumesClient_PruneVolumes_Call { return &MockvolumesClient_PruneVolumes_Call{Call: _e.mock.On("PruneVolumes", ctx, req)} } func (_c *MockvolumesClient_PruneVolumes_Call) Run(run func(ctx context.Context, req dto.VolumePruneRequest)) *MockvolumesClient_PruneVolumes_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 dto.VolumePruneRequest if args[1] != nil { arg1 = args[1].(dto.VolumePruneRequest) } run( arg0, arg1, ) }) return _c } func (_c *MockvolumesClient_PruneVolumes_Call) Return(volumePruneResponse *dto.VolumePruneResponse, err error) *MockvolumesClient_PruneVolumes_Call { _c.Call.Return(volumePruneResponse, err) return _c } func (_c *MockvolumesClient_PruneVolumes_Call) RunAndReturn(run func(ctx context.Context, req dto.VolumePruneRequest) (*dto.VolumePruneResponse, error)) *MockvolumesClient_PruneVolumes_Call { _c.Call.Return(run) return _c }