• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mendersoftware / mender-server / 1494786857

14 Oct 2024 10:01AM UTC coverage: 72.891% (-1.2%) from 74.094%
1494786857

Pull #100

gitlab-ci

tranchitella
chore: centralize the mock generator across the different services

Changelog: None
Ticket: None

Signed-off-by: Fabio Tranchitella <fabio@tranchitella.eu>
Pull Request #100: chore: centralize the mock generator across the different services

4399 of 6347 branches covered (69.31%)

Branch coverage included in aggregate %.

722 of 2034 new or added lines in 44 files covered. (35.5%)

197 existing lines in 36 files now uncovered.

42530 of 58035 relevant lines covered (73.28%)

28.15 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

47.72
/backend/services/iot-manager/app/mocks/App.go
1
// Copyright 2024 Northern.tech AS
2
//
3
//    Licensed under the Apache License, Version 2.0 (the "License");
4
//    you may not use this file except in compliance with the License.
5
//    You may obtain a copy of the License at
6
//
7
//        http://www.apache.org/licenses/LICENSE-2.0
8
//
9
//    Unless required by applicable law or agreed to in writing, software
10
//    distributed under the License is distributed on an "AS IS" BASIS,
11
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
//    See the License for the specific language governing permissions and
13
//    limitations under the License.
14

15
// Code generated by mockery v2.45.1. DO NOT EDIT.
16

17
package mocks
18

19
import (
20
        context "context"
21

22
        app "github.com/mendersoftware/mender-server/services/iot-manager/app"
23

24
        iotcore "github.com/mendersoftware/mender-server/services/iot-manager/client/iotcore"
25

26
        iothub "github.com/mendersoftware/mender-server/services/iot-manager/client/iothub"
27

28
        mock "github.com/stretchr/testify/mock"
29

30
        model "github.com/mendersoftware/mender-server/services/iot-manager/model"
31

32
        uuid "github.com/google/uuid"
33
)
34

35
// App is an autogenerated mock type for the App type
36
type App struct {
37
        mock.Mock
38
}
39

40
// CreateIntegration provides a mock function with given fields: _a0, _a1
41
func (_m *App) CreateIntegration(_a0 context.Context, _a1 model.Integration) (*model.Integration, error) {
1✔
42
        ret := _m.Called(_a0, _a1)
1✔
43

1✔
44
        if len(ret) == 0 {
1✔
NEW
45
                panic("no return value specified for CreateIntegration")
×
46
        }
47

48
        var r0 *model.Integration
1✔
49
        var r1 error
1✔
50
        if rf, ok := ret.Get(0).(func(context.Context, model.Integration) (*model.Integration, error)); ok {
1✔
NEW
51
                return rf(_a0, _a1)
×
NEW
52
        }
×
53
        if rf, ok := ret.Get(0).(func(context.Context, model.Integration) *model.Integration); ok {
1✔
54
                r0 = rf(_a0, _a1)
×
55
        } else {
1✔
56
                if ret.Get(0) != nil {
2✔
57
                        r0 = ret.Get(0).(*model.Integration)
1✔
58
                }
1✔
59
        }
60

61
        if rf, ok := ret.Get(1).(func(context.Context, model.Integration) error); ok {
1✔
UNCOV
62
                r1 = rf(_a0, _a1)
×
63
        } else {
1✔
64
                r1 = ret.Error(1)
1✔
65
        }
1✔
66

67
        return r0, r1
1✔
68
}
69

70
// DecommissionDevice provides a mock function with given fields: _a0, _a1
71
func (_m *App) DecommissionDevice(_a0 context.Context, _a1 string) error {
1✔
72
        ret := _m.Called(_a0, _a1)
1✔
73

1✔
74
        if len(ret) == 0 {
1✔
NEW
75
                panic("no return value specified for DecommissionDevice")
×
76
        }
77

78
        var r0 error
1✔
79
        if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
1✔
80
                r0 = rf(_a0, _a1)
×
81
        } else {
1✔
82
                r0 = ret.Error(0)
1✔
83
        }
1✔
84

85
        return r0
1✔
86
}
87

88
// DeleteTenant provides a mock function with given fields: _a0
89
func (_m *App) DeleteTenant(_a0 context.Context) error {
1✔
90
        ret := _m.Called(_a0)
1✔
91

1✔
92
        if len(ret) == 0 {
1✔
93
                panic("no return value specified for DeleteTenant")
×
94
        }
95

96
        var r0 error
1✔
97
        if rf, ok := ret.Get(0).(func(context.Context) error); ok {
1✔
98
                r0 = rf(_a0)
×
99
        } else {
1✔
100
                r0 = ret.Error(0)
1✔
101
        }
1✔
102

103
        return r0
1✔
104
}
105

106
// GetDevice provides a mock function with given fields: _a0, _a1
107
func (_m *App) GetDevice(_a0 context.Context, _a1 string) (*model.Device, error) {
1✔
108
        ret := _m.Called(_a0, _a1)
1✔
109

1✔
110
        if len(ret) == 0 {
1✔
NEW
111
                panic("no return value specified for GetDevice")
×
112
        }
113

114
        var r0 *model.Device
1✔
115
        var r1 error
1✔
116
        if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Device, error)); ok {
1✔
NEW
117
                return rf(_a0, _a1)
×
NEW
118
        }
×
119
        if rf, ok := ret.Get(0).(func(context.Context, string) *model.Device); ok {
1✔
120
                r0 = rf(_a0, _a1)
×
121
        } else {
1✔
122
                if ret.Get(0) != nil {
2✔
123
                        r0 = ret.Get(0).(*model.Device)
1✔
124
                }
1✔
125
        }
126

127
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
1✔
UNCOV
128
                r1 = rf(_a0, _a1)
×
129
        } else {
1✔
130
                r1 = ret.Error(1)
1✔
131
        }
1✔
132

133
        return r0, r1
1✔
134
}
135

136
// GetDeviceIntegrations provides a mock function with given fields: _a0, _a1
137
func (_m *App) GetDeviceIntegrations(_a0 context.Context, _a1 string) ([]model.Integration, error) {
×
138
        ret := _m.Called(_a0, _a1)
×
139

×
NEW
140
        if len(ret) == 0 {
×
NEW
141
                panic("no return value specified for GetDeviceIntegrations")
×
142
        }
143

144
        var r0 []model.Integration
×
NEW
145
        var r1 error
×
NEW
146
        if rf, ok := ret.Get(0).(func(context.Context, string) ([]model.Integration, error)); ok {
×
NEW
147
                return rf(_a0, _a1)
×
NEW
148
        }
×
149
        if rf, ok := ret.Get(0).(func(context.Context, string) []model.Integration); ok {
×
150
                r0 = rf(_a0, _a1)
×
151
        } else {
×
152
                if ret.Get(0) != nil {
×
153
                        r0 = ret.Get(0).([]model.Integration)
×
154
                }
×
155
        }
156

157
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
158
                r1 = rf(_a0, _a1)
×
159
        } else {
×
160
                r1 = ret.Error(1)
×
161
        }
×
162

163
        return r0, r1
×
164
}
165

166
// GetDeviceStateIntegration provides a mock function with given fields: _a0, _a1, _a2
167
func (_m *App) GetDeviceStateIntegration(_a0 context.Context, _a1 string, _a2 uuid.UUID) (*model.DeviceState, error) {
1✔
168
        ret := _m.Called(_a0, _a1, _a2)
1✔
169

1✔
170
        if len(ret) == 0 {
1✔
NEW
171
                panic("no return value specified for GetDeviceStateIntegration")
×
172
        }
173

174
        var r0 *model.DeviceState
1✔
175
        var r1 error
1✔
176
        if rf, ok := ret.Get(0).(func(context.Context, string, uuid.UUID) (*model.DeviceState, error)); ok {
1✔
NEW
177
                return rf(_a0, _a1, _a2)
×
NEW
178
        }
×
179
        if rf, ok := ret.Get(0).(func(context.Context, string, uuid.UUID) *model.DeviceState); ok {
1✔
180
                r0 = rf(_a0, _a1, _a2)
×
181
        } else {
1✔
182
                if ret.Get(0) != nil {
2✔
183
                        r0 = ret.Get(0).(*model.DeviceState)
1✔
184
                }
1✔
185
        }
186

187
        if rf, ok := ret.Get(1).(func(context.Context, string, uuid.UUID) error); ok {
1✔
UNCOV
188
                r1 = rf(_a0, _a1, _a2)
×
189
        } else {
1✔
190
                r1 = ret.Error(1)
1✔
191
        }
1✔
192

193
        return r0, r1
1✔
194
}
195

196
// GetDeviceStateIoTCore provides a mock function with given fields: _a0, _a1, _a2
197
func (_m *App) GetDeviceStateIoTCore(_a0 context.Context, _a1 string, _a2 *model.Integration) (*model.DeviceState, error) {
×
198
        ret := _m.Called(_a0, _a1, _a2)
×
199

×
NEW
200
        if len(ret) == 0 {
×
NEW
201
                panic("no return value specified for GetDeviceStateIoTCore")
×
202
        }
203

204
        var r0 *model.DeviceState
×
NEW
205
        var r1 error
×
NEW
206
        if rf, ok := ret.Get(0).(func(context.Context, string, *model.Integration) (*model.DeviceState, error)); ok {
×
NEW
207
                return rf(_a0, _a1, _a2)
×
NEW
208
        }
×
209
        if rf, ok := ret.Get(0).(func(context.Context, string, *model.Integration) *model.DeviceState); ok {
×
210
                r0 = rf(_a0, _a1, _a2)
×
211
        } else {
×
212
                if ret.Get(0) != nil {
×
213
                        r0 = ret.Get(0).(*model.DeviceState)
×
214
                }
×
215
        }
216

217
        if rf, ok := ret.Get(1).(func(context.Context, string, *model.Integration) error); ok {
×
218
                r1 = rf(_a0, _a1, _a2)
×
219
        } else {
×
220
                r1 = ret.Error(1)
×
221
        }
×
222

223
        return r0, r1
×
224
}
225

226
// GetDeviceStateIoTHub provides a mock function with given fields: _a0, _a1, _a2
227
func (_m *App) GetDeviceStateIoTHub(_a0 context.Context, _a1 string, _a2 *model.Integration) (*model.DeviceState, error) {
×
228
        ret := _m.Called(_a0, _a1, _a2)
×
229

×
NEW
230
        if len(ret) == 0 {
×
NEW
231
                panic("no return value specified for GetDeviceStateIoTHub")
×
232
        }
233

234
        var r0 *model.DeviceState
×
NEW
235
        var r1 error
×
NEW
236
        if rf, ok := ret.Get(0).(func(context.Context, string, *model.Integration) (*model.DeviceState, error)); ok {
×
NEW
237
                return rf(_a0, _a1, _a2)
×
NEW
238
        }
×
239
        if rf, ok := ret.Get(0).(func(context.Context, string, *model.Integration) *model.DeviceState); ok {
×
240
                r0 = rf(_a0, _a1, _a2)
×
241
        } else {
×
242
                if ret.Get(0) != nil {
×
243
                        r0 = ret.Get(0).(*model.DeviceState)
×
244
                }
×
245
        }
246

247
        if rf, ok := ret.Get(1).(func(context.Context, string, *model.Integration) error); ok {
×
248
                r1 = rf(_a0, _a1, _a2)
×
249
        } else {
×
250
                r1 = ret.Error(1)
×
251
        }
×
252

253
        return r0, r1
×
254
}
255

256
// GetEvents provides a mock function with given fields: ctx, filter
257
func (_m *App) GetEvents(ctx context.Context, filter model.EventsFilter) ([]model.Event, error) {
1✔
258
        ret := _m.Called(ctx, filter)
1✔
259

1✔
260
        if len(ret) == 0 {
1✔
NEW
261
                panic("no return value specified for GetEvents")
×
262
        }
263

264
        var r0 []model.Event
1✔
265
        var r1 error
1✔
266
        if rf, ok := ret.Get(0).(func(context.Context, model.EventsFilter) ([]model.Event, error)); ok {
1✔
NEW
267
                return rf(ctx, filter)
×
NEW
268
        }
×
269
        if rf, ok := ret.Get(0).(func(context.Context, model.EventsFilter) []model.Event); ok {
1✔
270
                r0 = rf(ctx, filter)
×
271
        } else {
1✔
272
                if ret.Get(0) != nil {
2✔
273
                        r0 = ret.Get(0).([]model.Event)
1✔
274
                }
1✔
275
        }
276

277
        if rf, ok := ret.Get(1).(func(context.Context, model.EventsFilter) error); ok {
1✔
UNCOV
278
                r1 = rf(ctx, filter)
×
279
        } else {
1✔
280
                r1 = ret.Error(1)
1✔
281
        }
1✔
282

283
        return r0, r1
1✔
284
}
285

286
// GetIntegrationById provides a mock function with given fields: _a0, _a1
287
func (_m *App) GetIntegrationById(_a0 context.Context, _a1 uuid.UUID) (*model.Integration, error) {
1✔
288
        ret := _m.Called(_a0, _a1)
1✔
289

1✔
290
        if len(ret) == 0 {
1✔
NEW
291
                panic("no return value specified for GetIntegrationById")
×
292
        }
293

294
        var r0 *model.Integration
1✔
295
        var r1 error
1✔
296
        if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) (*model.Integration, error)); ok {
1✔
NEW
297
                return rf(_a0, _a1)
×
NEW
298
        }
×
299
        if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) *model.Integration); ok {
1✔
300
                r0 = rf(_a0, _a1)
×
301
        } else {
1✔
302
                if ret.Get(0) != nil {
2✔
303
                        r0 = ret.Get(0).(*model.Integration)
1✔
304
                }
1✔
305
        }
306

307
        if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok {
1✔
UNCOV
308
                r1 = rf(_a0, _a1)
×
309
        } else {
1✔
310
                r1 = ret.Error(1)
1✔
311
        }
1✔
312

313
        return r0, r1
1✔
314
}
315

316
// GetIntegrations provides a mock function with given fields: _a0
317
func (_m *App) GetIntegrations(_a0 context.Context) ([]model.Integration, error) {
1✔
318
        ret := _m.Called(_a0)
1✔
319

1✔
320
        if len(ret) == 0 {
1✔
NEW
321
                panic("no return value specified for GetIntegrations")
×
322
        }
323

324
        var r0 []model.Integration
1✔
325
        var r1 error
1✔
326
        if rf, ok := ret.Get(0).(func(context.Context) ([]model.Integration, error)); ok {
1✔
NEW
327
                return rf(_a0)
×
NEW
328
        }
×
329
        if rf, ok := ret.Get(0).(func(context.Context) []model.Integration); ok {
1✔
330
                r0 = rf(_a0)
×
331
        } else {
1✔
332
                if ret.Get(0) != nil {
2✔
333
                        r0 = ret.Get(0).([]model.Integration)
1✔
334
                }
1✔
335
        }
336

337
        if rf, ok := ret.Get(1).(func(context.Context) error); ok {
1✔
UNCOV
338
                r1 = rf(_a0)
×
339
        } else {
1✔
340
                r1 = ret.Error(1)
1✔
341
        }
1✔
342

343
        return r0, r1
1✔
344
}
345

346
// HealthCheck provides a mock function with given fields: _a0
347
func (_m *App) HealthCheck(_a0 context.Context) error {
1✔
348
        ret := _m.Called(_a0)
1✔
349

1✔
350
        if len(ret) == 0 {
1✔
NEW
351
                panic("no return value specified for HealthCheck")
×
352
        }
353

354
        var r0 error
1✔
355
        if rf, ok := ret.Get(0).(func(context.Context) error); ok {
1✔
356
                r0 = rf(_a0)
×
357
        } else {
1✔
358
                r0 = ret.Error(0)
1✔
359
        }
1✔
360

361
        return r0
1✔
362
}
363

364
// ProvisionDevice provides a mock function with given fields: _a0, _a1
365
func (_m *App) ProvisionDevice(_a0 context.Context, _a1 model.DeviceEvent) error {
1✔
366
        ret := _m.Called(_a0, _a1)
1✔
367

1✔
368
        if len(ret) == 0 {
1✔
NEW
369
                panic("no return value specified for ProvisionDevice")
×
370
        }
371

372
        var r0 error
1✔
373
        if rf, ok := ret.Get(0).(func(context.Context, model.DeviceEvent) error); ok {
1✔
374
                r0 = rf(_a0, _a1)
×
375
        } else {
1✔
376
                r0 = ret.Error(0)
1✔
377
        }
1✔
378

379
        return r0
1✔
380
}
381

382
// RemoveIntegration provides a mock function with given fields: _a0, _a1
383
func (_m *App) RemoveIntegration(_a0 context.Context, _a1 uuid.UUID) error {
1✔
384
        ret := _m.Called(_a0, _a1)
1✔
385

1✔
386
        if len(ret) == 0 {
1✔
NEW
387
                panic("no return value specified for RemoveIntegration")
×
388
        }
389

390
        var r0 error
1✔
391
        if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) error); ok {
1✔
392
                r0 = rf(_a0, _a1)
×
393
        } else {
1✔
394
                r0 = ret.Error(0)
1✔
395
        }
1✔
396

397
        return r0
1✔
398
}
399

400
// SetDeviceStateIntegration provides a mock function with given fields: _a0, _a1, _a2, _a3
401
func (_m *App) SetDeviceStateIntegration(_a0 context.Context, _a1 string, _a2 uuid.UUID, _a3 *model.DeviceState) (*model.DeviceState, error) {
1✔
402
        ret := _m.Called(_a0, _a1, _a2, _a3)
1✔
403

1✔
404
        if len(ret) == 0 {
1✔
NEW
405
                panic("no return value specified for SetDeviceStateIntegration")
×
406
        }
407

408
        var r0 *model.DeviceState
1✔
409
        var r1 error
1✔
410
        if rf, ok := ret.Get(0).(func(context.Context, string, uuid.UUID, *model.DeviceState) (*model.DeviceState, error)); ok {
1✔
NEW
411
                return rf(_a0, _a1, _a2, _a3)
×
NEW
412
        }
×
413
        if rf, ok := ret.Get(0).(func(context.Context, string, uuid.UUID, *model.DeviceState) *model.DeviceState); ok {
1✔
414
                r0 = rf(_a0, _a1, _a2, _a3)
×
415
        } else {
1✔
416
                if ret.Get(0) != nil {
2✔
417
                        r0 = ret.Get(0).(*model.DeviceState)
1✔
418
                }
1✔
419
        }
420

421
        if rf, ok := ret.Get(1).(func(context.Context, string, uuid.UUID, *model.DeviceState) error); ok {
1✔
UNCOV
422
                r1 = rf(_a0, _a1, _a2, _a3)
×
423
        } else {
1✔
424
                r1 = ret.Error(1)
1✔
425
        }
1✔
426

427
        return r0, r1
1✔
428
}
429

430
// SetDeviceStateIoTCore provides a mock function with given fields: _a0, _a1, _a2, _a3
431
func (_m *App) SetDeviceStateIoTCore(_a0 context.Context, _a1 string, _a2 *model.Integration, _a3 *model.DeviceState) (*model.DeviceState, error) {
×
432
        ret := _m.Called(_a0, _a1, _a2, _a3)
×
433

×
NEW
434
        if len(ret) == 0 {
×
NEW
435
                panic("no return value specified for SetDeviceStateIoTCore")
×
436
        }
437

438
        var r0 *model.DeviceState
×
NEW
439
        var r1 error
×
NEW
440
        if rf, ok := ret.Get(0).(func(context.Context, string, *model.Integration, *model.DeviceState) (*model.DeviceState, error)); ok {
×
NEW
441
                return rf(_a0, _a1, _a2, _a3)
×
NEW
442
        }
×
443
        if rf, ok := ret.Get(0).(func(context.Context, string, *model.Integration, *model.DeviceState) *model.DeviceState); ok {
×
444
                r0 = rf(_a0, _a1, _a2, _a3)
×
445
        } else {
×
446
                if ret.Get(0) != nil {
×
447
                        r0 = ret.Get(0).(*model.DeviceState)
×
448
                }
×
449
        }
450

451
        if rf, ok := ret.Get(1).(func(context.Context, string, *model.Integration, *model.DeviceState) error); ok {
×
452
                r1 = rf(_a0, _a1, _a2, _a3)
×
453
        } else {
×
454
                r1 = ret.Error(1)
×
455
        }
×
456

457
        return r0, r1
×
458
}
459

460
// SetDeviceStateIoTHub provides a mock function with given fields: _a0, _a1, _a2, _a3
461
func (_m *App) SetDeviceStateIoTHub(_a0 context.Context, _a1 string, _a2 *model.Integration, _a3 *model.DeviceState) (*model.DeviceState, error) {
×
462
        ret := _m.Called(_a0, _a1, _a2, _a3)
×
463

×
NEW
464
        if len(ret) == 0 {
×
NEW
465
                panic("no return value specified for SetDeviceStateIoTHub")
×
466
        }
467

468
        var r0 *model.DeviceState
×
NEW
469
        var r1 error
×
NEW
470
        if rf, ok := ret.Get(0).(func(context.Context, string, *model.Integration, *model.DeviceState) (*model.DeviceState, error)); ok {
×
NEW
471
                return rf(_a0, _a1, _a2, _a3)
×
NEW
472
        }
×
473
        if rf, ok := ret.Get(0).(func(context.Context, string, *model.Integration, *model.DeviceState) *model.DeviceState); ok {
×
474
                r0 = rf(_a0, _a1, _a2, _a3)
×
475
        } else {
×
476
                if ret.Get(0) != nil {
×
477
                        r0 = ret.Get(0).(*model.DeviceState)
×
478
                }
×
479
        }
480

481
        if rf, ok := ret.Get(1).(func(context.Context, string, *model.Integration, *model.DeviceState) error); ok {
×
482
                r1 = rf(_a0, _a1, _a2, _a3)
×
483
        } else {
×
484
                r1 = ret.Error(1)
×
485
        }
×
486

487
        return r0, r1
×
488
}
489

490
// SetDeviceStatus provides a mock function with given fields: _a0, _a1, _a2
491
func (_m *App) SetDeviceStatus(_a0 context.Context, _a1 string, _a2 model.Status) error {
1✔
492
        ret := _m.Called(_a0, _a1, _a2)
1✔
493

1✔
494
        if len(ret) == 0 {
1✔
NEW
495
                panic("no return value specified for SetDeviceStatus")
×
496
        }
497

498
        var r0 error
1✔
499
        if rf, ok := ret.Get(0).(func(context.Context, string, model.Status) error); ok {
1✔
500
                r0 = rf(_a0, _a1, _a2)
×
501
        } else {
1✔
502
                r0 = ret.Error(0)
1✔
503
        }
1✔
504

505
        return r0
1✔
506
}
507

508
// SetIntegrationCredentials provides a mock function with given fields: _a0, _a1, _a2
509
func (_m *App) SetIntegrationCredentials(_a0 context.Context, _a1 uuid.UUID, _a2 model.Credentials) error {
1✔
510
        ret := _m.Called(_a0, _a1, _a2)
1✔
511

1✔
512
        if len(ret) == 0 {
1✔
NEW
513
                panic("no return value specified for SetIntegrationCredentials")
×
514
        }
515

516
        var r0 error
1✔
517
        if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, model.Credentials) error); ok {
1✔
518
                r0 = rf(_a0, _a1, _a2)
×
519
        } else {
1✔
520
                r0 = ret.Error(0)
1✔
521
        }
1✔
522

523
        return r0
1✔
524
}
525

526
// SyncDevices provides a mock function with given fields: _a0, _a1, _a2
527
func (_m *App) SyncDevices(_a0 context.Context, _a1 int, _a2 bool) error {
×
528
        ret := _m.Called(_a0, _a1, _a2)
×
529

×
NEW
530
        if len(ret) == 0 {
×
NEW
531
                panic("no return value specified for SyncDevices")
×
532
        }
533

534
        var r0 error
×
535
        if rf, ok := ret.Get(0).(func(context.Context, int, bool) error); ok {
×
536
                r0 = rf(_a0, _a1, _a2)
×
537
        } else {
×
538
                r0 = ret.Error(0)
×
539
        }
×
540

541
        return r0
×
542
}
543

544
// VerifyDeviceTwin provides a mock function with given fields: ctx, req
545
func (_m *App) VerifyDeviceTwin(ctx context.Context, req model.PreauthRequest) error {
1✔
546
        ret := _m.Called(ctx, req)
1✔
547

1✔
548
        if len(ret) == 0 {
1✔
NEW
549
                panic("no return value specified for VerifyDeviceTwin")
×
550
        }
551

552
        var r0 error
1✔
553
        if rf, ok := ret.Get(0).(func(context.Context, model.PreauthRequest) error); ok {
1✔
554
                r0 = rf(ctx, req)
×
555
        } else {
1✔
556
                r0 = ret.Error(0)
1✔
557
        }
1✔
558

559
        return r0
1✔
560
}
561

562
// WithIoTCore provides a mock function with given fields: client
563
func (_m *App) WithIoTCore(client iotcore.Client) app.App {
×
564
        ret := _m.Called(client)
×
565

×
NEW
566
        if len(ret) == 0 {
×
NEW
567
                panic("no return value specified for WithIoTCore")
×
568
        }
569

570
        var r0 app.App
×
571
        if rf, ok := ret.Get(0).(func(iotcore.Client) app.App); ok {
×
572
                r0 = rf(client)
×
573
        } else {
×
574
                if ret.Get(0) != nil {
×
575
                        r0 = ret.Get(0).(app.App)
×
576
                }
×
577
        }
578

579
        return r0
×
580
}
581

582
// WithIoTHub provides a mock function with given fields: client
583
func (_m *App) WithIoTHub(client iothub.Client) app.App {
×
584
        ret := _m.Called(client)
×
585

×
NEW
586
        if len(ret) == 0 {
×
NEW
587
                panic("no return value specified for WithIoTHub")
×
588
        }
589

590
        var r0 app.App
×
591
        if rf, ok := ret.Get(0).(func(iothub.Client) app.App); ok {
×
592
                r0 = rf(client)
×
593
        } else {
×
594
                if ret.Get(0) != nil {
×
595
                        r0 = ret.Get(0).(app.App)
×
596
                }
×
597
        }
598

599
        return r0
×
600
}
601

602
// WithWebhooksTimeout provides a mock function with given fields: timeout
603
func (_m *App) WithWebhooksTimeout(timeout uint) app.App {
×
604
        ret := _m.Called(timeout)
×
605

×
NEW
606
        if len(ret) == 0 {
×
NEW
607
                panic("no return value specified for WithWebhooksTimeout")
×
608
        }
609

610
        var r0 app.App
×
611
        if rf, ok := ret.Get(0).(func(uint) app.App); ok {
×
612
                r0 = rf(timeout)
×
613
        } else {
×
614
                if ret.Get(0) != nil {
×
615
                        r0 = ret.Get(0).(app.App)
×
616
                }
×
617
        }
618

619
        return r0
×
620
}
621

622
// NewApp creates a new instance of App. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
623
// The first argument is typically a *testing.T value.
624
func NewApp(t interface {
625
        mock.TestingT
626
        Cleanup(func())
NEW
627
}) *App {
×
NEW
628
        mock := &App{}
×
NEW
629
        mock.Mock.Test(t)
×
NEW
630

×
NEW
631
        t.Cleanup(func() { mock.AssertExpectations(t) })
×
632

NEW
633
        return mock
×
634
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc