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
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
|
// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
package mocks
import (
"io"
"github.com/google/syzkaller/pkg/gcs"
mock "github.com/stretchr/testify/mock"
)
// NewClient creates a new instance of Client. 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 NewClient(t interface {
mock.TestingT
Cleanup(func())
}) *Client {
mock := &Client{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
// Client is an autogenerated mock type for the Client type
type Client struct {
mock.Mock
}
type Client_Expecter struct {
mock *mock.Mock
}
func (_m *Client) EXPECT() *Client_Expecter {
return &Client_Expecter{mock: &_m.Mock}
}
// Close provides a mock function for the type Client
func (_mock *Client) Close() error {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for Close")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func() error); ok {
r0 = returnFunc()
} else {
r0 = ret.Error(0)
}
return r0
}
// Client_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
type Client_Close_Call struct {
*mock.Call
}
// Close is a helper method to define mock.On call
func (_e *Client_Expecter) Close() *Client_Close_Call {
return &Client_Close_Call{Call: _e.mock.On("Close")}
}
func (_c *Client_Close_Call) Run(run func()) *Client_Close_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *Client_Close_Call) Return(err error) *Client_Close_Call {
_c.Call.Return(err)
return _c
}
func (_c *Client_Close_Call) RunAndReturn(run func() error) *Client_Close_Call {
_c.Call.Return(run)
return _c
}
// DeleteFile provides a mock function for the type Client
func (_mock *Client) DeleteFile(path string) error {
ret := _mock.Called(path)
if len(ret) == 0 {
panic("no return value specified for DeleteFile")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string) error); ok {
r0 = returnFunc(path)
} else {
r0 = ret.Error(0)
}
return r0
}
// Client_DeleteFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteFile'
type Client_DeleteFile_Call struct {
*mock.Call
}
// DeleteFile is a helper method to define mock.On call
// - path string
func (_e *Client_Expecter) DeleteFile(path interface{}) *Client_DeleteFile_Call {
return &Client_DeleteFile_Call{Call: _e.mock.On("DeleteFile", path)}
}
func (_c *Client_DeleteFile_Call) Run(run func(path string)) *Client_DeleteFile_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_DeleteFile_Call) Return(err error) *Client_DeleteFile_Call {
_c.Call.Return(err)
return _c
}
func (_c *Client_DeleteFile_Call) RunAndReturn(run func(path string) error) *Client_DeleteFile_Call {
_c.Call.Return(run)
return _c
}
// FileExists provides a mock function for the type Client
func (_mock *Client) FileExists(path string) (bool, error) {
ret := _mock.Called(path)
if len(ret) == 0 {
panic("no return value specified for FileExists")
}
var r0 bool
var r1 error
if returnFunc, ok := ret.Get(0).(func(string) (bool, error)); ok {
return returnFunc(path)
}
if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
r0 = returnFunc(path)
} else {
r0 = ret.Get(0).(bool)
}
if returnFunc, ok := ret.Get(1).(func(string) error); ok {
r1 = returnFunc(path)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Client_FileExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileExists'
type Client_FileExists_Call struct {
*mock.Call
}
// FileExists is a helper method to define mock.On call
// - path string
func (_e *Client_Expecter) FileExists(path interface{}) *Client_FileExists_Call {
return &Client_FileExists_Call{Call: _e.mock.On("FileExists", path)}
}
func (_c *Client_FileExists_Call) Run(run func(path string)) *Client_FileExists_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_FileExists_Call) Return(b bool, err error) *Client_FileExists_Call {
_c.Call.Return(b, err)
return _c
}
func (_c *Client_FileExists_Call) RunAndReturn(run func(path string) (bool, error)) *Client_FileExists_Call {
_c.Call.Return(run)
return _c
}
// FileReader provides a mock function for the type Client
func (_mock *Client) FileReader(path string) (io.ReadCloser, error) {
ret := _mock.Called(path)
if len(ret) == 0 {
panic("no return value specified for FileReader")
}
var r0 io.ReadCloser
var r1 error
if returnFunc, ok := ret.Get(0).(func(string) (io.ReadCloser, error)); ok {
return returnFunc(path)
}
if returnFunc, ok := ret.Get(0).(func(string) io.ReadCloser); ok {
r0 = returnFunc(path)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(io.ReadCloser)
}
}
if returnFunc, ok := ret.Get(1).(func(string) error); ok {
r1 = returnFunc(path)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Client_FileReader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileReader'
type Client_FileReader_Call struct {
*mock.Call
}
// FileReader is a helper method to define mock.On call
// - path string
func (_e *Client_Expecter) FileReader(path interface{}) *Client_FileReader_Call {
return &Client_FileReader_Call{Call: _e.mock.On("FileReader", path)}
}
func (_c *Client_FileReader_Call) Run(run func(path string)) *Client_FileReader_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_FileReader_Call) Return(readCloser io.ReadCloser, err error) *Client_FileReader_Call {
_c.Call.Return(readCloser, err)
return _c
}
func (_c *Client_FileReader_Call) RunAndReturn(run func(path string) (io.ReadCloser, error)) *Client_FileReader_Call {
_c.Call.Return(run)
return _c
}
// FileWriter provides a mock function for the type Client
func (_mock *Client) FileWriter(path string, contentType string, contentEncoding string) (io.WriteCloser, error) {
ret := _mock.Called(path, contentType, contentEncoding)
if len(ret) == 0 {
panic("no return value specified for FileWriter")
}
var r0 io.WriteCloser
var r1 error
if returnFunc, ok := ret.Get(0).(func(string, string, string) (io.WriteCloser, error)); ok {
return returnFunc(path, contentType, contentEncoding)
}
if returnFunc, ok := ret.Get(0).(func(string, string, string) io.WriteCloser); ok {
r0 = returnFunc(path, contentType, contentEncoding)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(io.WriteCloser)
}
}
if returnFunc, ok := ret.Get(1).(func(string, string, string) error); ok {
r1 = returnFunc(path, contentType, contentEncoding)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Client_FileWriter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileWriter'
type Client_FileWriter_Call struct {
*mock.Call
}
// FileWriter is a helper method to define mock.On call
// - path string
// - contentType string
// - contentEncoding string
func (_e *Client_Expecter) FileWriter(path interface{}, contentType interface{}, contentEncoding interface{}) *Client_FileWriter_Call {
return &Client_FileWriter_Call{Call: _e.mock.On("FileWriter", path, contentType, contentEncoding)}
}
func (_c *Client_FileWriter_Call) Run(run func(path string, contentType string, contentEncoding string)) *Client_FileWriter_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *Client_FileWriter_Call) Return(writeCloser io.WriteCloser, err error) *Client_FileWriter_Call {
_c.Call.Return(writeCloser, err)
return _c
}
func (_c *Client_FileWriter_Call) RunAndReturn(run func(path string, contentType string, contentEncoding string) (io.WriteCloser, error)) *Client_FileWriter_Call {
_c.Call.Return(run)
return _c
}
// ListObjects provides a mock function for the type Client
func (_mock *Client) ListObjects(path string) ([]*gcs.Object, error) {
ret := _mock.Called(path)
if len(ret) == 0 {
panic("no return value specified for ListObjects")
}
var r0 []*gcs.Object
var r1 error
if returnFunc, ok := ret.Get(0).(func(string) ([]*gcs.Object, error)); ok {
return returnFunc(path)
}
if returnFunc, ok := ret.Get(0).(func(string) []*gcs.Object); ok {
r0 = returnFunc(path)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*gcs.Object)
}
}
if returnFunc, ok := ret.Get(1).(func(string) error); ok {
r1 = returnFunc(path)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Client_ListObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListObjects'
type Client_ListObjects_Call struct {
*mock.Call
}
// ListObjects is a helper method to define mock.On call
// - path string
func (_e *Client_Expecter) ListObjects(path interface{}) *Client_ListObjects_Call {
return &Client_ListObjects_Call{Call: _e.mock.On("ListObjects", path)}
}
func (_c *Client_ListObjects_Call) Run(run func(path string)) *Client_ListObjects_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_ListObjects_Call) Return(objects []*gcs.Object, err error) *Client_ListObjects_Call {
_c.Call.Return(objects, err)
return _c
}
func (_c *Client_ListObjects_Call) RunAndReturn(run func(path string) ([]*gcs.Object, error)) *Client_ListObjects_Call {
_c.Call.Return(run)
return _c
}
// Publish provides a mock function for the type Client
func (_mock *Client) Publish(path string) error {
ret := _mock.Called(path)
if len(ret) == 0 {
panic("no return value specified for Publish")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string) error); ok {
r0 = returnFunc(path)
} else {
r0 = ret.Error(0)
}
return r0
}
// Client_Publish_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Publish'
type Client_Publish_Call struct {
*mock.Call
}
// Publish is a helper method to define mock.On call
// - path string
func (_e *Client_Expecter) Publish(path interface{}) *Client_Publish_Call {
return &Client_Publish_Call{Call: _e.mock.On("Publish", path)}
}
func (_c *Client_Publish_Call) Run(run func(path string)) *Client_Publish_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_Publish_Call) Return(err error) *Client_Publish_Call {
_c.Call.Return(err)
return _c
}
func (_c *Client_Publish_Call) RunAndReturn(run func(path string) error) *Client_Publish_Call {
_c.Call.Return(run)
return _c
}
|