• 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.53
/backend/services/deployments/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
        io "io"
22

23
        mock "github.com/stretchr/testify/mock"
24

25
        model "github.com/mendersoftware/mender-server/services/deployments/model"
26

27
        store "github.com/mendersoftware/mender-server/services/deployments/store"
28

29
        time "time"
30
)
31

32
// App is an autogenerated mock type for the App type
33
type App struct {
34
        mock.Mock
35
}
36

37
// AbortDeployment provides a mock function with given fields: ctx, deploymentID
38
func (_m *App) AbortDeployment(ctx context.Context, deploymentID string) error {
×
39
        ret := _m.Called(ctx, deploymentID)
×
40

×
NEW
41
        if len(ret) == 0 {
×
NEW
42
                panic("no return value specified for AbortDeployment")
×
43
        }
44

45
        var r0 error
×
46
        if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
×
47
                r0 = rf(ctx, deploymentID)
×
48
        } else {
×
49
                r0 = ret.Error(0)
×
50
        }
×
51

52
        return r0
×
53
}
54

55
// AbortDeviceDeployments provides a mock function with given fields: ctx, deviceID
56
func (_m *App) AbortDeviceDeployments(ctx context.Context, deviceID string) error {
1✔
57
        ret := _m.Called(ctx, deviceID)
1✔
58

1✔
59
        if len(ret) == 0 {
1✔
NEW
60
                panic("no return value specified for AbortDeviceDeployments")
×
61
        }
62

63
        var r0 error
1✔
64
        if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
1✔
65
                r0 = rf(ctx, deviceID)
×
66
        } else {
1✔
67
                r0 = ret.Error(0)
1✔
68
        }
1✔
69

70
        return r0
1✔
71
}
72

73
// CompleteUpload provides a mock function with given fields: ctx, intentID, skipVerify, metadata
74
func (_m *App) CompleteUpload(ctx context.Context, intentID string, skipVerify bool, metadata *model.DirectUploadMetadata) error {
1✔
75
        ret := _m.Called(ctx, intentID, skipVerify, metadata)
1✔
76

1✔
77
        if len(ret) == 0 {
1✔
NEW
78
                panic("no return value specified for CompleteUpload")
×
79
        }
80

81
        var r0 error
1✔
82
        if rf, ok := ret.Get(0).(func(context.Context, string, bool, *model.DirectUploadMetadata) error); ok {
1✔
83
                r0 = rf(ctx, intentID, skipVerify, metadata)
×
84
        } else {
1✔
85
                r0 = ret.Error(0)
1✔
86
        }
1✔
87

88
        return r0
1✔
89
}
90

91
// CreateDeployment provides a mock function with given fields: ctx, constructor
92
func (_m *App) CreateDeployment(ctx context.Context, constructor *model.DeploymentConstructor) (string, error) {
1✔
93
        ret := _m.Called(ctx, constructor)
1✔
94

1✔
95
        if len(ret) == 0 {
1✔
NEW
96
                panic("no return value specified for CreateDeployment")
×
97
        }
98

99
        var r0 string
1✔
100
        var r1 error
1✔
101
        if rf, ok := ret.Get(0).(func(context.Context, *model.DeploymentConstructor) (string, error)); ok {
1✔
NEW
102
                return rf(ctx, constructor)
×
NEW
103
        }
×
104
        if rf, ok := ret.Get(0).(func(context.Context, *model.DeploymentConstructor) string); ok {
1✔
105
                r0 = rf(ctx, constructor)
×
106
        } else {
1✔
107
                r0 = ret.Get(0).(string)
1✔
108
        }
1✔
109

110
        if rf, ok := ret.Get(1).(func(context.Context, *model.DeploymentConstructor) error); ok {
1✔
UNCOV
111
                r1 = rf(ctx, constructor)
×
112
        } else {
1✔
113
                r1 = ret.Error(1)
1✔
114
        }
1✔
115

116
        return r0, r1
1✔
117
}
118

119
// CreateDeviceConfigurationDeployment provides a mock function with given fields: ctx, constructor, deviceID, deploymentID
120
func (_m *App) CreateDeviceConfigurationDeployment(ctx context.Context, constructor *model.ConfigurationDeploymentConstructor, deviceID string, deploymentID string) (string, error) {
1✔
121
        ret := _m.Called(ctx, constructor, deviceID, deploymentID)
1✔
122

1✔
123
        if len(ret) == 0 {
1✔
NEW
124
                panic("no return value specified for CreateDeviceConfigurationDeployment")
×
125
        }
126

127
        var r0 string
1✔
128
        var r1 error
1✔
129
        if rf, ok := ret.Get(0).(func(context.Context, *model.ConfigurationDeploymentConstructor, string, string) (string, error)); ok {
1✔
NEW
130
                return rf(ctx, constructor, deviceID, deploymentID)
×
NEW
131
        }
×
132
        if rf, ok := ret.Get(0).(func(context.Context, *model.ConfigurationDeploymentConstructor, string, string) string); ok {
1✔
133
                r0 = rf(ctx, constructor, deviceID, deploymentID)
×
134
        } else {
1✔
135
                r0 = ret.Get(0).(string)
1✔
136
        }
1✔
137

138
        if rf, ok := ret.Get(1).(func(context.Context, *model.ConfigurationDeploymentConstructor, string, string) error); ok {
1✔
UNCOV
139
                r1 = rf(ctx, constructor, deviceID, deploymentID)
×
140
        } else {
1✔
141
                r1 = ret.Error(1)
1✔
142
        }
1✔
143

144
        return r0, r1
1✔
145
}
146

147
// CreateImage provides a mock function with given fields: ctx, multipartUploadMsg
148
func (_m *App) CreateImage(ctx context.Context, multipartUploadMsg *model.MultipartUploadMsg) (string, error) {
1✔
149
        ret := _m.Called(ctx, multipartUploadMsg)
1✔
150

1✔
151
        if len(ret) == 0 {
1✔
NEW
152
                panic("no return value specified for CreateImage")
×
153
        }
154

155
        var r0 string
1✔
156
        var r1 error
1✔
157
        if rf, ok := ret.Get(0).(func(context.Context, *model.MultipartUploadMsg) (string, error)); ok {
1✔
NEW
158
                return rf(ctx, multipartUploadMsg)
×
NEW
159
        }
×
160
        if rf, ok := ret.Get(0).(func(context.Context, *model.MultipartUploadMsg) string); ok {
1✔
161
                r0 = rf(ctx, multipartUploadMsg)
×
162
        } else {
1✔
163
                r0 = ret.Get(0).(string)
1✔
164
        }
1✔
165

166
        if rf, ok := ret.Get(1).(func(context.Context, *model.MultipartUploadMsg) error); ok {
1✔
UNCOV
167
                r1 = rf(ctx, multipartUploadMsg)
×
168
        } else {
1✔
169
                r1 = ret.Error(1)
1✔
170
        }
1✔
171

172
        return r0, r1
1✔
173
}
174

175
// DecommissionDevice provides a mock function with given fields: ctx, deviceID
176
func (_m *App) DecommissionDevice(ctx context.Context, deviceID string) error {
×
177
        ret := _m.Called(ctx, deviceID)
×
178

×
NEW
179
        if len(ret) == 0 {
×
NEW
180
                panic("no return value specified for DecommissionDevice")
×
181
        }
182

183
        var r0 error
×
184
        if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
×
185
                r0 = rf(ctx, deviceID)
×
186
        } else {
×
187
                r0 = ret.Error(0)
×
188
        }
×
189

190
        return r0
×
191
}
192

193
// DeleteDeviceDeploymentsHistory provides a mock function with given fields: ctx, deviceId
194
func (_m *App) DeleteDeviceDeploymentsHistory(ctx context.Context, deviceId string) error {
1✔
195
        ret := _m.Called(ctx, deviceId)
1✔
196

1✔
197
        if len(ret) == 0 {
1✔
NEW
198
                panic("no return value specified for DeleteDeviceDeploymentsHistory")
×
199
        }
200

201
        var r0 error
1✔
202
        if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
1✔
203
                r0 = rf(ctx, deviceId)
×
204
        } else {
1✔
205
                r0 = ret.Error(0)
1✔
206
        }
1✔
207

208
        return r0
1✔
209
}
210

211
// DeleteImage provides a mock function with given fields: ctx, imageID
212
func (_m *App) DeleteImage(ctx context.Context, imageID string) error {
×
213
        ret := _m.Called(ctx, imageID)
×
214

×
NEW
215
        if len(ret) == 0 {
×
NEW
216
                panic("no return value specified for DeleteImage")
×
217
        }
218

219
        var r0 error
×
220
        if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
×
221
                r0 = rf(ctx, imageID)
×
222
        } else {
×
223
                r0 = ret.Error(0)
×
224
        }
×
225

226
        return r0
×
227
}
228

229
// DeleteReleases provides a mock function with given fields: ctx, releaseNames
230
func (_m *App) DeleteReleases(ctx context.Context, releaseNames []string) ([]string, error) {
1✔
231
        ret := _m.Called(ctx, releaseNames)
1✔
232

1✔
233
        if len(ret) == 0 {
1✔
NEW
234
                panic("no return value specified for DeleteReleases")
×
235
        }
236

237
        var r0 []string
1✔
238
        var r1 error
1✔
239
        if rf, ok := ret.Get(0).(func(context.Context, []string) ([]string, error)); ok {
1✔
NEW
240
                return rf(ctx, releaseNames)
×
NEW
241
        }
×
242
        if rf, ok := ret.Get(0).(func(context.Context, []string) []string); ok {
1✔
243
                r0 = rf(ctx, releaseNames)
×
244
        } else {
1✔
245
                if ret.Get(0) != nil {
2✔
246
                        r0 = ret.Get(0).([]string)
1✔
247
                }
1✔
248
        }
249

250
        if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok {
1✔
UNCOV
251
                r1 = rf(ctx, releaseNames)
×
252
        } else {
1✔
253
                r1 = ret.Error(1)
1✔
254
        }
1✔
255

256
        return r0, r1
1✔
257
}
258

259
// DownloadLink provides a mock function with given fields: ctx, imageID, expire
260
func (_m *App) DownloadLink(ctx context.Context, imageID string, expire time.Duration) (*model.Link, error) {
×
261
        ret := _m.Called(ctx, imageID, expire)
×
262

×
NEW
263
        if len(ret) == 0 {
×
NEW
264
                panic("no return value specified for DownloadLink")
×
265
        }
266

267
        var r0 *model.Link
×
NEW
268
        var r1 error
×
NEW
269
        if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration) (*model.Link, error)); ok {
×
NEW
270
                return rf(ctx, imageID, expire)
×
NEW
271
        }
×
272
        if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration) *model.Link); ok {
×
273
                r0 = rf(ctx, imageID, expire)
×
274
        } else {
×
275
                if ret.Get(0) != nil {
×
276
                        r0 = ret.Get(0).(*model.Link)
×
277
                }
×
278
        }
279

280
        if rf, ok := ret.Get(1).(func(context.Context, string, time.Duration) error); ok {
×
281
                r1 = rf(ctx, imageID, expire)
×
282
        } else {
×
283
                r1 = ret.Error(1)
×
284
        }
×
285

286
        return r0, r1
×
287
}
288

289
// EditImage provides a mock function with given fields: ctx, id, constructorData
290
func (_m *App) EditImage(ctx context.Context, id string, constructorData *model.ImageMeta) (bool, error) {
×
291
        ret := _m.Called(ctx, id, constructorData)
×
292

×
NEW
293
        if len(ret) == 0 {
×
NEW
294
                panic("no return value specified for EditImage")
×
295
        }
296

297
        var r0 bool
×
NEW
298
        var r1 error
×
NEW
299
        if rf, ok := ret.Get(0).(func(context.Context, string, *model.ImageMeta) (bool, error)); ok {
×
NEW
300
                return rf(ctx, id, constructorData)
×
NEW
301
        }
×
302
        if rf, ok := ret.Get(0).(func(context.Context, string, *model.ImageMeta) bool); ok {
×
303
                r0 = rf(ctx, id, constructorData)
×
304
        } else {
×
305
                r0 = ret.Get(0).(bool)
×
306
        }
×
307

308
        if rf, ok := ret.Get(1).(func(context.Context, string, *model.ImageMeta) error); ok {
×
309
                r1 = rf(ctx, id, constructorData)
×
310
        } else {
×
311
                r1 = ret.Error(1)
×
312
        }
×
313

314
        return r0, r1
×
315
}
316

317
// GenerateConfigurationImage provides a mock function with given fields: ctx, deviceType, deploymentID
318
func (_m *App) GenerateConfigurationImage(ctx context.Context, deviceType string, deploymentID string) (io.Reader, error) {
1✔
319
        ret := _m.Called(ctx, deviceType, deploymentID)
1✔
320

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

325
        var r0 io.Reader
1✔
326
        var r1 error
1✔
327
        if rf, ok := ret.Get(0).(func(context.Context, string, string) (io.Reader, error)); ok {
1✔
NEW
328
                return rf(ctx, deviceType, deploymentID)
×
NEW
329
        }
×
330
        if rf, ok := ret.Get(0).(func(context.Context, string, string) io.Reader); ok {
1✔
331
                r0 = rf(ctx, deviceType, deploymentID)
×
332
        } else {
1✔
333
                if ret.Get(0) != nil {
2✔
334
                        r0 = ret.Get(0).(io.Reader)
1✔
335
                }
1✔
336
        }
337

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

344
        return r0, r1
1✔
345
}
346

347
// GenerateImage provides a mock function with given fields: ctx, multipartUploadMsg
348
func (_m *App) GenerateImage(ctx context.Context, multipartUploadMsg *model.MultipartGenerateImageMsg) (string, error) {
1✔
349
        ret := _m.Called(ctx, multipartUploadMsg)
1✔
350

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

355
        var r0 string
1✔
356
        var r1 error
1✔
357
        if rf, ok := ret.Get(0).(func(context.Context, *model.MultipartGenerateImageMsg) (string, error)); ok {
1✔
NEW
358
                return rf(ctx, multipartUploadMsg)
×
NEW
359
        }
×
360
        if rf, ok := ret.Get(0).(func(context.Context, *model.MultipartGenerateImageMsg) string); ok {
1✔
361
                r0 = rf(ctx, multipartUploadMsg)
×
362
        } else {
1✔
363
                r0 = ret.Get(0).(string)
1✔
364
        }
1✔
365

366
        if rf, ok := ret.Get(1).(func(context.Context, *model.MultipartGenerateImageMsg) error); ok {
1✔
UNCOV
367
                r1 = rf(ctx, multipartUploadMsg)
×
368
        } else {
1✔
369
                r1 = ret.Error(1)
1✔
370
        }
1✔
371

372
        return r0, r1
1✔
373
}
374

375
// GetDeployment provides a mock function with given fields: ctx, deploymentID
376
func (_m *App) GetDeployment(ctx context.Context, deploymentID string) (*model.Deployment, error) {
×
377
        ret := _m.Called(ctx, deploymentID)
×
378

×
NEW
379
        if len(ret) == 0 {
×
NEW
380
                panic("no return value specified for GetDeployment")
×
381
        }
382

383
        var r0 *model.Deployment
×
NEW
384
        var r1 error
×
NEW
385
        if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Deployment, error)); ok {
×
NEW
386
                return rf(ctx, deploymentID)
×
NEW
387
        }
×
388
        if rf, ok := ret.Get(0).(func(context.Context, string) *model.Deployment); ok {
×
389
                r0 = rf(ctx, deploymentID)
×
390
        } else {
×
391
                if ret.Get(0) != nil {
×
392
                        r0 = ret.Get(0).(*model.Deployment)
×
393
                }
×
394
        }
395

396
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
397
                r1 = rf(ctx, deploymentID)
×
398
        } else {
×
399
                r1 = ret.Error(1)
×
400
        }
×
401

402
        return r0, r1
×
403
}
404

405
// GetDeploymentForDeviceWithCurrent provides a mock function with given fields: ctx, deviceID, request
406
func (_m *App) GetDeploymentForDeviceWithCurrent(ctx context.Context, deviceID string, request *model.DeploymentNextRequest) (*model.DeploymentInstructions, error) {
1✔
407
        ret := _m.Called(ctx, deviceID, request)
1✔
408

1✔
409
        if len(ret) == 0 {
1✔
NEW
410
                panic("no return value specified for GetDeploymentForDeviceWithCurrent")
×
411
        }
412

413
        var r0 *model.DeploymentInstructions
1✔
414
        var r1 error
1✔
415
        if rf, ok := ret.Get(0).(func(context.Context, string, *model.DeploymentNextRequest) (*model.DeploymentInstructions, error)); ok {
1✔
NEW
416
                return rf(ctx, deviceID, request)
×
NEW
417
        }
×
418
        if rf, ok := ret.Get(0).(func(context.Context, string, *model.DeploymentNextRequest) *model.DeploymentInstructions); ok {
1✔
419
                r0 = rf(ctx, deviceID, request)
×
420
        } else {
1✔
421
                if ret.Get(0) != nil {
2✔
422
                        r0 = ret.Get(0).(*model.DeploymentInstructions)
1✔
423
                }
1✔
424
        }
425

426
        if rf, ok := ret.Get(1).(func(context.Context, string, *model.DeploymentNextRequest) error); ok {
1✔
UNCOV
427
                r1 = rf(ctx, deviceID, request)
×
428
        } else {
1✔
429
                r1 = ret.Error(1)
1✔
430
        }
1✔
431

432
        return r0, r1
1✔
433
}
434

435
// GetDeploymentStats provides a mock function with given fields: ctx, deploymentID
436
func (_m *App) GetDeploymentStats(ctx context.Context, deploymentID string) (model.Stats, error) {
×
437
        ret := _m.Called(ctx, deploymentID)
×
438

×
NEW
439
        if len(ret) == 0 {
×
NEW
440
                panic("no return value specified for GetDeploymentStats")
×
441
        }
442

443
        var r0 model.Stats
×
NEW
444
        var r1 error
×
NEW
445
        if rf, ok := ret.Get(0).(func(context.Context, string) (model.Stats, error)); ok {
×
NEW
446
                return rf(ctx, deploymentID)
×
NEW
447
        }
×
448
        if rf, ok := ret.Get(0).(func(context.Context, string) model.Stats); ok {
×
449
                r0 = rf(ctx, deploymentID)
×
450
        } else {
×
451
                if ret.Get(0) != nil {
×
452
                        r0 = ret.Get(0).(model.Stats)
×
453
                }
×
454
        }
455

456
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
457
                r1 = rf(ctx, deploymentID)
×
458
        } else {
×
459
                r1 = ret.Error(1)
×
460
        }
×
461

462
        return r0, r1
×
463
}
464

465
// GetDeploymentsStats provides a mock function with given fields: ctx, deploymentIDs
466
func (_m *App) GetDeploymentsStats(ctx context.Context, deploymentIDs ...string) ([]*model.DeploymentStats, error) {
1✔
467
        _va := make([]interface{}, len(deploymentIDs))
1✔
468
        for _i := range deploymentIDs {
2✔
469
                _va[_i] = deploymentIDs[_i]
1✔
470
        }
1✔
471
        var _ca []interface{}
1✔
472
        _ca = append(_ca, ctx)
1✔
473
        _ca = append(_ca, _va...)
1✔
474
        ret := _m.Called(_ca...)
1✔
475

1✔
476
        if len(ret) == 0 {
1✔
NEW
477
                panic("no return value specified for GetDeploymentsStats")
×
478
        }
479

480
        var r0 []*model.DeploymentStats
1✔
481
        var r1 error
1✔
482
        if rf, ok := ret.Get(0).(func(context.Context, ...string) ([]*model.DeploymentStats, error)); ok {
1✔
NEW
483
                return rf(ctx, deploymentIDs...)
×
NEW
484
        }
×
485
        if rf, ok := ret.Get(0).(func(context.Context, ...string) []*model.DeploymentStats); ok {
1✔
486
                r0 = rf(ctx, deploymentIDs...)
×
487
        } else {
1✔
488
                if ret.Get(0) != nil {
2✔
489
                        r0 = ret.Get(0).([]*model.DeploymentStats)
1✔
490
                }
1✔
491
        }
492

493
        if rf, ok := ret.Get(1).(func(context.Context, ...string) error); ok {
1✔
UNCOV
494
                r1 = rf(ctx, deploymentIDs...)
×
495
        } else {
1✔
496
                r1 = ret.Error(1)
1✔
497
        }
1✔
498

499
        return r0, r1
1✔
500
}
501

502
// GetDeviceDeploymentLastStatus provides a mock function with given fields: ctx, devicesIds
503
func (_m *App) GetDeviceDeploymentLastStatus(ctx context.Context, devicesIds []string) (model.DeviceDeploymentLastStatuses, error) {
1✔
504
        ret := _m.Called(ctx, devicesIds)
1✔
505

1✔
506
        if len(ret) == 0 {
1✔
NEW
507
                panic("no return value specified for GetDeviceDeploymentLastStatus")
×
508
        }
509

510
        var r0 model.DeviceDeploymentLastStatuses
1✔
511
        var r1 error
1✔
512
        if rf, ok := ret.Get(0).(func(context.Context, []string) (model.DeviceDeploymentLastStatuses, error)); ok {
1✔
NEW
513
                return rf(ctx, devicesIds)
×
NEW
514
        }
×
515
        if rf, ok := ret.Get(0).(func(context.Context, []string) model.DeviceDeploymentLastStatuses); ok {
1✔
516
                r0 = rf(ctx, devicesIds)
×
517
        } else {
1✔
518
                r0 = ret.Get(0).(model.DeviceDeploymentLastStatuses)
1✔
519
        }
1✔
520

521
        if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok {
1✔
UNCOV
522
                r1 = rf(ctx, devicesIds)
×
523
        } else {
1✔
524
                r1 = ret.Error(1)
1✔
525
        }
1✔
526

527
        return r0, r1
1✔
528
}
529

530
// GetDeviceDeploymentListForDevice provides a mock function with given fields: ctx, query
531
func (_m *App) GetDeviceDeploymentListForDevice(ctx context.Context, query store.ListQueryDeviceDeployments) ([]model.DeviceDeploymentListItem, int, error) {
1✔
532
        ret := _m.Called(ctx, query)
1✔
533

1✔
534
        if len(ret) == 0 {
1✔
NEW
535
                panic("no return value specified for GetDeviceDeploymentListForDevice")
×
536
        }
537

538
        var r0 []model.DeviceDeploymentListItem
1✔
539
        var r1 int
1✔
540
        var r2 error
1✔
541
        if rf, ok := ret.Get(0).(func(context.Context, store.ListQueryDeviceDeployments) ([]model.DeviceDeploymentListItem, int, error)); ok {
1✔
NEW
542
                return rf(ctx, query)
×
NEW
543
        }
×
544
        if rf, ok := ret.Get(0).(func(context.Context, store.ListQueryDeviceDeployments) []model.DeviceDeploymentListItem); ok {
1✔
545
                r0 = rf(ctx, query)
×
546
        } else {
1✔
547
                if ret.Get(0) != nil {
2✔
548
                        r0 = ret.Get(0).([]model.DeviceDeploymentListItem)
1✔
549
                }
1✔
550
        }
551

552
        if rf, ok := ret.Get(1).(func(context.Context, store.ListQueryDeviceDeployments) int); ok {
1✔
UNCOV
553
                r1 = rf(ctx, query)
×
554
        } else {
1✔
555
                r1 = ret.Get(1).(int)
1✔
556
        }
1✔
557

558
        if rf, ok := ret.Get(2).(func(context.Context, store.ListQueryDeviceDeployments) error); ok {
1✔
UNCOV
559
                r2 = rf(ctx, query)
×
560
        } else {
1✔
561
                r2 = ret.Error(2)
1✔
562
        }
1✔
563

564
        return r0, r1, r2
1✔
565
}
566

567
// GetDeviceDeploymentLog provides a mock function with given fields: ctx, deviceID, deploymentID
568
func (_m *App) GetDeviceDeploymentLog(ctx context.Context, deviceID string, deploymentID string) (*model.DeploymentLog, error) {
×
569
        ret := _m.Called(ctx, deviceID, deploymentID)
×
570

×
NEW
571
        if len(ret) == 0 {
×
NEW
572
                panic("no return value specified for GetDeviceDeploymentLog")
×
573
        }
574

575
        var r0 *model.DeploymentLog
×
NEW
576
        var r1 error
×
NEW
577
        if rf, ok := ret.Get(0).(func(context.Context, string, string) (*model.DeploymentLog, error)); ok {
×
NEW
578
                return rf(ctx, deviceID, deploymentID)
×
NEW
579
        }
×
580
        if rf, ok := ret.Get(0).(func(context.Context, string, string) *model.DeploymentLog); ok {
×
581
                r0 = rf(ctx, deviceID, deploymentID)
×
582
        } else {
×
583
                if ret.Get(0) != nil {
×
584
                        r0 = ret.Get(0).(*model.DeploymentLog)
×
585
                }
×
586
        }
587

588
        if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
×
589
                r1 = rf(ctx, deviceID, deploymentID)
×
590
        } else {
×
591
                r1 = ret.Error(1)
×
592
        }
×
593

594
        return r0, r1
×
595
}
596

597
// GetDeviceStatusesForDeployment provides a mock function with given fields: ctx, deploymentID
598
func (_m *App) GetDeviceStatusesForDeployment(ctx context.Context, deploymentID string) ([]model.DeviceDeployment, error) {
×
599
        ret := _m.Called(ctx, deploymentID)
×
600

×
NEW
601
        if len(ret) == 0 {
×
NEW
602
                panic("no return value specified for GetDeviceStatusesForDeployment")
×
603
        }
604

605
        var r0 []model.DeviceDeployment
×
NEW
606
        var r1 error
×
NEW
607
        if rf, ok := ret.Get(0).(func(context.Context, string) ([]model.DeviceDeployment, error)); ok {
×
NEW
608
                return rf(ctx, deploymentID)
×
NEW
609
        }
×
610
        if rf, ok := ret.Get(0).(func(context.Context, string) []model.DeviceDeployment); ok {
×
611
                r0 = rf(ctx, deploymentID)
×
612
        } else {
×
613
                if ret.Get(0) != nil {
×
614
                        r0 = ret.Get(0).([]model.DeviceDeployment)
×
615
                }
×
616
        }
617

618
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
619
                r1 = rf(ctx, deploymentID)
×
620
        } else {
×
621
                r1 = ret.Error(1)
×
622
        }
×
623

624
        return r0, r1
×
625
}
626

627
// GetDevicesListForDeployment provides a mock function with given fields: ctx, query
628
func (_m *App) GetDevicesListForDeployment(ctx context.Context, query store.ListQuery) ([]model.DeviceDeployment, int, error) {
×
629
        ret := _m.Called(ctx, query)
×
630

×
NEW
631
        if len(ret) == 0 {
×
NEW
632
                panic("no return value specified for GetDevicesListForDeployment")
×
633
        }
634

635
        var r0 []model.DeviceDeployment
×
NEW
636
        var r1 int
×
NEW
637
        var r2 error
×
NEW
638
        if rf, ok := ret.Get(0).(func(context.Context, store.ListQuery) ([]model.DeviceDeployment, int, error)); ok {
×
NEW
639
                return rf(ctx, query)
×
NEW
640
        }
×
641
        if rf, ok := ret.Get(0).(func(context.Context, store.ListQuery) []model.DeviceDeployment); ok {
×
642
                r0 = rf(ctx, query)
×
643
        } else {
×
644
                if ret.Get(0) != nil {
×
645
                        r0 = ret.Get(0).([]model.DeviceDeployment)
×
646
                }
×
647
        }
648

649
        if rf, ok := ret.Get(1).(func(context.Context, store.ListQuery) int); ok {
×
650
                r1 = rf(ctx, query)
×
651
        } else {
×
652
                r1 = ret.Get(1).(int)
×
653
        }
×
654

655
        if rf, ok := ret.Get(2).(func(context.Context, store.ListQuery) error); ok {
×
656
                r2 = rf(ctx, query)
×
657
        } else {
×
658
                r2 = ret.Error(2)
×
659
        }
×
660

661
        return r0, r1, r2
×
662
}
663

664
// GetImage provides a mock function with given fields: ctx, id
665
func (_m *App) GetImage(ctx context.Context, id string) (*model.Image, error) {
×
666
        ret := _m.Called(ctx, id)
×
667

×
NEW
668
        if len(ret) == 0 {
×
NEW
669
                panic("no return value specified for GetImage")
×
670
        }
671

672
        var r0 *model.Image
×
NEW
673
        var r1 error
×
NEW
674
        if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Image, error)); ok {
×
NEW
675
                return rf(ctx, id)
×
NEW
676
        }
×
677
        if rf, ok := ret.Get(0).(func(context.Context, string) *model.Image); ok {
×
678
                r0 = rf(ctx, id)
×
679
        } else {
×
680
                if ret.Get(0) != nil {
×
681
                        r0 = ret.Get(0).(*model.Image)
×
682
                }
×
683
        }
684

685
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
686
                r1 = rf(ctx, id)
×
687
        } else {
×
688
                r1 = ret.Error(1)
×
689
        }
×
690

691
        return r0, r1
×
692
}
693

694
// GetLimit provides a mock function with given fields: ctx, name
695
func (_m *App) GetLimit(ctx context.Context, name string) (*model.Limit, error) {
1✔
696
        ret := _m.Called(ctx, name)
1✔
697

1✔
698
        if len(ret) == 0 {
1✔
NEW
699
                panic("no return value specified for GetLimit")
×
700
        }
701

702
        var r0 *model.Limit
1✔
703
        var r1 error
1✔
704
        if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Limit, error)); ok {
1✔
NEW
705
                return rf(ctx, name)
×
NEW
706
        }
×
707
        if rf, ok := ret.Get(0).(func(context.Context, string) *model.Limit); ok {
1✔
708
                r0 = rf(ctx, name)
×
709
        } else {
1✔
710
                if ret.Get(0) != nil {
2✔
711
                        r0 = ret.Get(0).(*model.Limit)
1✔
712
                }
1✔
713
        }
714

715
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
1✔
UNCOV
716
                r1 = rf(ctx, name)
×
717
        } else {
1✔
718
                r1 = ret.Error(1)
1✔
719
        }
1✔
720

721
        return r0, r1
1✔
722
}
723

724
// GetReleasesUpdateTypes provides a mock function with given fields: ctx
725
func (_m *App) GetReleasesUpdateTypes(ctx context.Context) ([]string, error) {
1✔
726
        ret := _m.Called(ctx)
1✔
727

1✔
728
        if len(ret) == 0 {
1✔
NEW
729
                panic("no return value specified for GetReleasesUpdateTypes")
×
730
        }
731

732
        var r0 []string
1✔
733
        var r1 error
1✔
734
        if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
1✔
NEW
735
                return rf(ctx)
×
NEW
736
        }
×
737
        if rf, ok := ret.Get(0).(func(context.Context) []string); ok {
1✔
738
                r0 = rf(ctx)
×
739
        } else {
1✔
740
                if ret.Get(0) != nil {
2✔
741
                        r0 = ret.Get(0).([]string)
1✔
742
                }
1✔
743
        }
744

745
        if rf, ok := ret.Get(1).(func(context.Context) error); ok {
1✔
UNCOV
746
                r1 = rf(ctx)
×
747
        } else {
1✔
748
                r1 = ret.Error(1)
1✔
749
        }
1✔
750

751
        return r0, r1
1✔
752
}
753

754
// GetStorageSettings provides a mock function with given fields: ctx
755
func (_m *App) GetStorageSettings(ctx context.Context) (*model.StorageSettings, error) {
1✔
756
        ret := _m.Called(ctx)
1✔
757

1✔
758
        if len(ret) == 0 {
1✔
NEW
759
                panic("no return value specified for GetStorageSettings")
×
760
        }
761

762
        var r0 *model.StorageSettings
1✔
763
        var r1 error
1✔
764
        if rf, ok := ret.Get(0).(func(context.Context) (*model.StorageSettings, error)); ok {
1✔
NEW
765
                return rf(ctx)
×
NEW
766
        }
×
767
        if rf, ok := ret.Get(0).(func(context.Context) *model.StorageSettings); ok {
1✔
768
                r0 = rf(ctx)
×
769
        } else {
1✔
770
                if ret.Get(0) != nil {
2✔
771
                        r0 = ret.Get(0).(*model.StorageSettings)
1✔
772
                }
1✔
773
        }
774

775
        if rf, ok := ret.Get(1).(func(context.Context) error); ok {
1✔
UNCOV
776
                r1 = rf(ctx)
×
777
        } else {
1✔
778
                r1 = ret.Error(1)
1✔
779
        }
1✔
780

781
        return r0, r1
1✔
782
}
783

784
// HasDeploymentForDevice provides a mock function with given fields: ctx, deploymentID, deviceID
785
func (_m *App) HasDeploymentForDevice(ctx context.Context, deploymentID string, deviceID string) (bool, error) {
×
786
        ret := _m.Called(ctx, deploymentID, deviceID)
×
787

×
NEW
788
        if len(ret) == 0 {
×
NEW
789
                panic("no return value specified for HasDeploymentForDevice")
×
790
        }
791

792
        var r0 bool
×
NEW
793
        var r1 error
×
NEW
794
        if rf, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok {
×
NEW
795
                return rf(ctx, deploymentID, deviceID)
×
NEW
796
        }
×
797
        if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok {
×
798
                r0 = rf(ctx, deploymentID, deviceID)
×
799
        } else {
×
800
                r0 = ret.Get(0).(bool)
×
801
        }
×
802

803
        if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
×
804
                r1 = rf(ctx, deploymentID, deviceID)
×
805
        } else {
×
806
                r1 = ret.Error(1)
×
807
        }
×
808

809
        return r0, r1
×
810
}
811

812
// HealthCheck provides a mock function with given fields: ctx
813
func (_m *App) HealthCheck(ctx context.Context) error {
1✔
814
        ret := _m.Called(ctx)
1✔
815

1✔
816
        if len(ret) == 0 {
1✔
NEW
817
                panic("no return value specified for HealthCheck")
×
818
        }
819

820
        var r0 error
1✔
821
        if rf, ok := ret.Get(0).(func(context.Context) error); ok {
1✔
822
                r0 = rf(ctx)
×
823
        } else {
1✔
824
                r0 = ret.Error(0)
1✔
825
        }
1✔
826

827
        return r0
1✔
828
}
829

830
// IsDeploymentFinished provides a mock function with given fields: ctx, deploymentID
831
func (_m *App) IsDeploymentFinished(ctx context.Context, deploymentID string) (bool, error) {
×
832
        ret := _m.Called(ctx, deploymentID)
×
833

×
NEW
834
        if len(ret) == 0 {
×
NEW
835
                panic("no return value specified for IsDeploymentFinished")
×
836
        }
837

838
        var r0 bool
×
NEW
839
        var r1 error
×
NEW
840
        if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
×
NEW
841
                return rf(ctx, deploymentID)
×
NEW
842
        }
×
843
        if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
×
844
                r0 = rf(ctx, deploymentID)
×
845
        } else {
×
846
                r0 = ret.Get(0).(bool)
×
847
        }
×
848

849
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
850
                r1 = rf(ctx, deploymentID)
×
851
        } else {
×
852
                r1 = ret.Error(1)
×
853
        }
×
854

855
        return r0, r1
×
856
}
857

858
// ListImages provides a mock function with given fields: ctx, filters
859
func (_m *App) ListImages(ctx context.Context, filters *model.ReleaseOrImageFilter) ([]*model.Image, int, error) {
1✔
860
        ret := _m.Called(ctx, filters)
1✔
861

1✔
862
        if len(ret) == 0 {
1✔
NEW
863
                panic("no return value specified for ListImages")
×
864
        }
865

866
        var r0 []*model.Image
1✔
867
        var r1 int
1✔
868
        var r2 error
1✔
869
        if rf, ok := ret.Get(0).(func(context.Context, *model.ReleaseOrImageFilter) ([]*model.Image, int, error)); ok {
1✔
NEW
870
                return rf(ctx, filters)
×
NEW
871
        }
×
872
        if rf, ok := ret.Get(0).(func(context.Context, *model.ReleaseOrImageFilter) []*model.Image); ok {
1✔
873
                r0 = rf(ctx, filters)
×
874
        } else {
1✔
875
                if ret.Get(0) != nil {
2✔
876
                        r0 = ret.Get(0).([]*model.Image)
1✔
877
                }
1✔
878
        }
879

880
        if rf, ok := ret.Get(1).(func(context.Context, *model.ReleaseOrImageFilter) int); ok {
1✔
UNCOV
881
                r1 = rf(ctx, filters)
×
882
        } else {
1✔
883
                r1 = ret.Get(1).(int)
1✔
884
        }
1✔
885

886
        if rf, ok := ret.Get(2).(func(context.Context, *model.ReleaseOrImageFilter) error); ok {
1✔
UNCOV
887
                r2 = rf(ctx, filters)
×
888
        } else {
1✔
889
                r2 = ret.Error(2)
1✔
890
        }
1✔
891

892
        return r0, r1, r2
1✔
893
}
894

895
// ListReleaseTags provides a mock function with given fields: ctx
896
func (_m *App) ListReleaseTags(ctx context.Context) (model.Tags, error) {
1✔
897
        ret := _m.Called(ctx)
1✔
898

1✔
899
        if len(ret) == 0 {
1✔
NEW
900
                panic("no return value specified for ListReleaseTags")
×
901
        }
902

903
        var r0 model.Tags
1✔
904
        var r1 error
1✔
905
        if rf, ok := ret.Get(0).(func(context.Context) (model.Tags, error)); ok {
1✔
NEW
906
                return rf(ctx)
×
NEW
907
        }
×
908
        if rf, ok := ret.Get(0).(func(context.Context) model.Tags); ok {
1✔
909
                r0 = rf(ctx)
×
910
        } else {
1✔
911
                if ret.Get(0) != nil {
2✔
912
                        r0 = ret.Get(0).(model.Tags)
1✔
913
                }
1✔
914
        }
915

916
        if rf, ok := ret.Get(1).(func(context.Context) error); ok {
1✔
UNCOV
917
                r1 = rf(ctx)
×
918
        } else {
1✔
919
                r1 = ret.Error(1)
1✔
920
        }
1✔
921

922
        return r0, r1
1✔
923
}
924

925
// LookupDeployment provides a mock function with given fields: ctx, query
926
func (_m *App) LookupDeployment(ctx context.Context, query model.Query) ([]*model.Deployment, int64, error) {
1✔
927
        ret := _m.Called(ctx, query)
1✔
928

1✔
929
        if len(ret) == 0 {
1✔
NEW
930
                panic("no return value specified for LookupDeployment")
×
931
        }
932

933
        var r0 []*model.Deployment
1✔
934
        var r1 int64
1✔
935
        var r2 error
1✔
936
        if rf, ok := ret.Get(0).(func(context.Context, model.Query) ([]*model.Deployment, int64, error)); ok {
1✔
NEW
937
                return rf(ctx, query)
×
NEW
938
        }
×
939
        if rf, ok := ret.Get(0).(func(context.Context, model.Query) []*model.Deployment); ok {
1✔
940
                r0 = rf(ctx, query)
×
941
        } else {
1✔
942
                if ret.Get(0) != nil {
2✔
943
                        r0 = ret.Get(0).([]*model.Deployment)
1✔
944
                }
1✔
945
        }
946

947
        if rf, ok := ret.Get(1).(func(context.Context, model.Query) int64); ok {
1✔
UNCOV
948
                r1 = rf(ctx, query)
×
949
        } else {
1✔
950
                r1 = ret.Get(1).(int64)
1✔
951
        }
1✔
952

953
        if rf, ok := ret.Get(2).(func(context.Context, model.Query) error); ok {
1✔
UNCOV
954
                r2 = rf(ctx, query)
×
955
        } else {
1✔
956
                r2 = ret.Error(2)
1✔
957
        }
1✔
958

959
        return r0, r1, r2
1✔
960
}
961

962
// ProvisionTenant provides a mock function with given fields: ctx, tenant_id
963
func (_m *App) ProvisionTenant(ctx context.Context, tenant_id string) error {
×
964
        ret := _m.Called(ctx, tenant_id)
×
965

×
NEW
966
        if len(ret) == 0 {
×
NEW
967
                panic("no return value specified for ProvisionTenant")
×
968
        }
969

970
        var r0 error
×
971
        if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
×
972
                r0 = rf(ctx, tenant_id)
×
973
        } else {
×
974
                r0 = ret.Error(0)
×
975
        }
×
976

977
        return r0
×
978
}
979

980
// ReplaceReleaseTags provides a mock function with given fields: ctx, releaseName, tags
981
func (_m *App) ReplaceReleaseTags(ctx context.Context, releaseName string, tags model.Tags) error {
1✔
982
        ret := _m.Called(ctx, releaseName, tags)
1✔
983

1✔
984
        if len(ret) == 0 {
1✔
NEW
985
                panic("no return value specified for ReplaceReleaseTags")
×
986
        }
987

988
        var r0 error
1✔
989
        if rf, ok := ret.Get(0).(func(context.Context, string, model.Tags) error); ok {
1✔
990
                r0 = rf(ctx, releaseName, tags)
×
991
        } else {
1✔
992
                r0 = ret.Error(0)
1✔
993
        }
1✔
994

995
        return r0
1✔
996
}
997

998
// SaveDeviceDeploymentLog provides a mock function with given fields: ctx, deviceID, deploymentID, logs
999
func (_m *App) SaveDeviceDeploymentLog(ctx context.Context, deviceID string, deploymentID string, logs []model.LogMessage) error {
×
1000
        ret := _m.Called(ctx, deviceID, deploymentID, logs)
×
1001

×
NEW
1002
        if len(ret) == 0 {
×
NEW
1003
                panic("no return value specified for SaveDeviceDeploymentLog")
×
1004
        }
1005

1006
        var r0 error
×
1007
        if rf, ok := ret.Get(0).(func(context.Context, string, string, []model.LogMessage) error); ok {
×
1008
                r0 = rf(ctx, deviceID, deploymentID, logs)
×
1009
        } else {
×
1010
                r0 = ret.Error(0)
×
1011
        }
×
1012

1013
        return r0
×
1014
}
1015

1016
// SetStorageSettings provides a mock function with given fields: ctx, storageSettings
1017
func (_m *App) SetStorageSettings(ctx context.Context, storageSettings *model.StorageSettings) error {
1✔
1018
        ret := _m.Called(ctx, storageSettings)
1✔
1019

1✔
1020
        if len(ret) == 0 {
1✔
NEW
1021
                panic("no return value specified for SetStorageSettings")
×
1022
        }
1023

1024
        var r0 error
1✔
1025
        if rf, ok := ret.Get(0).(func(context.Context, *model.StorageSettings) error); ok {
1✔
1026
                r0 = rf(ctx, storageSettings)
×
1027
        } else {
1✔
1028
                r0 = ret.Error(0)
1✔
1029
        }
1✔
1030

1031
        return r0
1✔
1032
}
1033

1034
// UpdateDeploymentsWithArtifactName provides a mock function with given fields: ctx, artifactName
1035
func (_m *App) UpdateDeploymentsWithArtifactName(ctx context.Context, artifactName string) error {
×
1036
        ret := _m.Called(ctx, artifactName)
×
1037

×
NEW
1038
        if len(ret) == 0 {
×
NEW
1039
                panic("no return value specified for UpdateDeploymentsWithArtifactName")
×
1040
        }
1041

1042
        var r0 error
×
1043
        if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
×
1044
                r0 = rf(ctx, artifactName)
×
1045
        } else {
×
1046
                r0 = ret.Error(0)
×
1047
        }
×
1048

1049
        return r0
×
1050
}
1051

1052
// UpdateDeviceDeploymentStatus provides a mock function with given fields: ctx, deploymentID, deviceID, state
1053
func (_m *App) UpdateDeviceDeploymentStatus(ctx context.Context, deploymentID string, deviceID string, state model.DeviceDeploymentState) error {
×
1054
        ret := _m.Called(ctx, deploymentID, deviceID, state)
×
1055

×
NEW
1056
        if len(ret) == 0 {
×
NEW
1057
                panic("no return value specified for UpdateDeviceDeploymentStatus")
×
1058
        }
1059

1060
        var r0 error
×
1061
        if rf, ok := ret.Get(0).(func(context.Context, string, string, model.DeviceDeploymentState) error); ok {
×
1062
                r0 = rf(ctx, deploymentID, deviceID, state)
×
1063
        } else {
×
1064
                r0 = ret.Error(0)
×
1065
        }
×
1066

1067
        return r0
×
1068
}
1069

1070
// UpdateRelease provides a mock function with given fields: ctx, releaseName, release
1071
func (_m *App) UpdateRelease(ctx context.Context, releaseName string, release model.ReleasePatch) error {
1✔
1072
        ret := _m.Called(ctx, releaseName, release)
1✔
1073

1✔
1074
        if len(ret) == 0 {
1✔
NEW
1075
                panic("no return value specified for UpdateRelease")
×
1076
        }
1077

1078
        var r0 error
1✔
1079
        if rf, ok := ret.Get(0).(func(context.Context, string, model.ReleasePatch) error); ok {
1✔
1080
                r0 = rf(ctx, releaseName, release)
×
1081
        } else {
1✔
1082
                r0 = ret.Error(0)
1✔
1083
        }
1✔
1084

1085
        return r0
1✔
1086
}
1087

1088
// UploadLink provides a mock function with given fields: ctx, expire, skipVerify
1089
func (_m *App) UploadLink(ctx context.Context, expire time.Duration, skipVerify bool) (*model.UploadLink, error) {
1✔
1090
        ret := _m.Called(ctx, expire, skipVerify)
1✔
1091

1✔
1092
        if len(ret) == 0 {
1✔
NEW
1093
                panic("no return value specified for UploadLink")
×
1094
        }
1095

1096
        var r0 *model.UploadLink
1✔
1097
        var r1 error
1✔
1098
        if rf, ok := ret.Get(0).(func(context.Context, time.Duration, bool) (*model.UploadLink, error)); ok {
1✔
NEW
1099
                return rf(ctx, expire, skipVerify)
×
NEW
1100
        }
×
1101
        if rf, ok := ret.Get(0).(func(context.Context, time.Duration, bool) *model.UploadLink); ok {
1✔
1102
                r0 = rf(ctx, expire, skipVerify)
×
1103
        } else {
1✔
1104
                if ret.Get(0) != nil {
2✔
1105
                        r0 = ret.Get(0).(*model.UploadLink)
1✔
1106
                }
1✔
1107
        }
1108

1109
        if rf, ok := ret.Get(1).(func(context.Context, time.Duration, bool) error); ok {
1✔
UNCOV
1110
                r1 = rf(ctx, expire, skipVerify)
×
1111
        } else {
1✔
1112
                r1 = ret.Error(1)
1✔
1113
        }
1✔
1114

1115
        return r0, r1
1✔
1116
}
1117

1118
// 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.
1119
// The first argument is typically a *testing.T value.
1120
func NewApp(t interface {
1121
        mock.TestingT
1122
        Cleanup(func())
NEW
1123
}) *App {
×
UNCOV
1124
        mock := &App{}
×
1125
        mock.Mock.Test(t)
×
1126

×
1127
        t.Cleanup(func() { mock.AssertExpectations(t) })
×
1128

1129
        return mock
×
1130
}
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