1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 "github.com/bnema/gordon/internal/adapters/dto"
11 mock "github.com/stretchr/testify/mock"
12)
13
14// 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.
15// The first argument is typically a *testing.T value.
16func NewMockvolumesClient(t interface {
17 mock.TestingT
18 Cleanup(func())
19}) *MockvolumesClient {
20 if helper, ok := t.(interface{ Helper() }); ok {
21 helper.Helper()
22 }
23
24 mock := &MockvolumesClient{}
25 mock.Mock.Test(t)
26
27 t.Cleanup(func() {
28 if helper, ok := t.(interface{ Helper() }); ok {
29 helper.Helper()
30 }
31 mock.AssertExpectations(t)
32 })
33
34 return mock
35}
36
37// MockvolumesClient is an autogenerated mock type for the volumesClient type
38type MockvolumesClient struct {
39 mock.Mock
40}
41
42type MockvolumesClient_Expecter struct {
43 mock *mock.Mock
44}
45
46func (_m *MockvolumesClient) EXPECT() *MockvolumesClient_Expecter {
47 return &MockvolumesClient_Expecter{mock: &_m.Mock}
48}
49
50// ListVolumes provides a mock function for the type MockvolumesClient
51func (_mock *MockvolumesClient) ListVolumes(ctx context.Context) ([]dto.Volume, error) {
52 ret := _mock.Called(ctx)
53
54 if len(ret) == 0 {
55 panic("no return value specified for ListVolumes")
56 }
57
58 var r0 []dto.Volume
59 var r1 error
60 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]dto.Volume, error)); ok {
61 return returnFunc(ctx)
62 }
63 if returnFunc, ok := ret.Get(0).(func(context.Context) []dto.Volume); ok {
64 r0 = returnFunc(ctx)
65 } else {
66 if ret.Get(0) != nil {
67 r0 = ret.Get(0).([]dto.Volume)
68 }
69 }
70 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
71 r1 = returnFunc(ctx)
72 } else {
73 r1 = ret.Error(1)
74 }
75 return r0, r1
76}
77
78// MockvolumesClient_ListVolumes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListVolumes'
79type MockvolumesClient_ListVolumes_Call struct {
80 *mock.Call
81}
82
83// ListVolumes is a helper method to define mock.On call
84// - ctx context.Context
85func (_e *MockvolumesClient_Expecter) ListVolumes(ctx any) *MockvolumesClient_ListVolumes_Call {
86 return &MockvolumesClient_ListVolumes_Call{Call: _e.mock.On("ListVolumes", ctx)}
87}
88
89func (_c *MockvolumesClient_ListVolumes_Call) Run(run func(ctx context.Context)) *MockvolumesClient_ListVolumes_Call {
90 _c.Call.Run(func(args mock.Arguments) {
91 var arg0 context.Context
92 if args[0] != nil {
93 arg0 = args[0].(context.Context)
94 }
95 run(
96 arg0,
97 )
98 })
99 return _c
100}
101
102func (_c *MockvolumesClient_ListVolumes_Call) Return(volumes []dto.Volume, err error) *MockvolumesClient_ListVolumes_Call {
103 _c.Call.Return(volumes, err)
104 return _c
105}
106
107func (_c *MockvolumesClient_ListVolumes_Call) RunAndReturn(run func(ctx context.Context) ([]dto.Volume, error)) *MockvolumesClient_ListVolumes_Call {
108 _c.Call.Return(run)
109 return _c
110}
111
112// PruneVolumes provides a mock function for the type MockvolumesClient
113func (_mock *MockvolumesClient) PruneVolumes(ctx context.Context, req dto.VolumePruneRequest) (*dto.VolumePruneResponse, error) {
114 ret := _mock.Called(ctx, req)
115
116 if len(ret) == 0 {
117 panic("no return value specified for PruneVolumes")
118 }
119
120 var r0 *dto.VolumePruneResponse
121 var r1 error
122 if returnFunc, ok := ret.Get(0).(func(context.Context, dto.VolumePruneRequest) (*dto.VolumePruneResponse, error)); ok {
123 return returnFunc(ctx, req)
124 }
125 if returnFunc, ok := ret.Get(0).(func(context.Context, dto.VolumePruneRequest) *dto.VolumePruneResponse); ok {
126 r0 = returnFunc(ctx, req)
127 } else {
128 if ret.Get(0) != nil {
129 r0 = ret.Get(0).(*dto.VolumePruneResponse)
130 }
131 }
132 if returnFunc, ok := ret.Get(1).(func(context.Context, dto.VolumePruneRequest) error); ok {
133 r1 = returnFunc(ctx, req)
134 } else {
135 r1 = ret.Error(1)
136 }
137 return r0, r1
138}
139
140// MockvolumesClient_PruneVolumes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PruneVolumes'
141type MockvolumesClient_PruneVolumes_Call struct {
142 *mock.Call
143}
144
145// PruneVolumes is a helper method to define mock.On call
146// - ctx context.Context
147// - req dto.VolumePruneRequest
148func (_e *MockvolumesClient_Expecter) PruneVolumes(ctx any, req any) *MockvolumesClient_PruneVolumes_Call {
149 return &MockvolumesClient_PruneVolumes_Call{Call: _e.mock.On("PruneVolumes", ctx, req)}
150}
151
152func (_c *MockvolumesClient_PruneVolumes_Call) Run(run func(ctx context.Context, req dto.VolumePruneRequest)) *MockvolumesClient_PruneVolumes_Call {
153 _c.Call.Run(func(args mock.Arguments) {
154 var arg0 context.Context
155 if args[0] != nil {
156 arg0 = args[0].(context.Context)
157 }
158 var arg1 dto.VolumePruneRequest
159 if args[1] != nil {
160 arg1 = args[1].(dto.VolumePruneRequest)
161 }
162 run(
163 arg0,
164 arg1,
165 )
166 })
167 return _c
168}
169
170func (_c *MockvolumesClient_PruneVolumes_Call) Return(volumePruneResponse *dto.VolumePruneResponse, err error) *MockvolumesClient_PruneVolumes_Call {
171 _c.Call.Return(volumePruneResponse, err)
172 return _c
173}
174
175func (_c *MockvolumesClient_PruneVolumes_Call) RunAndReturn(run func(ctx context.Context, req dto.VolumePruneRequest) (*dto.VolumePruneResponse, error)) *MockvolumesClient_PruneVolumes_Call {
176 _c.Call.Return(run)
177 return _c
178}