cubefs

Форк
0
/
controller_mock_test.go 
305 строк · 11.7 Кб
1
// Code generated by MockGen. DO NOT EDIT.
2
// Source: github.com/cubefs/cubefs/blobstore/access/controller (interfaces: ClusterController,ServiceController,VolumeGetter)
3

4
// Package access is a generated GoMock package.
5
package access
6

7
import (
8
	context "context"
9
	reflect "reflect"
10

11
	controller "github.com/cubefs/cubefs/blobstore/access/controller"
12
	clustermgr "github.com/cubefs/cubefs/blobstore/api/clustermgr"
13
	proto "github.com/cubefs/cubefs/blobstore/common/proto"
14
	gomock "github.com/golang/mock/gomock"
15
)
16

17
// MockClusterController is a mock of ClusterController interface.
18
type MockClusterController struct {
19
	ctrl     *gomock.Controller
20
	recorder *MockClusterControllerMockRecorder
21
}
22

23
// MockClusterControllerMockRecorder is the mock recorder for MockClusterController.
24
type MockClusterControllerMockRecorder struct {
25
	mock *MockClusterController
26
}
27

28
// NewMockClusterController creates a new mock instance.
29
func NewMockClusterController(ctrl *gomock.Controller) *MockClusterController {
30
	mock := &MockClusterController{ctrl: ctrl}
31
	mock.recorder = &MockClusterControllerMockRecorder{mock}
32
	return mock
33
}
34

35
// EXPECT returns an object that allows the caller to indicate expected use.
36
func (m *MockClusterController) EXPECT() *MockClusterControllerMockRecorder {
37
	return m.recorder
38
}
39

40
// All mocks base method.
41
func (m *MockClusterController) All() []*clustermgr.ClusterInfo {
42
	m.ctrl.T.Helper()
43
	ret := m.ctrl.Call(m, "All")
44
	ret0, _ := ret[0].([]*clustermgr.ClusterInfo)
45
	return ret0
46
}
47

48
// All indicates an expected call of All.
49
func (mr *MockClusterControllerMockRecorder) All() *gomock.Call {
50
	mr.mock.ctrl.T.Helper()
51
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockClusterController)(nil).All))
52
}
53

54
// ChangeChooseAlg mocks base method.
55
func (m *MockClusterController) ChangeChooseAlg(arg0 controller.AlgChoose) error {
56
	m.ctrl.T.Helper()
57
	ret := m.ctrl.Call(m, "ChangeChooseAlg", arg0)
58
	ret0, _ := ret[0].(error)
59
	return ret0
60
}
61

62
// ChangeChooseAlg indicates an expected call of ChangeChooseAlg.
63
func (mr *MockClusterControllerMockRecorder) ChangeChooseAlg(arg0 interface{}) *gomock.Call {
64
	mr.mock.ctrl.T.Helper()
65
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeChooseAlg", reflect.TypeOf((*MockClusterController)(nil).ChangeChooseAlg), arg0)
66
}
67

68
// ChooseOne mocks base method.
69
func (m *MockClusterController) ChooseOne() (*clustermgr.ClusterInfo, error) {
70
	m.ctrl.T.Helper()
71
	ret := m.ctrl.Call(m, "ChooseOne")
72
	ret0, _ := ret[0].(*clustermgr.ClusterInfo)
73
	ret1, _ := ret[1].(error)
74
	return ret0, ret1
75
}
76

77
// ChooseOne indicates an expected call of ChooseOne.
78
func (mr *MockClusterControllerMockRecorder) ChooseOne() *gomock.Call {
79
	mr.mock.ctrl.T.Helper()
80
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChooseOne", reflect.TypeOf((*MockClusterController)(nil).ChooseOne))
81
}
82

83
// GetConfig mocks base method.
84
func (m *MockClusterController) GetConfig(arg0 context.Context, arg1 string) (string, error) {
85
	m.ctrl.T.Helper()
86
	ret := m.ctrl.Call(m, "GetConfig", arg0, arg1)
87
	ret0, _ := ret[0].(string)
88
	ret1, _ := ret[1].(error)
89
	return ret0, ret1
90
}
91

92
// GetConfig indicates an expected call of GetConfig.
93
func (mr *MockClusterControllerMockRecorder) GetConfig(arg0, arg1 interface{}) *gomock.Call {
94
	mr.mock.ctrl.T.Helper()
95
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfig", reflect.TypeOf((*MockClusterController)(nil).GetConfig), arg0, arg1)
96
}
97

98
// GetServiceController mocks base method.
99
func (m *MockClusterController) GetServiceController(arg0 proto.ClusterID) (controller.ServiceController, error) {
100
	m.ctrl.T.Helper()
101
	ret := m.ctrl.Call(m, "GetServiceController", arg0)
102
	ret0, _ := ret[0].(controller.ServiceController)
103
	ret1, _ := ret[1].(error)
104
	return ret0, ret1
105
}
106

107
// GetServiceController indicates an expected call of GetServiceController.
108
func (mr *MockClusterControllerMockRecorder) GetServiceController(arg0 interface{}) *gomock.Call {
109
	mr.mock.ctrl.T.Helper()
110
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServiceController", reflect.TypeOf((*MockClusterController)(nil).GetServiceController), arg0)
111
}
112

113
// GetVolumeGetter mocks base method.
114
func (m *MockClusterController) GetVolumeGetter(arg0 proto.ClusterID) (controller.VolumeGetter, error) {
115
	m.ctrl.T.Helper()
116
	ret := m.ctrl.Call(m, "GetVolumeGetter", arg0)
117
	ret0, _ := ret[0].(controller.VolumeGetter)
118
	ret1, _ := ret[1].(error)
119
	return ret0, ret1
120
}
121

122
// GetVolumeGetter indicates an expected call of GetVolumeGetter.
123
func (mr *MockClusterControllerMockRecorder) GetVolumeGetter(arg0 interface{}) *gomock.Call {
124
	mr.mock.ctrl.T.Helper()
125
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVolumeGetter", reflect.TypeOf((*MockClusterController)(nil).GetVolumeGetter), arg0)
126
}
127

128
// Region mocks base method.
129
func (m *MockClusterController) Region() string {
130
	m.ctrl.T.Helper()
131
	ret := m.ctrl.Call(m, "Region")
132
	ret0, _ := ret[0].(string)
133
	return ret0
134
}
135

136
// Region indicates an expected call of Region.
137
func (mr *MockClusterControllerMockRecorder) Region() *gomock.Call {
138
	mr.mock.ctrl.T.Helper()
139
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Region", reflect.TypeOf((*MockClusterController)(nil).Region))
140
}
141

142
// MockServiceController is a mock of ServiceController interface.
143
type MockServiceController struct {
144
	ctrl     *gomock.Controller
145
	recorder *MockServiceControllerMockRecorder
146
}
147

148
// MockServiceControllerMockRecorder is the mock recorder for MockServiceController.
149
type MockServiceControllerMockRecorder struct {
150
	mock *MockServiceController
151
}
152

153
// NewMockServiceController creates a new mock instance.
154
func NewMockServiceController(ctrl *gomock.Controller) *MockServiceController {
155
	mock := &MockServiceController{ctrl: ctrl}
156
	mock.recorder = &MockServiceControllerMockRecorder{mock}
157
	return mock
158
}
159

160
// EXPECT returns an object that allows the caller to indicate expected use.
161
func (m *MockServiceController) EXPECT() *MockServiceControllerMockRecorder {
162
	return m.recorder
163
}
164

165
// GetDiskHost mocks base method.
166
func (m *MockServiceController) GetDiskHost(arg0 context.Context, arg1 proto.DiskID) (*controller.HostIDC, error) {
167
	m.ctrl.T.Helper()
168
	ret := m.ctrl.Call(m, "GetDiskHost", arg0, arg1)
169
	ret0, _ := ret[0].(*controller.HostIDC)
170
	ret1, _ := ret[1].(error)
171
	return ret0, ret1
172
}
173

174
// GetDiskHost indicates an expected call of GetDiskHost.
175
func (mr *MockServiceControllerMockRecorder) GetDiskHost(arg0, arg1 interface{}) *gomock.Call {
176
	mr.mock.ctrl.T.Helper()
177
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDiskHost", reflect.TypeOf((*MockServiceController)(nil).GetDiskHost), arg0, arg1)
178
}
179

180
// GetServiceHost mocks base method.
181
func (m *MockServiceController) GetServiceHost(arg0 context.Context, arg1 string) (string, error) {
182
	m.ctrl.T.Helper()
183
	ret := m.ctrl.Call(m, "GetServiceHost", arg0, arg1)
184
	ret0, _ := ret[0].(string)
185
	ret1, _ := ret[1].(error)
186
	return ret0, ret1
187
}
188

189
// GetServiceHost indicates an expected call of GetServiceHost.
190
func (mr *MockServiceControllerMockRecorder) GetServiceHost(arg0, arg1 interface{}) *gomock.Call {
191
	mr.mock.ctrl.T.Helper()
192
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServiceHost", reflect.TypeOf((*MockServiceController)(nil).GetServiceHost), arg0, arg1)
193
}
194

195
// GetServiceHosts mocks base method.
196
func (m *MockServiceController) GetServiceHosts(arg0 context.Context, arg1 string) ([]string, error) {
197
	m.ctrl.T.Helper()
198
	ret := m.ctrl.Call(m, "GetServiceHosts", arg0, arg1)
199
	ret0, _ := ret[0].([]string)
200
	ret1, _ := ret[1].(error)
201
	return ret0, ret1
202
}
203

204
// GetServiceHosts indicates an expected call of GetServiceHosts.
205
func (mr *MockServiceControllerMockRecorder) GetServiceHosts(arg0, arg1 interface{}) *gomock.Call {
206
	mr.mock.ctrl.T.Helper()
207
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServiceHosts", reflect.TypeOf((*MockServiceController)(nil).GetServiceHosts), arg0, arg1)
208
}
209

210
// PunishDisk mocks base method.
211
func (m *MockServiceController) PunishDisk(arg0 context.Context, arg1 proto.DiskID, arg2 int) {
212
	m.ctrl.T.Helper()
213
	m.ctrl.Call(m, "PunishDisk", arg0, arg1, arg2)
214
}
215

216
// PunishDisk indicates an expected call of PunishDisk.
217
func (mr *MockServiceControllerMockRecorder) PunishDisk(arg0, arg1, arg2 interface{}) *gomock.Call {
218
	mr.mock.ctrl.T.Helper()
219
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PunishDisk", reflect.TypeOf((*MockServiceController)(nil).PunishDisk), arg0, arg1, arg2)
220
}
221

222
// PunishDiskWithThreshold mocks base method.
223
func (m *MockServiceController) PunishDiskWithThreshold(arg0 context.Context, arg1 proto.DiskID, arg2 int) {
224
	m.ctrl.T.Helper()
225
	m.ctrl.Call(m, "PunishDiskWithThreshold", arg0, arg1, arg2)
226
}
227

228
// PunishDiskWithThreshold indicates an expected call of PunishDiskWithThreshold.
229
func (mr *MockServiceControllerMockRecorder) PunishDiskWithThreshold(arg0, arg1, arg2 interface{}) *gomock.Call {
230
	mr.mock.ctrl.T.Helper()
231
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PunishDiskWithThreshold", reflect.TypeOf((*MockServiceController)(nil).PunishDiskWithThreshold), arg0, arg1, arg2)
232
}
233

234
// PunishService mocks base method.
235
func (m *MockServiceController) PunishService(arg0 context.Context, arg1, arg2 string, arg3 int) {
236
	m.ctrl.T.Helper()
237
	m.ctrl.Call(m, "PunishService", arg0, arg1, arg2, arg3)
238
}
239

240
// PunishService indicates an expected call of PunishService.
241
func (mr *MockServiceControllerMockRecorder) PunishService(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
242
	mr.mock.ctrl.T.Helper()
243
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PunishService", reflect.TypeOf((*MockServiceController)(nil).PunishService), arg0, arg1, arg2, arg3)
244
}
245

246
// PunishServiceWithThreshold mocks base method.
247
func (m *MockServiceController) PunishServiceWithThreshold(arg0 context.Context, arg1, arg2 string, arg3 int) {
248
	m.ctrl.T.Helper()
249
	m.ctrl.Call(m, "PunishServiceWithThreshold", arg0, arg1, arg2, arg3)
250
}
251

252
// PunishServiceWithThreshold indicates an expected call of PunishServiceWithThreshold.
253
func (mr *MockServiceControllerMockRecorder) PunishServiceWithThreshold(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
254
	mr.mock.ctrl.T.Helper()
255
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PunishServiceWithThreshold", reflect.TypeOf((*MockServiceController)(nil).PunishServiceWithThreshold), arg0, arg1, arg2, arg3)
256
}
257

258
// MockVolumeGetter is a mock of VolumeGetter interface.
259
type MockVolumeGetter struct {
260
	ctrl     *gomock.Controller
261
	recorder *MockVolumeGetterMockRecorder
262
}
263

264
// MockVolumeGetterMockRecorder is the mock recorder for MockVolumeGetter.
265
type MockVolumeGetterMockRecorder struct {
266
	mock *MockVolumeGetter
267
}
268

269
// NewMockVolumeGetter creates a new mock instance.
270
func NewMockVolumeGetter(ctrl *gomock.Controller) *MockVolumeGetter {
271
	mock := &MockVolumeGetter{ctrl: ctrl}
272
	mock.recorder = &MockVolumeGetterMockRecorder{mock}
273
	return mock
274
}
275

276
// EXPECT returns an object that allows the caller to indicate expected use.
277
func (m *MockVolumeGetter) EXPECT() *MockVolumeGetterMockRecorder {
278
	return m.recorder
279
}
280

281
// Get mocks base method.
282
func (m *MockVolumeGetter) Get(arg0 context.Context, arg1 proto.Vid, arg2 bool) *controller.VolumePhy {
283
	m.ctrl.T.Helper()
284
	ret := m.ctrl.Call(m, "Get", arg0, arg1, arg2)
285
	ret0, _ := ret[0].(*controller.VolumePhy)
286
	return ret0
287
}
288

289
// Get indicates an expected call of Get.
290
func (mr *MockVolumeGetterMockRecorder) Get(arg0, arg1, arg2 interface{}) *gomock.Call {
291
	mr.mock.ctrl.T.Helper()
292
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockVolumeGetter)(nil).Get), arg0, arg1, arg2)
293
}
294

295
// Punish mocks base method.
296
func (m *MockVolumeGetter) Punish(arg0 context.Context, arg1 proto.Vid, arg2 int) {
297
	m.ctrl.T.Helper()
298
	m.ctrl.Call(m, "Punish", arg0, arg1, arg2)
299
}
300

301
// Punish indicates an expected call of Punish.
302
func (mr *MockVolumeGetterMockRecorder) Punish(arg0, arg1, arg2 interface{}) *gomock.Call {
303
	mr.mock.ctrl.T.Helper()
304
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Punish", reflect.TypeOf((*MockVolumeGetter)(nil).Punish), arg0, arg1, arg2)
305
}
306

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.