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

mendersoftware / mender-server / 1925715791

14 Jul 2025 02:01PM UTC coverage: 65.487% (-0.02%) from 65.504%
1925715791

Pull #790

gitlab-ci

bahaa-ghazal
feat(deployments): Implement new v2 GET `/artifacts` endpoint

Ticket: MEN-8181
Changelog: Title
Signed-off-by: Bahaa Aldeen Ghazal <bahaa.ghazal@northern.tech>
Pull Request #790: feat(deployments): Implement new v2 GET `/artifacts` endpoint

145 of 237 new or added lines in 7 files covered. (61.18%)

129 existing lines in 3 files now uncovered.

32534 of 49680 relevant lines covered (65.49%)

1.38 hits per line

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

0.0
/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

×
41
        if len(ret) == 0 {
×
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 {
×
57
        ret := _m.Called(ctx, deviceID)
×
58

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

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

70
        return r0
×
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 {
×
75
        ret := _m.Called(ctx, intentID, skipVerify, metadata)
×
76

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

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

88
        return r0
×
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) {
×
93
        ret := _m.Called(ctx, constructor)
×
94

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

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

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

116
        return r0, r1
×
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) {
×
121
        ret := _m.Called(ctx, constructor, deviceID, deploymentID)
×
122

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

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

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

144
        return r0, r1
×
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) {
×
149
        ret := _m.Called(ctx, multipartUploadMsg)
×
150

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

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

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

172
        return r0, r1
×
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

×
179
        if len(ret) == 0 {
×
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 {
×
195
        ret := _m.Called(ctx, deviceId)
×
196

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

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

208
        return r0
×
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

×
215
        if len(ret) == 0 {
×
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) {
×
231
        ret := _m.Called(ctx, releaseNames)
×
232

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

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

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

256
        return r0, r1
×
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

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

267
        var r0 *model.Link
×
268
        var r1 error
×
269
        if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration) (*model.Link, error)); ok {
×
270
                return rf(ctx, imageID, expire)
×
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

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

297
        var r0 bool
×
298
        var r1 error
×
299
        if rf, ok := ret.Get(0).(func(context.Context, string, *model.ImageMeta) (bool, error)); ok {
×
300
                return rf(ctx, id, constructorData)
×
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) {
×
319
        ret := _m.Called(ctx, deviceType, deploymentID)
×
320

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

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

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

344
        return r0, r1
×
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) {
×
349
        ret := _m.Called(ctx, multipartUploadMsg)
×
350

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

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

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

372
        return r0, r1
×
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

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

383
        var r0 *model.Deployment
×
384
        var r1 error
×
385
        if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Deployment, error)); ok {
×
386
                return rf(ctx, deploymentID)
×
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) {
×
407
        ret := _m.Called(ctx, deviceID, request)
×
408

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

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

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

432
        return r0, r1
×
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

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

443
        var r0 model.Stats
×
444
        var r1 error
×
445
        if rf, ok := ret.Get(0).(func(context.Context, string) (model.Stats, error)); ok {
×
446
                return rf(ctx, deploymentID)
×
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) {
×
467
        _va := make([]interface{}, len(deploymentIDs))
×
468
        for _i := range deploymentIDs {
×
469
                _va[_i] = deploymentIDs[_i]
×
470
        }
×
471
        var _ca []interface{}
×
472
        _ca = append(_ca, ctx)
×
473
        _ca = append(_ca, _va...)
×
474
        ret := _m.Called(_ca...)
×
475

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

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

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

499
        return r0, r1
×
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) {
×
504
        ret := _m.Called(ctx, devicesIds)
×
505

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

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

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

527
        return r0, r1
×
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) {
×
532
        ret := _m.Called(ctx, query)
×
533

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

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

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

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

564
        return r0, r1, r2
×
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

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

575
        var r0 *model.DeploymentLog
×
576
        var r1 error
×
577
        if rf, ok := ret.Get(0).(func(context.Context, string, string) (*model.DeploymentLog, error)); ok {
×
578
                return rf(ctx, deviceID, deploymentID)
×
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

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

605
        var r0 []model.DeviceDeployment
×
606
        var r1 error
×
607
        if rf, ok := ret.Get(0).(func(context.Context, string) ([]model.DeviceDeployment, error)); ok {
×
608
                return rf(ctx, deploymentID)
×
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

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

635
        var r0 []model.DeviceDeployment
×
636
        var r1 int
×
637
        var r2 error
×
638
        if rf, ok := ret.Get(0).(func(context.Context, store.ListQuery) ([]model.DeviceDeployment, int, error)); ok {
×
639
                return rf(ctx, query)
×
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

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

672
        var r0 *model.Image
×
673
        var r1 error
×
674
        if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Image, error)); ok {
×
675
                return rf(ctx, id)
×
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) {
×
696
        ret := _m.Called(ctx, name)
×
697

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

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

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

721
        return r0, r1
×
722
}
723

724
// GetRelease provides a mock function with given fields: ctx, releaseName
725
func (_m *App) GetRelease(ctx context.Context, releaseName string) (*model.Release, error) {
×
726
        ret := _m.Called(ctx, releaseName)
×
727

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

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

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

751
        return r0, r1
×
752
}
753

754
// GetReleasesUpdateTypes provides a mock function with given fields: ctx
755
func (_m *App) GetReleasesUpdateTypes(ctx context.Context) ([]string, error) {
×
756
        ret := _m.Called(ctx)
×
757

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

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

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

781
        return r0, r1
×
782
}
783

784
// GetStorageSettings provides a mock function with given fields: ctx
785
func (_m *App) GetStorageSettings(ctx context.Context) (*model.StorageSettings, error) {
×
786
        ret := _m.Called(ctx)
×
787

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

792
        var r0 *model.StorageSettings
×
793
        var r1 error
×
794
        if rf, ok := ret.Get(0).(func(context.Context) (*model.StorageSettings, error)); ok {
×
795
                return rf(ctx)
×
796
        }
×
797
        if rf, ok := ret.Get(0).(func(context.Context) *model.StorageSettings); ok {
×
798
                r0 = rf(ctx)
×
799
        } else {
×
800
                if ret.Get(0) != nil {
×
801
                        r0 = ret.Get(0).(*model.StorageSettings)
×
802
                }
×
803
        }
804

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

811
        return r0, r1
×
812
}
813

814
// HasDeploymentForDevice provides a mock function with given fields: ctx, deploymentID, deviceID
815
func (_m *App) HasDeploymentForDevice(ctx context.Context, deploymentID string, deviceID string) (bool, error) {
×
816
        ret := _m.Called(ctx, deploymentID, deviceID)
×
817

×
818
        if len(ret) == 0 {
×
819
                panic("no return value specified for HasDeploymentForDevice")
×
820
        }
821

822
        var r0 bool
×
823
        var r1 error
×
824
        if rf, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok {
×
825
                return rf(ctx, deploymentID, deviceID)
×
826
        }
×
827
        if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok {
×
828
                r0 = rf(ctx, deploymentID, deviceID)
×
829
        } else {
×
830
                r0 = ret.Get(0).(bool)
×
831
        }
×
832

833
        if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
×
834
                r1 = rf(ctx, deploymentID, deviceID)
×
835
        } else {
×
836
                r1 = ret.Error(1)
×
837
        }
×
838

839
        return r0, r1
×
840
}
841

842
// HealthCheck provides a mock function with given fields: ctx
843
func (_m *App) HealthCheck(ctx context.Context) error {
×
844
        ret := _m.Called(ctx)
×
845

×
846
        if len(ret) == 0 {
×
847
                panic("no return value specified for HealthCheck")
×
848
        }
849

850
        var r0 error
×
851
        if rf, ok := ret.Get(0).(func(context.Context) error); ok {
×
852
                r0 = rf(ctx)
×
853
        } else {
×
854
                r0 = ret.Error(0)
×
855
        }
×
856

857
        return r0
×
858
}
859

860
// IsDeploymentFinished provides a mock function with given fields: ctx, deploymentID
861
func (_m *App) IsDeploymentFinished(ctx context.Context, deploymentID string) (bool, error) {
×
862
        ret := _m.Called(ctx, deploymentID)
×
863

×
864
        if len(ret) == 0 {
×
865
                panic("no return value specified for IsDeploymentFinished")
×
866
        }
867

868
        var r0 bool
×
869
        var r1 error
×
870
        if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
×
871
                return rf(ctx, deploymentID)
×
872
        }
×
873
        if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
×
874
                r0 = rf(ctx, deploymentID)
×
875
        } else {
×
876
                r0 = ret.Get(0).(bool)
×
877
        }
×
878

879
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
880
                r1 = rf(ctx, deploymentID)
×
881
        } else {
×
882
                r1 = ret.Error(1)
×
883
        }
×
884

885
        return r0, r1
×
886
}
887

888
// ListImages provides a mock function with given fields: ctx, filters
889
func (_m *App) ListImages(ctx context.Context, filters *model.ReleaseOrImageFilter) ([]*model.Image, int, error) {
×
890
        ret := _m.Called(ctx, filters)
×
891

×
892
        if len(ret) == 0 {
×
893
                panic("no return value specified for ListImages")
×
894
        }
895

896
        var r0 []*model.Image
×
897
        var r1 int
×
898
        var r2 error
×
899
        if rf, ok := ret.Get(0).(func(context.Context, *model.ReleaseOrImageFilter) ([]*model.Image, int, error)); ok {
×
900
                return rf(ctx, filters)
×
901
        }
×
902
        if rf, ok := ret.Get(0).(func(context.Context, *model.ReleaseOrImageFilter) []*model.Image); ok {
×
903
                r0 = rf(ctx, filters)
×
904
        } else {
×
905
                if ret.Get(0) != nil {
×
906
                        r0 = ret.Get(0).([]*model.Image)
×
907
                }
×
908
        }
909

910
        if rf, ok := ret.Get(1).(func(context.Context, *model.ReleaseOrImageFilter) int); ok {
×
911
                r1 = rf(ctx, filters)
×
912
        } else {
×
913
                r1 = ret.Get(1).(int)
×
914
        }
×
915

916
        if rf, ok := ret.Get(2).(func(context.Context, *model.ReleaseOrImageFilter) error); ok {
×
917
                r2 = rf(ctx, filters)
×
918
        } else {
×
919
                r2 = ret.Error(2)
×
920
        }
×
921

922
        return r0, r1, r2
×
923
}
924

925
// ListImagesV2 provides a mock function with given fields: ctx, filters
NEW
926
func (_m *App) ListImagesV2(ctx context.Context, filters *model.ImageFilter) ([]*model.Image, error) {
×
NEW
927
        ret := _m.Called(ctx, filters)
×
NEW
928

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

NEW
933
        var r0 []*model.Image
×
NEW
934
        var r1 error
×
NEW
935
        if rf, ok := ret.Get(0).(func(context.Context, *model.ImageFilter) ([]*model.Image, error)); ok {
×
NEW
936
                return rf(ctx, filters)
×
NEW
937
        }
×
NEW
938
        if rf, ok := ret.Get(0).(func(context.Context, *model.ImageFilter) []*model.Image); ok {
×
NEW
939
                r0 = rf(ctx, filters)
×
NEW
940
        } else {
×
NEW
941
                if ret.Get(0) != nil {
×
NEW
942
                        r0 = ret.Get(0).([]*model.Image)
×
NEW
943
                }
×
944
        }
945

NEW
946
        if rf, ok := ret.Get(1).(func(context.Context, *model.ImageFilter) error); ok {
×
NEW
947
                r1 = rf(ctx, filters)
×
NEW
948
        } else {
×
NEW
949
                r1 = ret.Error(1)
×
NEW
950
        }
×
951

NEW
952
        return r0, r1
×
953
}
954

955
// ListReleaseTags provides a mock function with given fields: ctx
956
func (_m *App) ListReleaseTags(ctx context.Context) (model.Tags, error) {
×
957
        ret := _m.Called(ctx)
×
958

×
959
        if len(ret) == 0 {
×
960
                panic("no return value specified for ListReleaseTags")
×
961
        }
962

963
        var r0 model.Tags
×
964
        var r1 error
×
965
        if rf, ok := ret.Get(0).(func(context.Context) (model.Tags, error)); ok {
×
966
                return rf(ctx)
×
967
        }
×
968
        if rf, ok := ret.Get(0).(func(context.Context) model.Tags); ok {
×
969
                r0 = rf(ctx)
×
970
        } else {
×
971
                if ret.Get(0) != nil {
×
972
                        r0 = ret.Get(0).(model.Tags)
×
973
                }
×
974
        }
975

976
        if rf, ok := ret.Get(1).(func(context.Context) error); ok {
×
977
                r1 = rf(ctx)
×
978
        } else {
×
979
                r1 = ret.Error(1)
×
980
        }
×
981

982
        return r0, r1
×
983
}
984

985
// LookupDeployment provides a mock function with given fields: ctx, query
986
func (_m *App) LookupDeployment(ctx context.Context, query model.Query) ([]*model.Deployment, int64, error) {
×
987
        ret := _m.Called(ctx, query)
×
988

×
989
        if len(ret) == 0 {
×
990
                panic("no return value specified for LookupDeployment")
×
991
        }
992

993
        var r0 []*model.Deployment
×
994
        var r1 int64
×
995
        var r2 error
×
996
        if rf, ok := ret.Get(0).(func(context.Context, model.Query) ([]*model.Deployment, int64, error)); ok {
×
997
                return rf(ctx, query)
×
998
        }
×
999
        if rf, ok := ret.Get(0).(func(context.Context, model.Query) []*model.Deployment); ok {
×
1000
                r0 = rf(ctx, query)
×
1001
        } else {
×
1002
                if ret.Get(0) != nil {
×
1003
                        r0 = ret.Get(0).([]*model.Deployment)
×
1004
                }
×
1005
        }
1006

1007
        if rf, ok := ret.Get(1).(func(context.Context, model.Query) int64); ok {
×
1008
                r1 = rf(ctx, query)
×
1009
        } else {
×
1010
                r1 = ret.Get(1).(int64)
×
1011
        }
×
1012

1013
        if rf, ok := ret.Get(2).(func(context.Context, model.Query) error); ok {
×
1014
                r2 = rf(ctx, query)
×
1015
        } else {
×
1016
                r2 = ret.Error(2)
×
1017
        }
×
1018

1019
        return r0, r1, r2
×
1020
}
1021

1022
// ProvisionTenant provides a mock function with given fields: ctx, tenant_id
1023
func (_m *App) ProvisionTenant(ctx context.Context, tenant_id string) error {
×
1024
        ret := _m.Called(ctx, tenant_id)
×
1025

×
1026
        if len(ret) == 0 {
×
1027
                panic("no return value specified for ProvisionTenant")
×
1028
        }
1029

1030
        var r0 error
×
1031
        if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
×
1032
                r0 = rf(ctx, tenant_id)
×
1033
        } else {
×
1034
                r0 = ret.Error(0)
×
1035
        }
×
1036

1037
        return r0
×
1038
}
1039

1040
// ReplaceReleaseTags provides a mock function with given fields: ctx, releaseName, tags
1041
func (_m *App) ReplaceReleaseTags(ctx context.Context, releaseName string, tags model.Tags) error {
×
1042
        ret := _m.Called(ctx, releaseName, tags)
×
1043

×
1044
        if len(ret) == 0 {
×
1045
                panic("no return value specified for ReplaceReleaseTags")
×
1046
        }
1047

1048
        var r0 error
×
1049
        if rf, ok := ret.Get(0).(func(context.Context, string, model.Tags) error); ok {
×
1050
                r0 = rf(ctx, releaseName, tags)
×
1051
        } else {
×
1052
                r0 = ret.Error(0)
×
1053
        }
×
1054

1055
        return r0
×
1056
}
1057

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

×
1062
        if len(ret) == 0 {
×
1063
                panic("no return value specified for SaveDeviceDeploymentLog")
×
1064
        }
1065

1066
        var r0 error
×
1067
        if rf, ok := ret.Get(0).(func(context.Context, string, string, []model.LogMessage) error); ok {
×
1068
                r0 = rf(ctx, deviceID, deploymentID, logs)
×
1069
        } else {
×
1070
                r0 = ret.Error(0)
×
1071
        }
×
1072

1073
        return r0
×
1074
}
1075

1076
// SetStorageSettings provides a mock function with given fields: ctx, storageSettings
1077
func (_m *App) SetStorageSettings(ctx context.Context, storageSettings *model.StorageSettings) error {
×
1078
        ret := _m.Called(ctx, storageSettings)
×
1079

×
1080
        if len(ret) == 0 {
×
1081
                panic("no return value specified for SetStorageSettings")
×
1082
        }
1083

1084
        var r0 error
×
1085
        if rf, ok := ret.Get(0).(func(context.Context, *model.StorageSettings) error); ok {
×
1086
                r0 = rf(ctx, storageSettings)
×
1087
        } else {
×
1088
                r0 = ret.Error(0)
×
1089
        }
×
1090

1091
        return r0
×
1092
}
1093

1094
// UpdateDeploymentsWithArtifactName provides a mock function with given fields: ctx, artifactName
1095
func (_m *App) UpdateDeploymentsWithArtifactName(ctx context.Context, artifactName string) error {
×
1096
        ret := _m.Called(ctx, artifactName)
×
1097

×
1098
        if len(ret) == 0 {
×
1099
                panic("no return value specified for UpdateDeploymentsWithArtifactName")
×
1100
        }
1101

1102
        var r0 error
×
1103
        if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
×
1104
                r0 = rf(ctx, artifactName)
×
1105
        } else {
×
1106
                r0 = ret.Error(0)
×
1107
        }
×
1108

1109
        return r0
×
1110
}
1111

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

×
1116
        if len(ret) == 0 {
×
1117
                panic("no return value specified for UpdateDeviceDeploymentStatus")
×
1118
        }
1119

1120
        var r0 error
×
1121
        if rf, ok := ret.Get(0).(func(context.Context, string, string, model.DeviceDeploymentState) error); ok {
×
1122
                r0 = rf(ctx, deploymentID, deviceID, state)
×
1123
        } else {
×
1124
                r0 = ret.Error(0)
×
1125
        }
×
1126

1127
        return r0
×
1128
}
1129

1130
// UpdateRelease provides a mock function with given fields: ctx, releaseName, release
1131
func (_m *App) UpdateRelease(ctx context.Context, releaseName string, release model.ReleasePatch) error {
×
1132
        ret := _m.Called(ctx, releaseName, release)
×
1133

×
1134
        if len(ret) == 0 {
×
1135
                panic("no return value specified for UpdateRelease")
×
1136
        }
1137

1138
        var r0 error
×
1139
        if rf, ok := ret.Get(0).(func(context.Context, string, model.ReleasePatch) error); ok {
×
1140
                r0 = rf(ctx, releaseName, release)
×
1141
        } else {
×
1142
                r0 = ret.Error(0)
×
1143
        }
×
1144

1145
        return r0
×
1146
}
1147

1148
// UploadLink provides a mock function with given fields: ctx, expire, skipVerify
1149
func (_m *App) UploadLink(ctx context.Context, expire time.Duration, skipVerify bool) (*model.UploadLink, error) {
×
1150
        ret := _m.Called(ctx, expire, skipVerify)
×
1151

×
1152
        if len(ret) == 0 {
×
1153
                panic("no return value specified for UploadLink")
×
1154
        }
1155

1156
        var r0 *model.UploadLink
×
1157
        var r1 error
×
1158
        if rf, ok := ret.Get(0).(func(context.Context, time.Duration, bool) (*model.UploadLink, error)); ok {
×
1159
                return rf(ctx, expire, skipVerify)
×
1160
        }
×
1161
        if rf, ok := ret.Get(0).(func(context.Context, time.Duration, bool) *model.UploadLink); ok {
×
1162
                r0 = rf(ctx, expire, skipVerify)
×
1163
        } else {
×
1164
                if ret.Get(0) != nil {
×
1165
                        r0 = ret.Get(0).(*model.UploadLink)
×
1166
                }
×
1167
        }
1168

1169
        if rf, ok := ret.Get(1).(func(context.Context, time.Duration, bool) error); ok {
×
1170
                r1 = rf(ctx, expire, skipVerify)
×
1171
        } else {
×
1172
                r1 = ret.Error(1)
×
1173
        }
×
1174

1175
        return r0, r1
×
1176
}
1177

1178
// 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.
1179
// The first argument is typically a *testing.T value.
1180
func NewApp(t interface {
1181
        mock.TestingT
1182
        Cleanup(func())
1183
}) *App {
×
1184
        mock := &App{}
×
1185
        mock.Mock.Test(t)
×
1186

×
1187
        t.Cleanup(func() { mock.AssertExpectations(t) })
×
1188

1189
        return mock
×
1190
}
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