-
Notifications
You must be signed in to change notification settings - Fork 415
/
aso_mock.go
386 lines (325 loc) · 14.4 KB
/
aso_mock.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by MockGen. DO NOT EDIT.
// Source: ../interfaces.go
//
// Generated by this command:
//
// mockgen -destination aso_mock.go -package mock_aso -source ../interfaces.go
//
// Package mock_aso is a generated GoMock package.
package mock_aso
import (
context "context"
reflect "reflect"
time "time"
genruntime "github.com/Azure/azure-service-operator/v2/pkg/genruntime"
gomock "go.uber.org/mock/gomock"
v1beta1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1"
azure "sigs.k8s.io/cluster-api-provider-azure/azure"
v1beta10 "sigs.k8s.io/cluster-api/api/v1beta1"
client "sigs.k8s.io/controller-runtime/pkg/client"
)
// MockReconciler is a mock of Reconciler interface.
type MockReconciler[T genruntime.MetaObject] struct {
ctrl *gomock.Controller
recorder *MockReconcilerMockRecorder[T]
}
// MockReconcilerMockRecorder is the mock recorder for MockReconciler.
type MockReconcilerMockRecorder[T genruntime.MetaObject] struct {
mock *MockReconciler[T]
}
// NewMockReconciler creates a new mock instance.
func NewMockReconciler[T genruntime.MetaObject](ctrl *gomock.Controller) *MockReconciler[T] {
mock := &MockReconciler[T]{ctrl: ctrl}
mock.recorder = &MockReconcilerMockRecorder[T]{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockReconciler[T]) EXPECT() *MockReconcilerMockRecorder[T] {
return m.recorder
}
// CreateOrUpdateResource mocks base method.
func (m *MockReconciler[T]) CreateOrUpdateResource(ctx context.Context, spec azure.ASOResourceSpecGetter[T], serviceName string) (T, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateOrUpdateResource", ctx, spec, serviceName)
ret0, _ := ret[0].(T)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateOrUpdateResource indicates an expected call of CreateOrUpdateResource.
func (mr *MockReconcilerMockRecorder[T]) CreateOrUpdateResource(ctx, spec, serviceName any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdateResource", reflect.TypeOf((*MockReconciler[T])(nil).CreateOrUpdateResource), ctx, spec, serviceName)
}
// DeleteResource mocks base method.
func (m *MockReconciler[T]) DeleteResource(ctx context.Context, resource T, serviceName string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteResource", ctx, resource, serviceName)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteResource indicates an expected call of DeleteResource.
func (mr *MockReconcilerMockRecorder[T]) DeleteResource(ctx, resource, serviceName any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteResource", reflect.TypeOf((*MockReconciler[T])(nil).DeleteResource), ctx, resource, serviceName)
}
// PauseResource mocks base method.
func (m *MockReconciler[T]) PauseResource(ctx context.Context, resource T, serviceName string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PauseResource", ctx, resource, serviceName)
ret0, _ := ret[0].(error)
return ret0
}
// PauseResource indicates an expected call of PauseResource.
func (mr *MockReconcilerMockRecorder[T]) PauseResource(ctx, resource, serviceName any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PauseResource", reflect.TypeOf((*MockReconciler[T])(nil).PauseResource), ctx, resource, serviceName)
}
// MockTagsGetterSetter is a mock of TagsGetterSetter interface.
type MockTagsGetterSetter[T genruntime.MetaObject] struct {
ctrl *gomock.Controller
recorder *MockTagsGetterSetterMockRecorder[T]
}
// MockTagsGetterSetterMockRecorder is the mock recorder for MockTagsGetterSetter.
type MockTagsGetterSetterMockRecorder[T genruntime.MetaObject] struct {
mock *MockTagsGetterSetter[T]
}
// NewMockTagsGetterSetter creates a new mock instance.
func NewMockTagsGetterSetter[T genruntime.MetaObject](ctrl *gomock.Controller) *MockTagsGetterSetter[T] {
mock := &MockTagsGetterSetter[T]{ctrl: ctrl}
mock.recorder = &MockTagsGetterSetterMockRecorder[T]{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockTagsGetterSetter[T]) EXPECT() *MockTagsGetterSetterMockRecorder[T] {
return m.recorder
}
// GetAdditionalTags mocks base method.
func (m *MockTagsGetterSetter[T]) GetAdditionalTags() v1beta1.Tags {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetAdditionalTags")
ret0, _ := ret[0].(v1beta1.Tags)
return ret0
}
// GetAdditionalTags indicates an expected call of GetAdditionalTags.
func (mr *MockTagsGetterSetterMockRecorder[T]) GetAdditionalTags() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAdditionalTags", reflect.TypeOf((*MockTagsGetterSetter[T])(nil).GetAdditionalTags))
}
// GetDesiredTags mocks base method.
func (m *MockTagsGetterSetter[T]) GetDesiredTags(resource T) v1beta1.Tags {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetDesiredTags", resource)
ret0, _ := ret[0].(v1beta1.Tags)
return ret0
}
// GetDesiredTags indicates an expected call of GetDesiredTags.
func (mr *MockTagsGetterSetterMockRecorder[T]) GetDesiredTags(resource any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDesiredTags", reflect.TypeOf((*MockTagsGetterSetter[T])(nil).GetDesiredTags), resource)
}
// SetTags mocks base method.
func (m *MockTagsGetterSetter[T]) SetTags(resource T, tags v1beta1.Tags) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetTags", resource, tags)
}
// SetTags indicates an expected call of SetTags.
func (mr *MockTagsGetterSetterMockRecorder[T]) SetTags(resource, tags any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTags", reflect.TypeOf((*MockTagsGetterSetter[T])(nil).SetTags), resource, tags)
}
// MockPatcher is a mock of Patcher interface.
type MockPatcher struct {
ctrl *gomock.Controller
recorder *MockPatcherMockRecorder
}
// MockPatcherMockRecorder is the mock recorder for MockPatcher.
type MockPatcherMockRecorder struct {
mock *MockPatcher
}
// NewMockPatcher creates a new mock instance.
func NewMockPatcher(ctrl *gomock.Controller) *MockPatcher {
mock := &MockPatcher{ctrl: ctrl}
mock.recorder = &MockPatcherMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPatcher) EXPECT() *MockPatcherMockRecorder {
return m.recorder
}
// ExtraPatches mocks base method.
func (m *MockPatcher) ExtraPatches() []string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ExtraPatches")
ret0, _ := ret[0].([]string)
return ret0
}
// ExtraPatches indicates an expected call of ExtraPatches.
func (mr *MockPatcherMockRecorder) ExtraPatches() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExtraPatches", reflect.TypeOf((*MockPatcher)(nil).ExtraPatches))
}
// MockScope is a mock of Scope interface.
type MockScope struct {
ctrl *gomock.Controller
recorder *MockScopeMockRecorder
}
// MockScopeMockRecorder is the mock recorder for MockScope.
type MockScopeMockRecorder struct {
mock *MockScope
}
// NewMockScope creates a new mock instance.
func NewMockScope(ctrl *gomock.Controller) *MockScope {
mock := &MockScope{ctrl: ctrl}
mock.recorder = &MockScopeMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockScope) EXPECT() *MockScopeMockRecorder {
return m.recorder
}
// ASOOwner mocks base method.
func (m *MockScope) ASOOwner() client.Object {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ASOOwner")
ret0, _ := ret[0].(client.Object)
return ret0
}
// ASOOwner indicates an expected call of ASOOwner.
func (mr *MockScopeMockRecorder) ASOOwner() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ASOOwner", reflect.TypeOf((*MockScope)(nil).ASOOwner))
}
// ClusterName mocks base method.
func (m *MockScope) ClusterName() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ClusterName")
ret0, _ := ret[0].(string)
return ret0
}
// ClusterName indicates an expected call of ClusterName.
func (mr *MockScopeMockRecorder) ClusterName() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterName", reflect.TypeOf((*MockScope)(nil).ClusterName))
}
// DefaultedAzureCallTimeout mocks base method.
func (m *MockScope) DefaultedAzureCallTimeout() time.Duration {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DefaultedAzureCallTimeout")
ret0, _ := ret[0].(time.Duration)
return ret0
}
// DefaultedAzureCallTimeout indicates an expected call of DefaultedAzureCallTimeout.
func (mr *MockScopeMockRecorder) DefaultedAzureCallTimeout() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultedAzureCallTimeout", reflect.TypeOf((*MockScope)(nil).DefaultedAzureCallTimeout))
}
// DefaultedAzureServiceReconcileTimeout mocks base method.
func (m *MockScope) DefaultedAzureServiceReconcileTimeout() time.Duration {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DefaultedAzureServiceReconcileTimeout")
ret0, _ := ret[0].(time.Duration)
return ret0
}
// DefaultedAzureServiceReconcileTimeout indicates an expected call of DefaultedAzureServiceReconcileTimeout.
func (mr *MockScopeMockRecorder) DefaultedAzureServiceReconcileTimeout() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultedAzureServiceReconcileTimeout", reflect.TypeOf((*MockScope)(nil).DefaultedAzureServiceReconcileTimeout))
}
// DefaultedReconcilerRequeue mocks base method.
func (m *MockScope) DefaultedReconcilerRequeue() time.Duration {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DefaultedReconcilerRequeue")
ret0, _ := ret[0].(time.Duration)
return ret0
}
// DefaultedReconcilerRequeue indicates an expected call of DefaultedReconcilerRequeue.
func (mr *MockScopeMockRecorder) DefaultedReconcilerRequeue() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultedReconcilerRequeue", reflect.TypeOf((*MockScope)(nil).DefaultedReconcilerRequeue))
}
// DeleteLongRunningOperationState mocks base method.
func (m *MockScope) DeleteLongRunningOperationState(arg0, arg1, arg2 string) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "DeleteLongRunningOperationState", arg0, arg1, arg2)
}
// DeleteLongRunningOperationState indicates an expected call of DeleteLongRunningOperationState.
func (mr *MockScopeMockRecorder) DeleteLongRunningOperationState(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteLongRunningOperationState", reflect.TypeOf((*MockScope)(nil).DeleteLongRunningOperationState), arg0, arg1, arg2)
}
// GetClient mocks base method.
func (m *MockScope) GetClient() client.Client {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetClient")
ret0, _ := ret[0].(client.Client)
return ret0
}
// GetClient indicates an expected call of GetClient.
func (mr *MockScopeMockRecorder) GetClient() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClient", reflect.TypeOf((*MockScope)(nil).GetClient))
}
// GetLongRunningOperationState mocks base method.
func (m *MockScope) GetLongRunningOperationState(arg0, arg1, arg2 string) *v1beta1.Future {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetLongRunningOperationState", arg0, arg1, arg2)
ret0, _ := ret[0].(*v1beta1.Future)
return ret0
}
// GetLongRunningOperationState indicates an expected call of GetLongRunningOperationState.
func (mr *MockScopeMockRecorder) GetLongRunningOperationState(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLongRunningOperationState", reflect.TypeOf((*MockScope)(nil).GetLongRunningOperationState), arg0, arg1, arg2)
}
// SetLongRunningOperationState mocks base method.
func (m *MockScope) SetLongRunningOperationState(arg0 *v1beta1.Future) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetLongRunningOperationState", arg0)
}
// SetLongRunningOperationState indicates an expected call of SetLongRunningOperationState.
func (mr *MockScopeMockRecorder) SetLongRunningOperationState(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLongRunningOperationState", reflect.TypeOf((*MockScope)(nil).SetLongRunningOperationState), arg0)
}
// UpdateDeleteStatus mocks base method.
func (m *MockScope) UpdateDeleteStatus(arg0 v1beta10.ConditionType, arg1 string, arg2 error) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "UpdateDeleteStatus", arg0, arg1, arg2)
}
// UpdateDeleteStatus indicates an expected call of UpdateDeleteStatus.
func (mr *MockScopeMockRecorder) UpdateDeleteStatus(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateDeleteStatus", reflect.TypeOf((*MockScope)(nil).UpdateDeleteStatus), arg0, arg1, arg2)
}
// UpdatePatchStatus mocks base method.
func (m *MockScope) UpdatePatchStatus(arg0 v1beta10.ConditionType, arg1 string, arg2 error) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "UpdatePatchStatus", arg0, arg1, arg2)
}
// UpdatePatchStatus indicates an expected call of UpdatePatchStatus.
func (mr *MockScopeMockRecorder) UpdatePatchStatus(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePatchStatus", reflect.TypeOf((*MockScope)(nil).UpdatePatchStatus), arg0, arg1, arg2)
}
// UpdatePutStatus mocks base method.
func (m *MockScope) UpdatePutStatus(arg0 v1beta10.ConditionType, arg1 string, arg2 error) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "UpdatePutStatus", arg0, arg1, arg2)
}
// UpdatePutStatus indicates an expected call of UpdatePutStatus.
func (mr *MockScopeMockRecorder) UpdatePutStatus(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePutStatus", reflect.TypeOf((*MockScope)(nil).UpdatePutStatus), arg0, arg1, arg2)
}