-
Notifications
You must be signed in to change notification settings - Fork 468
/
mocks.go
299 lines (256 loc) · 10.1 KB
/
mocks.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
// Code generated by MockGen. DO NOT EDIT.
// Source: sigs.k8s.io/controller-runtime/pkg/manager (interfaces: Manager)
// Package manager is a generated GoMock package.
package manager
import (
context "context"
http "net/http"
reflect "reflect"
logr "github.com/go-logr/logr"
gomock "github.com/golang/mock/gomock"
meta "k8s.io/apimachinery/pkg/api/meta"
runtime "k8s.io/apimachinery/pkg/runtime"
rest "k8s.io/client-go/rest"
record "k8s.io/client-go/tools/record"
cache "sigs.k8s.io/controller-runtime/pkg/cache"
client "sigs.k8s.io/controller-runtime/pkg/client"
v1alpha1 "sigs.k8s.io/controller-runtime/pkg/config/v1alpha1"
healthz "sigs.k8s.io/controller-runtime/pkg/healthz"
manager "sigs.k8s.io/controller-runtime/pkg/manager"
webhook "sigs.k8s.io/controller-runtime/pkg/webhook"
)
// MockManager is a mock of Manager interface.
type MockManager struct {
ctrl *gomock.Controller
recorder *MockManagerMockRecorder
}
// MockManagerMockRecorder is the mock recorder for MockManager.
type MockManagerMockRecorder struct {
mock *MockManager
}
// NewMockManager creates a new mock instance.
func NewMockManager(ctrl *gomock.Controller) *MockManager {
mock := &MockManager{ctrl: ctrl}
mock.recorder = &MockManagerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockManager) EXPECT() *MockManagerMockRecorder {
return m.recorder
}
// Add mocks base method.
func (m *MockManager) Add(arg0 manager.Runnable) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Add", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Add indicates an expected call of Add.
func (mr *MockManagerMockRecorder) Add(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockManager)(nil).Add), arg0)
}
// AddHealthzCheck mocks base method.
func (m *MockManager) AddHealthzCheck(arg0 string, arg1 healthz.Checker) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddHealthzCheck", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// AddHealthzCheck indicates an expected call of AddHealthzCheck.
func (mr *MockManagerMockRecorder) AddHealthzCheck(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddHealthzCheck", reflect.TypeOf((*MockManager)(nil).AddHealthzCheck), arg0, arg1)
}
// AddMetricsExtraHandler mocks base method.
func (m *MockManager) AddMetricsExtraHandler(arg0 string, arg1 http.Handler) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddMetricsExtraHandler", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// AddMetricsExtraHandler indicates an expected call of AddMetricsExtraHandler.
func (mr *MockManagerMockRecorder) AddMetricsExtraHandler(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddMetricsExtraHandler", reflect.TypeOf((*MockManager)(nil).AddMetricsExtraHandler), arg0, arg1)
}
// AddReadyzCheck mocks base method.
func (m *MockManager) AddReadyzCheck(arg0 string, arg1 healthz.Checker) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddReadyzCheck", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// AddReadyzCheck indicates an expected call of AddReadyzCheck.
func (mr *MockManagerMockRecorder) AddReadyzCheck(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddReadyzCheck", reflect.TypeOf((*MockManager)(nil).AddReadyzCheck), arg0, arg1)
}
// Elected mocks base method.
func (m *MockManager) Elected() <-chan struct{} {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Elected")
ret0, _ := ret[0].(<-chan struct{})
return ret0
}
// Elected indicates an expected call of Elected.
func (mr *MockManagerMockRecorder) Elected() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Elected", reflect.TypeOf((*MockManager)(nil).Elected))
}
// GetAPIReader mocks base method.
func (m *MockManager) GetAPIReader() client.Reader {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetAPIReader")
ret0, _ := ret[0].(client.Reader)
return ret0
}
// GetAPIReader indicates an expected call of GetAPIReader.
func (mr *MockManagerMockRecorder) GetAPIReader() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAPIReader", reflect.TypeOf((*MockManager)(nil).GetAPIReader))
}
// GetCache mocks base method.
func (m *MockManager) GetCache() cache.Cache {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCache")
ret0, _ := ret[0].(cache.Cache)
return ret0
}
// GetCache indicates an expected call of GetCache.
func (mr *MockManagerMockRecorder) GetCache() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCache", reflect.TypeOf((*MockManager)(nil).GetCache))
}
// GetClient mocks base method.
func (m *MockManager) 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 *MockManagerMockRecorder) GetClient() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClient", reflect.TypeOf((*MockManager)(nil).GetClient))
}
// GetConfig mocks base method.
func (m *MockManager) GetConfig() *rest.Config {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetConfig")
ret0, _ := ret[0].(*rest.Config)
return ret0
}
// GetConfig indicates an expected call of GetConfig.
func (mr *MockManagerMockRecorder) GetConfig() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfig", reflect.TypeOf((*MockManager)(nil).GetConfig))
}
// GetControllerOptions mocks base method.
func (m *MockManager) GetControllerOptions() v1alpha1.ControllerConfigurationSpec {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetControllerOptions")
ret0, _ := ret[0].(v1alpha1.ControllerConfigurationSpec)
return ret0
}
// GetControllerOptions indicates an expected call of GetControllerOptions.
func (mr *MockManagerMockRecorder) GetControllerOptions() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetControllerOptions", reflect.TypeOf((*MockManager)(nil).GetControllerOptions))
}
// GetEventRecorderFor mocks base method.
func (m *MockManager) GetEventRecorderFor(arg0 string) record.EventRecorder {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetEventRecorderFor", arg0)
ret0, _ := ret[0].(record.EventRecorder)
return ret0
}
// GetEventRecorderFor indicates an expected call of GetEventRecorderFor.
func (mr *MockManagerMockRecorder) GetEventRecorderFor(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEventRecorderFor", reflect.TypeOf((*MockManager)(nil).GetEventRecorderFor), arg0)
}
// GetFieldIndexer mocks base method.
func (m *MockManager) GetFieldIndexer() client.FieldIndexer {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetFieldIndexer")
ret0, _ := ret[0].(client.FieldIndexer)
return ret0
}
// GetFieldIndexer indicates an expected call of GetFieldIndexer.
func (mr *MockManagerMockRecorder) GetFieldIndexer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFieldIndexer", reflect.TypeOf((*MockManager)(nil).GetFieldIndexer))
}
// GetLogger mocks base method.
func (m *MockManager) GetLogger() logr.Logger {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetLogger")
ret0, _ := ret[0].(logr.Logger)
return ret0
}
// GetLogger indicates an expected call of GetLogger.
func (mr *MockManagerMockRecorder) GetLogger() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLogger", reflect.TypeOf((*MockManager)(nil).GetLogger))
}
// GetRESTMapper mocks base method.
func (m *MockManager) GetRESTMapper() meta.RESTMapper {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetRESTMapper")
ret0, _ := ret[0].(meta.RESTMapper)
return ret0
}
// GetRESTMapper indicates an expected call of GetRESTMapper.
func (mr *MockManagerMockRecorder) GetRESTMapper() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRESTMapper", reflect.TypeOf((*MockManager)(nil).GetRESTMapper))
}
// GetScheme mocks base method.
func (m *MockManager) GetScheme() *runtime.Scheme {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetScheme")
ret0, _ := ret[0].(*runtime.Scheme)
return ret0
}
// GetScheme indicates an expected call of GetScheme.
func (mr *MockManagerMockRecorder) GetScheme() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetScheme", reflect.TypeOf((*MockManager)(nil).GetScheme))
}
// GetWebhookServer mocks base method.
func (m *MockManager) GetWebhookServer() *webhook.Server {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetWebhookServer")
ret0, _ := ret[0].(*webhook.Server)
return ret0
}
// GetWebhookServer indicates an expected call of GetWebhookServer.
func (mr *MockManagerMockRecorder) GetWebhookServer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWebhookServer", reflect.TypeOf((*MockManager)(nil).GetWebhookServer))
}
// SetFields mocks base method.
func (m *MockManager) SetFields(arg0 interface{}) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetFields", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetFields indicates an expected call of SetFields.
func (mr *MockManagerMockRecorder) SetFields(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFields", reflect.TypeOf((*MockManager)(nil).SetFields), arg0)
}
// Start mocks base method.
func (m *MockManager) Start(arg0 context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Start", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Start indicates an expected call of Start.
func (mr *MockManagerMockRecorder) Start(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockManager)(nil).Start), arg0)
}