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

mendersoftware / mender-server / 1927764361

15 Jul 2025 11:39AM UTC coverage: 65.436% (-0.02%) from 65.454%
1927764361

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

139 of 232 new or added lines in 7 files covered. (59.91%)

77 existing lines in 3 files now uncovered.

32212 of 49227 relevant lines covered (65.44%)

1.39 hits per line

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

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

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

17
package mocks
18

19
import (
20
        context "context"
21

22
        model "github.com/mendersoftware/mender-server/services/deployments/model"
23
        mock "github.com/stretchr/testify/mock"
24

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

27
        time "time"
28
)
29

30
// DataStore is an autogenerated mock type for the DataStore type
31
type DataStore struct {
32
        mock.Mock
33
}
34

35
// AbortDeviceDeployments provides a mock function with given fields: ctx, deploymentID
36
func (_m *DataStore) AbortDeviceDeployments(ctx context.Context, deploymentID string) error {
×
37
        ret := _m.Called(ctx, deploymentID)
×
38

×
39
        if len(ret) == 0 {
×
40
                panic("no return value specified for AbortDeviceDeployments")
×
41
        }
42

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

50
        return r0
×
51
}
52

53
// AggregateDeviceDeploymentByStatus provides a mock function with given fields: ctx, id
54
func (_m *DataStore) AggregateDeviceDeploymentByStatus(ctx context.Context, id string) (model.Stats, error) {
×
55
        ret := _m.Called(ctx, id)
×
56

×
57
        if len(ret) == 0 {
×
58
                panic("no return value specified for AggregateDeviceDeploymentByStatus")
×
59
        }
60

61
        var r0 model.Stats
×
62
        var r1 error
×
63
        if rf, ok := ret.Get(0).(func(context.Context, string) (model.Stats, error)); ok {
×
64
                return rf(ctx, id)
×
65
        }
×
66
        if rf, ok := ret.Get(0).(func(context.Context, string) model.Stats); ok {
×
67
                r0 = rf(ctx, id)
×
68
        } else {
×
69
                if ret.Get(0) != nil {
×
70
                        r0 = ret.Get(0).(model.Stats)
×
71
                }
×
72
        }
73

74
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
75
                r1 = rf(ctx, id)
×
76
        } else {
×
77
                r1 = ret.Error(1)
×
78
        }
×
79

80
        return r0, r1
×
81
}
82

83
// AssignArtifact provides a mock function with given fields: ctx, deviceID, deploymentID, artifact
84
func (_m *DataStore) AssignArtifact(ctx context.Context, deviceID string, deploymentID string, artifact *model.Image) error {
×
85
        ret := _m.Called(ctx, deviceID, deploymentID, artifact)
×
86

×
87
        if len(ret) == 0 {
×
88
                panic("no return value specified for AssignArtifact")
×
89
        }
90

91
        var r0 error
×
92
        if rf, ok := ret.Get(0).(func(context.Context, string, string, *model.Image) error); ok {
×
93
                r0 = rf(ctx, deviceID, deploymentID, artifact)
×
94
        } else {
×
95
                r0 = ret.Error(0)
×
96
        }
×
97

98
        return r0
×
99
}
100

101
// DecommissionDeviceDeployments provides a mock function with given fields: ctx, deviceId
102
func (_m *DataStore) DecommissionDeviceDeployments(ctx context.Context, deviceId string) error {
×
103
        ret := _m.Called(ctx, deviceId)
×
104

×
105
        if len(ret) == 0 {
×
106
                panic("no return value specified for DecommissionDeviceDeployments")
×
107
        }
108

109
        var r0 error
×
110
        if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
×
111
                r0 = rf(ctx, deviceId)
×
112
        } else {
×
113
                r0 = ret.Error(0)
×
114
        }
×
115

116
        return r0
×
117
}
118

119
// DeleteDeployment provides a mock function with given fields: ctx, id
120
func (_m *DataStore) DeleteDeployment(ctx context.Context, id string) error {
×
121
        ret := _m.Called(ctx, id)
×
122

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

127
        var r0 error
×
128
        if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
×
129
                r0 = rf(ctx, id)
×
130
        } else {
×
131
                r0 = ret.Error(0)
×
132
        }
×
133

134
        return r0
×
135
}
136

137
// DeleteDeviceDeploymentsHistory provides a mock function with given fields: ctx, deviceId
138
func (_m *DataStore) DeleteDeviceDeploymentsHistory(ctx context.Context, deviceId string) error {
×
139
        ret := _m.Called(ctx, deviceId)
×
140

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

145
        var r0 error
×
146
        if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
×
147
                r0 = rf(ctx, deviceId)
×
148
        } else {
×
149
                r0 = ret.Error(0)
×
150
        }
×
151

152
        return r0
×
153
}
154

155
// DeleteImage provides a mock function with given fields: ctx, id
156
func (_m *DataStore) DeleteImage(ctx context.Context, id string) error {
×
157
        ret := _m.Called(ctx, id)
×
158

×
159
        if len(ret) == 0 {
×
160
                panic("no return value specified for DeleteImage")
×
161
        }
162

163
        var r0 error
×
164
        if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
×
165
                r0 = rf(ctx, id)
×
166
        } else {
×
167
                r0 = ret.Error(0)
×
168
        }
×
169

170
        return r0
×
171
}
172

173
// DeleteImagesByNames provides a mock function with given fields: ctx, names
174
func (_m *DataStore) DeleteImagesByNames(ctx context.Context, names []string) error {
×
175
        ret := _m.Called(ctx, names)
×
176

×
177
        if len(ret) == 0 {
×
178
                panic("no return value specified for DeleteImagesByNames")
×
179
        }
180

181
        var r0 error
×
182
        if rf, ok := ret.Get(0).(func(context.Context, []string) error); ok {
×
183
                r0 = rf(ctx, names)
×
184
        } else {
×
185
                r0 = ret.Error(0)
×
186
        }
×
187

188
        return r0
×
189
}
190

191
// DeleteReleasesByNames provides a mock function with given fields: ctx, names
192
func (_m *DataStore) DeleteReleasesByNames(ctx context.Context, names []string) error {
×
193
        ret := _m.Called(ctx, names)
×
194

×
195
        if len(ret) == 0 {
×
196
                panic("no return value specified for DeleteReleasesByNames")
×
197
        }
198

199
        var r0 error
×
200
        if rf, ok := ret.Get(0).(func(context.Context, []string) error); ok {
×
201
                r0 = rf(ctx, names)
×
202
        } else {
×
203
                r0 = ret.Error(0)
×
204
        }
×
205

206
        return r0
×
207
}
208

209
// DeviceCountByDeployment provides a mock function with given fields: ctx, id
210
func (_m *DataStore) DeviceCountByDeployment(ctx context.Context, id string) (int, error) {
×
211
        ret := _m.Called(ctx, id)
×
212

×
213
        if len(ret) == 0 {
×
214
                panic("no return value specified for DeviceCountByDeployment")
×
215
        }
216

217
        var r0 int
×
218
        var r1 error
×
219
        if rf, ok := ret.Get(0).(func(context.Context, string) (int, error)); ok {
×
220
                return rf(ctx, id)
×
221
        }
×
222
        if rf, ok := ret.Get(0).(func(context.Context, string) int); ok {
×
223
                r0 = rf(ctx, id)
×
224
        } else {
×
225
                r0 = ret.Get(0).(int)
×
226
        }
×
227

228
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
229
                r1 = rf(ctx, id)
×
230
        } else {
×
231
                r1 = ret.Error(1)
×
232
        }
×
233

234
        return r0, r1
×
235
}
236

237
// ExistByArtifactId provides a mock function with given fields: ctx, id
238
func (_m *DataStore) ExistByArtifactId(ctx context.Context, id string) (bool, error) {
×
239
        ret := _m.Called(ctx, id)
×
240

×
241
        if len(ret) == 0 {
×
242
                panic("no return value specified for ExistByArtifactId")
×
243
        }
244

245
        var r0 bool
×
246
        var r1 error
×
247
        if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
×
248
                return rf(ctx, id)
×
249
        }
×
250
        if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
×
251
                r0 = rf(ctx, id)
×
252
        } else {
×
253
                r0 = ret.Get(0).(bool)
×
254
        }
×
255

256
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
257
                r1 = rf(ctx, id)
×
258
        } else {
×
259
                r1 = ret.Error(1)
×
260
        }
×
261

262
        return r0, r1
×
263
}
264

265
// ExistUnfinishedByArtifactId provides a mock function with given fields: ctx, id
266
func (_m *DataStore) ExistUnfinishedByArtifactId(ctx context.Context, id string) (bool, error) {
×
267
        ret := _m.Called(ctx, id)
×
268

×
269
        if len(ret) == 0 {
×
270
                panic("no return value specified for ExistUnfinishedByArtifactId")
×
271
        }
272

273
        var r0 bool
×
274
        var r1 error
×
275
        if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
×
276
                return rf(ctx, id)
×
277
        }
×
278
        if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
×
279
                r0 = rf(ctx, id)
×
280
        } else {
×
281
                r0 = ret.Get(0).(bool)
×
282
        }
×
283

284
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
285
                r1 = rf(ctx, id)
×
286
        } else {
×
287
                r1 = ret.Error(1)
×
288
        }
×
289

290
        return r0, r1
×
291
}
292

293
// ExistUnfinishedByArtifactName provides a mock function with given fields: ctx, artifactName
294
func (_m *DataStore) ExistUnfinishedByArtifactName(ctx context.Context, artifactName string) (bool, error) {
×
295
        ret := _m.Called(ctx, artifactName)
×
296

×
297
        if len(ret) == 0 {
×
298
                panic("no return value specified for ExistUnfinishedByArtifactName")
×
299
        }
300

301
        var r0 bool
×
302
        var r1 error
×
303
        if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
×
304
                return rf(ctx, artifactName)
×
305
        }
×
306
        if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
×
307
                r0 = rf(ctx, artifactName)
×
308
        } else {
×
309
                r0 = ret.Get(0).(bool)
×
310
        }
×
311

312
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
313
                r1 = rf(ctx, artifactName)
×
314
        } else {
×
315
                r1 = ret.Error(1)
×
316
        }
×
317

318
        return r0, r1
×
319
}
320

321
// Exists provides a mock function with given fields: ctx, id
322
func (_m *DataStore) Exists(ctx context.Context, id string) (bool, error) {
×
323
        ret := _m.Called(ctx, id)
×
324

×
325
        if len(ret) == 0 {
×
326
                panic("no return value specified for Exists")
×
327
        }
328

329
        var r0 bool
×
330
        var r1 error
×
331
        if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
×
332
                return rf(ctx, id)
×
333
        }
×
334
        if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
×
335
                r0 = rf(ctx, id)
×
336
        } else {
×
337
                r0 = ret.Get(0).(bool)
×
338
        }
×
339

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

346
        return r0, r1
×
347
}
348

349
// FindDeploymentByID provides a mock function with given fields: ctx, id
350
func (_m *DataStore) FindDeploymentByID(ctx context.Context, id string) (*model.Deployment, error) {
×
351
        ret := _m.Called(ctx, id)
×
352

×
353
        if len(ret) == 0 {
×
354
                panic("no return value specified for FindDeploymentByID")
×
355
        }
356

357
        var r0 *model.Deployment
×
358
        var r1 error
×
359
        if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Deployment, error)); ok {
×
360
                return rf(ctx, id)
×
361
        }
×
362
        if rf, ok := ret.Get(0).(func(context.Context, string) *model.Deployment); ok {
×
363
                r0 = rf(ctx, id)
×
364
        } else {
×
365
                if ret.Get(0) != nil {
×
366
                        r0 = ret.Get(0).(*model.Deployment)
×
367
                }
×
368
        }
369

370
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
371
                r1 = rf(ctx, id)
×
372
        } else {
×
373
                r1 = ret.Error(1)
×
374
        }
×
375

376
        return r0, r1
×
377
}
378

379
// FindDeploymentStatsByIDs provides a mock function with given fields: ctx, ids
380
func (_m *DataStore) FindDeploymentStatsByIDs(ctx context.Context, ids ...string) ([]*model.DeploymentStats, error) {
×
381
        _va := make([]interface{}, len(ids))
×
382
        for _i := range ids {
×
383
                _va[_i] = ids[_i]
×
384
        }
×
385
        var _ca []interface{}
×
386
        _ca = append(_ca, ctx)
×
387
        _ca = append(_ca, _va...)
×
388
        ret := _m.Called(_ca...)
×
389

×
390
        if len(ret) == 0 {
×
391
                panic("no return value specified for FindDeploymentStatsByIDs")
×
392
        }
393

394
        var r0 []*model.DeploymentStats
×
395
        var r1 error
×
396
        if rf, ok := ret.Get(0).(func(context.Context, ...string) ([]*model.DeploymentStats, error)); ok {
×
397
                return rf(ctx, ids...)
×
398
        }
×
399
        if rf, ok := ret.Get(0).(func(context.Context, ...string) []*model.DeploymentStats); ok {
×
400
                r0 = rf(ctx, ids...)
×
401
        } else {
×
402
                if ret.Get(0) != nil {
×
403
                        r0 = ret.Get(0).([]*model.DeploymentStats)
×
404
                }
×
405
        }
406

407
        if rf, ok := ret.Get(1).(func(context.Context, ...string) error); ok {
×
408
                r1 = rf(ctx, ids...)
×
409
        } else {
×
410
                r1 = ret.Error(1)
×
411
        }
×
412

413
        return r0, r1
×
414
}
415

416
// FindDeployments provides a mock function with given fields: ctx, query
417
func (_m *DataStore) FindDeployments(ctx context.Context, query model.Query) ([]*model.Deployment, int64, error) {
×
418
        ret := _m.Called(ctx, query)
×
419

×
420
        if len(ret) == 0 {
×
421
                panic("no return value specified for FindDeployments")
×
422
        }
423

424
        var r0 []*model.Deployment
×
425
        var r1 int64
×
426
        var r2 error
×
427
        if rf, ok := ret.Get(0).(func(context.Context, model.Query) ([]*model.Deployment, int64, error)); ok {
×
428
                return rf(ctx, query)
×
429
        }
×
430
        if rf, ok := ret.Get(0).(func(context.Context, model.Query) []*model.Deployment); ok {
×
431
                r0 = rf(ctx, query)
×
432
        } else {
×
433
                if ret.Get(0) != nil {
×
434
                        r0 = ret.Get(0).([]*model.Deployment)
×
435
                }
×
436
        }
437

438
        if rf, ok := ret.Get(1).(func(context.Context, model.Query) int64); ok {
×
439
                r1 = rf(ctx, query)
×
440
        } else {
×
441
                r1 = ret.Get(1).(int64)
×
442
        }
×
443

444
        if rf, ok := ret.Get(2).(func(context.Context, model.Query) error); ok {
×
445
                r2 = rf(ctx, query)
×
446
        } else {
×
447
                r2 = ret.Error(2)
×
448
        }
×
449

450
        return r0, r1, r2
×
451
}
452

453
// FindImageByID provides a mock function with given fields: ctx, id
454
func (_m *DataStore) FindImageByID(ctx context.Context, id string) (*model.Image, error) {
×
455
        ret := _m.Called(ctx, id)
×
456

×
457
        if len(ret) == 0 {
×
458
                panic("no return value specified for FindImageByID")
×
459
        }
460

461
        var r0 *model.Image
×
462
        var r1 error
×
463
        if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Image, error)); ok {
×
464
                return rf(ctx, id)
×
465
        }
×
466
        if rf, ok := ret.Get(0).(func(context.Context, string) *model.Image); ok {
×
467
                r0 = rf(ctx, id)
×
468
        } else {
×
469
                if ret.Get(0) != nil {
×
470
                        r0 = ret.Get(0).(*model.Image)
×
471
                }
×
472
        }
473

474
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
475
                r1 = rf(ctx, id)
×
476
        } else {
×
477
                r1 = ret.Error(1)
×
478
        }
×
479

480
        return r0, r1
×
481
}
482

483
// FindLatestInactiveDeviceDeployment provides a mock function with given fields: ctx, deviceID
484
func (_m *DataStore) FindLatestInactiveDeviceDeployment(ctx context.Context, deviceID string) (*model.DeviceDeployment, error) {
×
485
        ret := _m.Called(ctx, deviceID)
×
486

×
487
        if len(ret) == 0 {
×
488
                panic("no return value specified for FindLatestInactiveDeviceDeployment")
×
489
        }
490

491
        var r0 *model.DeviceDeployment
×
492
        var r1 error
×
493
        if rf, ok := ret.Get(0).(func(context.Context, string) (*model.DeviceDeployment, error)); ok {
×
494
                return rf(ctx, deviceID)
×
495
        }
×
496
        if rf, ok := ret.Get(0).(func(context.Context, string) *model.DeviceDeployment); ok {
×
497
                r0 = rf(ctx, deviceID)
×
498
        } else {
×
499
                if ret.Get(0) != nil {
×
500
                        r0 = ret.Get(0).(*model.DeviceDeployment)
×
501
                }
×
502
        }
503

504
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
505
                r1 = rf(ctx, deviceID)
×
506
        } else {
×
507
                r1 = ret.Error(1)
×
508
        }
×
509

510
        return r0, r1
×
511
}
512

513
// FindNewerActiveDeployment provides a mock function with given fields: ctx, createdAfter, deviceID
514
func (_m *DataStore) FindNewerActiveDeployment(ctx context.Context, createdAfter *time.Time, deviceID string) (*model.Deployment, error) {
×
515
        ret := _m.Called(ctx, createdAfter, deviceID)
×
516

×
517
        if len(ret) == 0 {
×
518
                panic("no return value specified for FindNewerActiveDeployment")
×
519
        }
520

521
        var r0 *model.Deployment
×
522
        var r1 error
×
523
        if rf, ok := ret.Get(0).(func(context.Context, *time.Time, string) (*model.Deployment, error)); ok {
×
524
                return rf(ctx, createdAfter, deviceID)
×
525
        }
×
526
        if rf, ok := ret.Get(0).(func(context.Context, *time.Time, string) *model.Deployment); ok {
×
527
                r0 = rf(ctx, createdAfter, deviceID)
×
528
        } else {
×
529
                if ret.Get(0) != nil {
×
530
                        r0 = ret.Get(0).(*model.Deployment)
×
531
                }
×
532
        }
533

534
        if rf, ok := ret.Get(1).(func(context.Context, *time.Time, string) error); ok {
×
535
                r1 = rf(ctx, createdAfter, deviceID)
×
536
        } else {
×
537
                r1 = ret.Error(1)
×
538
        }
×
539

540
        return r0, r1
×
541
}
542

543
// FindNewerActiveDeployments provides a mock function with given fields: ctx, createdAfter, skip, limit
544
func (_m *DataStore) FindNewerActiveDeployments(ctx context.Context, createdAfter *time.Time, skip int, limit int) ([]*model.Deployment, error) {
×
545
        ret := _m.Called(ctx, createdAfter, skip, limit)
×
546

×
547
        if len(ret) == 0 {
×
548
                panic("no return value specified for FindNewerActiveDeployments")
×
549
        }
550

551
        var r0 []*model.Deployment
×
552
        var r1 error
×
553
        if rf, ok := ret.Get(0).(func(context.Context, *time.Time, int, int) ([]*model.Deployment, error)); ok {
×
554
                return rf(ctx, createdAfter, skip, limit)
×
555
        }
×
556
        if rf, ok := ret.Get(0).(func(context.Context, *time.Time, int, int) []*model.Deployment); ok {
×
557
                r0 = rf(ctx, createdAfter, skip, limit)
×
558
        } else {
×
559
                if ret.Get(0) != nil {
×
560
                        r0 = ret.Get(0).([]*model.Deployment)
×
561
                }
×
562
        }
563

564
        if rf, ok := ret.Get(1).(func(context.Context, *time.Time, int, int) error); ok {
×
565
                r1 = rf(ctx, createdAfter, skip, limit)
×
566
        } else {
×
567
                r1 = ret.Error(1)
×
568
        }
×
569

570
        return r0, r1
×
571
}
572

573
// FindOldestActiveDeviceDeployment provides a mock function with given fields: ctx, deviceID
574
func (_m *DataStore) FindOldestActiveDeviceDeployment(ctx context.Context, deviceID string) (*model.DeviceDeployment, error) {
×
575
        ret := _m.Called(ctx, deviceID)
×
576

×
577
        if len(ret) == 0 {
×
578
                panic("no return value specified for FindOldestActiveDeviceDeployment")
×
579
        }
580

581
        var r0 *model.DeviceDeployment
×
582
        var r1 error
×
583
        if rf, ok := ret.Get(0).(func(context.Context, string) (*model.DeviceDeployment, error)); ok {
×
584
                return rf(ctx, deviceID)
×
585
        }
×
586
        if rf, ok := ret.Get(0).(func(context.Context, string) *model.DeviceDeployment); ok {
×
587
                r0 = rf(ctx, deviceID)
×
588
        } else {
×
589
                if ret.Get(0) != nil {
×
590
                        r0 = ret.Get(0).(*model.DeviceDeployment)
×
591
                }
×
592
        }
593

594
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
595
                r1 = rf(ctx, deviceID)
×
596
        } else {
×
597
                r1 = ret.Error(1)
×
598
        }
×
599

600
        return r0, r1
×
601
}
602

603
// FindUnfinishedByID provides a mock function with given fields: ctx, id
604
func (_m *DataStore) FindUnfinishedByID(ctx context.Context, id string) (*model.Deployment, error) {
×
605
        ret := _m.Called(ctx, id)
×
606

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

611
        var r0 *model.Deployment
×
612
        var r1 error
×
613
        if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Deployment, error)); ok {
×
614
                return rf(ctx, id)
×
615
        }
×
616
        if rf, ok := ret.Get(0).(func(context.Context, string) *model.Deployment); ok {
×
617
                r0 = rf(ctx, id)
×
618
        } else {
×
619
                if ret.Get(0) != nil {
×
620
                        r0 = ret.Get(0).(*model.Deployment)
×
621
                }
×
622
        }
623

624
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
625
                r1 = rf(ctx, id)
×
626
        } else {
×
627
                r1 = ret.Error(1)
×
628
        }
×
629

630
        return r0, r1
×
631
}
632

633
// FindUploadLinks provides a mock function with given fields: ctx, expired
634
func (_m *DataStore) FindUploadLinks(ctx context.Context, expired time.Time) (store.Iterator[model.UploadLink], error) {
×
635
        ret := _m.Called(ctx, expired)
×
636

×
637
        if len(ret) == 0 {
×
638
                panic("no return value specified for FindUploadLinks")
×
639
        }
640

641
        var r0 store.Iterator[model.UploadLink]
×
642
        var r1 error
×
643
        if rf, ok := ret.Get(0).(func(context.Context, time.Time) (store.Iterator[model.UploadLink], error)); ok {
×
644
                return rf(ctx, expired)
×
645
        }
×
646
        if rf, ok := ret.Get(0).(func(context.Context, time.Time) store.Iterator[model.UploadLink]); ok {
×
647
                r0 = rf(ctx, expired)
×
648
        } else {
×
649
                if ret.Get(0) != nil {
×
650
                        r0 = ret.Get(0).(store.Iterator[model.UploadLink])
×
651
                }
×
652
        }
653

654
        if rf, ok := ret.Get(1).(func(context.Context, time.Time) error); ok {
×
655
                r1 = rf(ctx, expired)
×
656
        } else {
×
657
                r1 = ret.Error(1)
×
658
        }
×
659

660
        return r0, r1
×
661
}
662

663
// GetDeploymentIDsByArtifactNames provides a mock function with given fields: ctx, artifactNames
664
func (_m *DataStore) GetDeploymentIDsByArtifactNames(ctx context.Context, artifactNames []string) ([]string, error) {
×
665
        ret := _m.Called(ctx, artifactNames)
×
666

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

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

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

690
        return r0, r1
×
691
}
692

693
// GetDeviceDeployment provides a mock function with given fields: ctx, deploymentID, deviceID, includeDeleted
694
func (_m *DataStore) GetDeviceDeployment(ctx context.Context, deploymentID string, deviceID string, includeDeleted bool) (*model.DeviceDeployment, error) {
×
695
        ret := _m.Called(ctx, deploymentID, deviceID, includeDeleted)
×
696

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

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

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

720
        return r0, r1
×
721
}
722

723
// GetDeviceDeploymentLog provides a mock function with given fields: ctx, deviceID, deploymentID
724
func (_m *DataStore) GetDeviceDeploymentLog(ctx context.Context, deviceID string, deploymentID string) (*model.DeploymentLog, error) {
×
725
        ret := _m.Called(ctx, deviceID, deploymentID)
×
726

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

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

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

750
        return r0, r1
×
751
}
752

753
// GetDeviceDeployments provides a mock function with given fields: ctx, skip, limit, deviceID, active, includeDeleted
754
func (_m *DataStore) GetDeviceDeployments(ctx context.Context, skip int, limit int, deviceID string, active *bool, includeDeleted bool) ([]model.DeviceDeployment, error) {
×
755
        ret := _m.Called(ctx, skip, limit, deviceID, active, includeDeleted)
×
756

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

761
        var r0 []model.DeviceDeployment
×
762
        var r1 error
×
763
        if rf, ok := ret.Get(0).(func(context.Context, int, int, string, *bool, bool) ([]model.DeviceDeployment, error)); ok {
×
764
                return rf(ctx, skip, limit, deviceID, active, includeDeleted)
×
765
        }
×
766
        if rf, ok := ret.Get(0).(func(context.Context, int, int, string, *bool, bool) []model.DeviceDeployment); ok {
×
767
                r0 = rf(ctx, skip, limit, deviceID, active, includeDeleted)
×
768
        } else {
×
769
                if ret.Get(0) != nil {
×
770
                        r0 = ret.Get(0).([]model.DeviceDeployment)
×
771
                }
×
772
        }
773

774
        if rf, ok := ret.Get(1).(func(context.Context, int, int, string, *bool, bool) error); ok {
×
775
                r1 = rf(ctx, skip, limit, deviceID, active, includeDeleted)
×
776
        } else {
×
777
                r1 = ret.Error(1)
×
778
        }
×
779

780
        return r0, r1
×
781
}
782

783
// GetDeviceDeploymentsForDevice provides a mock function with given fields: ctx, query
784
func (_m *DataStore) GetDeviceDeploymentsForDevice(ctx context.Context, query store.ListQueryDeviceDeployments) ([]model.DeviceDeployment, int, error) {
×
785
        ret := _m.Called(ctx, query)
×
786

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

791
        var r0 []model.DeviceDeployment
×
792
        var r1 int
×
793
        var r2 error
×
794
        if rf, ok := ret.Get(0).(func(context.Context, store.ListQueryDeviceDeployments) ([]model.DeviceDeployment, int, error)); ok {
×
795
                return rf(ctx, query)
×
796
        }
×
797
        if rf, ok := ret.Get(0).(func(context.Context, store.ListQueryDeviceDeployments) []model.DeviceDeployment); ok {
×
798
                r0 = rf(ctx, query)
×
799
        } else {
×
800
                if ret.Get(0) != nil {
×
801
                        r0 = ret.Get(0).([]model.DeviceDeployment)
×
802
                }
×
803
        }
804

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

811
        if rf, ok := ret.Get(2).(func(context.Context, store.ListQueryDeviceDeployments) error); ok {
×
812
                r2 = rf(ctx, query)
×
813
        } else {
×
814
                r2 = ret.Error(2)
×
815
        }
×
816

817
        return r0, r1, r2
×
818
}
819

820
// GetDeviceStatusesForDeployment provides a mock function with given fields: ctx, deploymentID
821
func (_m *DataStore) GetDeviceStatusesForDeployment(ctx context.Context, deploymentID string) ([]model.DeviceDeployment, error) {
×
822
        ret := _m.Called(ctx, deploymentID)
×
823

×
824
        if len(ret) == 0 {
×
825
                panic("no return value specified for GetDeviceStatusesForDeployment")
×
826
        }
827

828
        var r0 []model.DeviceDeployment
×
829
        var r1 error
×
830
        if rf, ok := ret.Get(0).(func(context.Context, string) ([]model.DeviceDeployment, error)); ok {
×
831
                return rf(ctx, deploymentID)
×
832
        }
×
833
        if rf, ok := ret.Get(0).(func(context.Context, string) []model.DeviceDeployment); ok {
×
834
                r0 = rf(ctx, deploymentID)
×
835
        } else {
×
836
                if ret.Get(0) != nil {
×
837
                        r0 = ret.Get(0).([]model.DeviceDeployment)
×
838
                }
×
839
        }
840

841
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
842
                r1 = rf(ctx, deploymentID)
×
843
        } else {
×
844
                r1 = ret.Error(1)
×
845
        }
×
846

847
        return r0, r1
×
848
}
849

850
// GetDevicesListForDeployment provides a mock function with given fields: ctx, query
851
func (_m *DataStore) GetDevicesListForDeployment(ctx context.Context, query store.ListQuery) ([]model.DeviceDeployment, int, error) {
×
852
        ret := _m.Called(ctx, query)
×
853

×
854
        if len(ret) == 0 {
×
855
                panic("no return value specified for GetDevicesListForDeployment")
×
856
        }
857

858
        var r0 []model.DeviceDeployment
×
859
        var r1 int
×
860
        var r2 error
×
861
        if rf, ok := ret.Get(0).(func(context.Context, store.ListQuery) ([]model.DeviceDeployment, int, error)); ok {
×
862
                return rf(ctx, query)
×
863
        }
×
864
        if rf, ok := ret.Get(0).(func(context.Context, store.ListQuery) []model.DeviceDeployment); ok {
×
865
                r0 = rf(ctx, query)
×
866
        } else {
×
867
                if ret.Get(0) != nil {
×
868
                        r0 = ret.Get(0).([]model.DeviceDeployment)
×
869
                }
×
870
        }
871

872
        if rf, ok := ret.Get(1).(func(context.Context, store.ListQuery) int); ok {
×
873
                r1 = rf(ctx, query)
×
874
        } else {
×
875
                r1 = ret.Get(1).(int)
×
876
        }
×
877

878
        if rf, ok := ret.Get(2).(func(context.Context, store.ListQuery) error); ok {
×
879
                r2 = rf(ctx, query)
×
880
        } else {
×
881
                r2 = ret.Error(2)
×
882
        }
×
883

884
        return r0, r1, r2
×
885
}
886

887
// GetLastDeviceDeploymentStatus provides a mock function with given fields: ctx, devicesIds
888
func (_m *DataStore) GetLastDeviceDeploymentStatus(ctx context.Context, devicesIds []string) ([]model.DeviceDeploymentLastStatus, error) {
×
889
        ret := _m.Called(ctx, devicesIds)
×
890

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

895
        var r0 []model.DeviceDeploymentLastStatus
×
896
        var r1 error
×
897
        if rf, ok := ret.Get(0).(func(context.Context, []string) ([]model.DeviceDeploymentLastStatus, error)); ok {
×
898
                return rf(ctx, devicesIds)
×
899
        }
×
900
        if rf, ok := ret.Get(0).(func(context.Context, []string) []model.DeviceDeploymentLastStatus); ok {
×
901
                r0 = rf(ctx, devicesIds)
×
902
        } else {
×
903
                if ret.Get(0) != nil {
×
904
                        r0 = ret.Get(0).([]model.DeviceDeploymentLastStatus)
×
905
                }
×
906
        }
907

908
        if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok {
×
909
                r1 = rf(ctx, devicesIds)
×
910
        } else {
×
911
                r1 = ret.Error(1)
×
912
        }
×
913

914
        return r0, r1
×
915
}
916

917
// GetLimit provides a mock function with given fields: ctx, name
918
func (_m *DataStore) GetLimit(ctx context.Context, name string) (*model.Limit, error) {
×
919
        ret := _m.Called(ctx, name)
×
920

×
921
        if len(ret) == 0 {
×
922
                panic("no return value specified for GetLimit")
×
923
        }
924

925
        var r0 *model.Limit
×
926
        var r1 error
×
927
        if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Limit, error)); ok {
×
928
                return rf(ctx, name)
×
929
        }
×
930
        if rf, ok := ret.Get(0).(func(context.Context, string) *model.Limit); ok {
×
931
                r0 = rf(ctx, name)
×
932
        } else {
×
933
                if ret.Get(0) != nil {
×
934
                        r0 = ret.Get(0).(*model.Limit)
×
935
                }
×
936
        }
937

938
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
939
                r1 = rf(ctx, name)
×
940
        } else {
×
941
                r1 = ret.Error(1)
×
942
        }
×
943

944
        return r0, r1
×
945
}
946

947
// GetRelease provides a mock function with given fields: ctx, releaseName
948
func (_m *DataStore) GetRelease(ctx context.Context, releaseName string) (*model.Release, error) {
×
949
        ret := _m.Called(ctx, releaseName)
×
950

×
951
        if len(ret) == 0 {
×
952
                panic("no return value specified for GetRelease")
×
953
        }
954

955
        var r0 *model.Release
×
956
        var r1 error
×
957
        if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Release, error)); ok {
×
958
                return rf(ctx, releaseName)
×
959
        }
×
960
        if rf, ok := ret.Get(0).(func(context.Context, string) *model.Release); ok {
×
961
                r0 = rf(ctx, releaseName)
×
962
        } else {
×
963
                if ret.Get(0) != nil {
×
964
                        r0 = ret.Get(0).(*model.Release)
×
965
                }
×
966
        }
967

968
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
969
                r1 = rf(ctx, releaseName)
×
970
        } else {
×
971
                r1 = ret.Error(1)
×
972
        }
×
973

974
        return r0, r1
×
975
}
976

977
// GetReleases provides a mock function with given fields: ctx, filt
978
func (_m *DataStore) GetReleases(ctx context.Context, filt *model.ReleaseOrImageFilter) ([]model.Release, int, error) {
×
979
        ret := _m.Called(ctx, filt)
×
980

×
981
        if len(ret) == 0 {
×
982
                panic("no return value specified for GetReleases")
×
983
        }
984

985
        var r0 []model.Release
×
986
        var r1 int
×
987
        var r2 error
×
988
        if rf, ok := ret.Get(0).(func(context.Context, *model.ReleaseOrImageFilter) ([]model.Release, int, error)); ok {
×
989
                return rf(ctx, filt)
×
990
        }
×
991
        if rf, ok := ret.Get(0).(func(context.Context, *model.ReleaseOrImageFilter) []model.Release); ok {
×
992
                r0 = rf(ctx, filt)
×
993
        } else {
×
994
                if ret.Get(0) != nil {
×
995
                        r0 = ret.Get(0).([]model.Release)
×
996
                }
×
997
        }
998

999
        if rf, ok := ret.Get(1).(func(context.Context, *model.ReleaseOrImageFilter) int); ok {
×
1000
                r1 = rf(ctx, filt)
×
1001
        } else {
×
1002
                r1 = ret.Get(1).(int)
×
1003
        }
×
1004

1005
        if rf, ok := ret.Get(2).(func(context.Context, *model.ReleaseOrImageFilter) error); ok {
×
1006
                r2 = rf(ctx, filt)
×
1007
        } else {
×
1008
                r2 = ret.Error(2)
×
1009
        }
×
1010

1011
        return r0, r1, r2
×
1012
}
1013

1014
// GetStorageSettings provides a mock function with given fields: ctx
1015
func (_m *DataStore) GetStorageSettings(ctx context.Context) (*model.StorageSettings, error) {
×
1016
        ret := _m.Called(ctx)
×
1017

×
1018
        if len(ret) == 0 {
×
1019
                panic("no return value specified for GetStorageSettings")
×
1020
        }
1021

1022
        var r0 *model.StorageSettings
×
1023
        var r1 error
×
1024
        if rf, ok := ret.Get(0).(func(context.Context) (*model.StorageSettings, error)); ok {
×
1025
                return rf(ctx)
×
1026
        }
×
1027
        if rf, ok := ret.Get(0).(func(context.Context) *model.StorageSettings); ok {
×
1028
                r0 = rf(ctx)
×
1029
        } else {
×
1030
                if ret.Get(0) != nil {
×
1031
                        r0 = ret.Get(0).(*model.StorageSettings)
×
1032
                }
×
1033
        }
1034

1035
        if rf, ok := ret.Get(1).(func(context.Context) error); ok {
×
1036
                r1 = rf(ctx)
×
1037
        } else {
×
1038
                r1 = ret.Error(1)
×
1039
        }
×
1040

1041
        return r0, r1
×
1042
}
1043

1044
// GetTenantDbs provides a mock function with given fields:
1045
func (_m *DataStore) GetTenantDbs() ([]string, error) {
×
1046
        ret := _m.Called()
×
1047

×
1048
        if len(ret) == 0 {
×
1049
                panic("no return value specified for GetTenantDbs")
×
1050
        }
1051

1052
        var r0 []string
×
1053
        var r1 error
×
1054
        if rf, ok := ret.Get(0).(func() ([]string, error)); ok {
×
1055
                return rf()
×
1056
        }
×
1057
        if rf, ok := ret.Get(0).(func() []string); ok {
×
1058
                r0 = rf()
×
1059
        } else {
×
1060
                if ret.Get(0) != nil {
×
1061
                        r0 = ret.Get(0).([]string)
×
1062
                }
×
1063
        }
1064

1065
        if rf, ok := ret.Get(1).(func() error); ok {
×
1066
                r1 = rf()
×
1067
        } else {
×
1068
                r1 = ret.Error(1)
×
1069
        }
×
1070

1071
        return r0, r1
×
1072
}
1073

1074
// GetUpdateTypes provides a mock function with given fields: ctx
1075
func (_m *DataStore) GetUpdateTypes(ctx context.Context) ([]string, error) {
×
1076
        ret := _m.Called(ctx)
×
1077

×
1078
        if len(ret) == 0 {
×
1079
                panic("no return value specified for GetUpdateTypes")
×
1080
        }
1081

1082
        var r0 []string
×
1083
        var r1 error
×
1084
        if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
×
1085
                return rf(ctx)
×
1086
        }
×
1087
        if rf, ok := ret.Get(0).(func(context.Context) []string); ok {
×
1088
                r0 = rf(ctx)
×
1089
        } else {
×
1090
                if ret.Get(0) != nil {
×
1091
                        r0 = ret.Get(0).([]string)
×
1092
                }
×
1093
        }
1094

1095
        if rf, ok := ret.Get(1).(func(context.Context) error); ok {
×
1096
                r1 = rf(ctx)
×
1097
        } else {
×
1098
                r1 = ret.Error(1)
×
1099
        }
×
1100

1101
        return r0, r1
×
1102
}
1103

1104
// HasDeploymentForDevice provides a mock function with given fields: ctx, deploymentID, deviceID
1105
func (_m *DataStore) HasDeploymentForDevice(ctx context.Context, deploymentID string, deviceID string) (bool, error) {
×
1106
        ret := _m.Called(ctx, deploymentID, deviceID)
×
1107

×
1108
        if len(ret) == 0 {
×
1109
                panic("no return value specified for HasDeploymentForDevice")
×
1110
        }
1111

1112
        var r0 bool
×
1113
        var r1 error
×
1114
        if rf, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok {
×
1115
                return rf(ctx, deploymentID, deviceID)
×
1116
        }
×
1117
        if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok {
×
1118
                r0 = rf(ctx, deploymentID, deviceID)
×
1119
        } else {
×
1120
                r0 = ret.Get(0).(bool)
×
1121
        }
×
1122

1123
        if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
×
1124
                r1 = rf(ctx, deploymentID, deviceID)
×
1125
        } else {
×
1126
                r1 = ret.Error(1)
×
1127
        }
×
1128

1129
        return r0, r1
×
1130
}
1131

1132
// ImageByIdsAndDeviceType provides a mock function with given fields: ctx, ids, deviceType
1133
func (_m *DataStore) ImageByIdsAndDeviceType(ctx context.Context, ids []string, deviceType string) (*model.Image, error) {
×
1134
        ret := _m.Called(ctx, ids, deviceType)
×
1135

×
1136
        if len(ret) == 0 {
×
1137
                panic("no return value specified for ImageByIdsAndDeviceType")
×
1138
        }
1139

1140
        var r0 *model.Image
×
1141
        var r1 error
×
1142
        if rf, ok := ret.Get(0).(func(context.Context, []string, string) (*model.Image, error)); ok {
×
1143
                return rf(ctx, ids, deviceType)
×
1144
        }
×
1145
        if rf, ok := ret.Get(0).(func(context.Context, []string, string) *model.Image); ok {
×
1146
                r0 = rf(ctx, ids, deviceType)
×
1147
        } else {
×
1148
                if ret.Get(0) != nil {
×
1149
                        r0 = ret.Get(0).(*model.Image)
×
1150
                }
×
1151
        }
1152

1153
        if rf, ok := ret.Get(1).(func(context.Context, []string, string) error); ok {
×
1154
                r1 = rf(ctx, ids, deviceType)
×
1155
        } else {
×
1156
                r1 = ret.Error(1)
×
1157
        }
×
1158

1159
        return r0, r1
×
1160
}
1161

1162
// ImageByNameAndDeviceType provides a mock function with given fields: ctx, name, deviceType
1163
func (_m *DataStore) ImageByNameAndDeviceType(ctx context.Context, name string, deviceType string) (*model.Image, error) {
×
1164
        ret := _m.Called(ctx, name, deviceType)
×
1165

×
1166
        if len(ret) == 0 {
×
1167
                panic("no return value specified for ImageByNameAndDeviceType")
×
1168
        }
1169

1170
        var r0 *model.Image
×
1171
        var r1 error
×
1172
        if rf, ok := ret.Get(0).(func(context.Context, string, string) (*model.Image, error)); ok {
×
1173
                return rf(ctx, name, deviceType)
×
1174
        }
×
1175
        if rf, ok := ret.Get(0).(func(context.Context, string, string) *model.Image); ok {
×
1176
                r0 = rf(ctx, name, deviceType)
×
1177
        } else {
×
1178
                if ret.Get(0) != nil {
×
1179
                        r0 = ret.Get(0).(*model.Image)
×
1180
                }
×
1181
        }
1182

1183
        if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
×
1184
                r1 = rf(ctx, name, deviceType)
×
1185
        } else {
×
1186
                r1 = ret.Error(1)
×
1187
        }
×
1188

1189
        return r0, r1
×
1190
}
1191

1192
// ImagesByName provides a mock function with given fields: ctx, artifactName
1193
func (_m *DataStore) ImagesByName(ctx context.Context, artifactName string) ([]*model.Image, error) {
×
1194
        ret := _m.Called(ctx, artifactName)
×
1195

×
1196
        if len(ret) == 0 {
×
1197
                panic("no return value specified for ImagesByName")
×
1198
        }
1199

1200
        var r0 []*model.Image
×
1201
        var r1 error
×
1202
        if rf, ok := ret.Get(0).(func(context.Context, string) ([]*model.Image, error)); ok {
×
1203
                return rf(ctx, artifactName)
×
1204
        }
×
1205
        if rf, ok := ret.Get(0).(func(context.Context, string) []*model.Image); ok {
×
1206
                r0 = rf(ctx, artifactName)
×
1207
        } else {
×
1208
                if ret.Get(0) != nil {
×
1209
                        r0 = ret.Get(0).([]*model.Image)
×
1210
                }
×
1211
        }
1212

1213
        if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
×
1214
                r1 = rf(ctx, artifactName)
×
1215
        } else {
×
1216
                r1 = ret.Error(1)
×
1217
        }
×
1218

1219
        return r0, r1
×
1220
}
1221

1222
// IncrementDeploymentDeviceCount provides a mock function with given fields: ctx, deploymentID, increment
1223
func (_m *DataStore) IncrementDeploymentDeviceCount(ctx context.Context, deploymentID string, increment int) error {
×
1224
        ret := _m.Called(ctx, deploymentID, increment)
×
1225

×
1226
        if len(ret) == 0 {
×
1227
                panic("no return value specified for IncrementDeploymentDeviceCount")
×
1228
        }
1229

1230
        var r0 error
×
1231
        if rf, ok := ret.Get(0).(func(context.Context, string, int) error); ok {
×
1232
                r0 = rf(ctx, deploymentID, increment)
×
1233
        } else {
×
1234
                r0 = ret.Error(0)
×
1235
        }
×
1236

1237
        return r0
×
1238
}
1239

1240
// IncrementDeploymentTotalSize provides a mock function with given fields: ctx, deploymentID, increment
1241
func (_m *DataStore) IncrementDeploymentTotalSize(ctx context.Context, deploymentID string, increment int64) error {
×
1242
        ret := _m.Called(ctx, deploymentID, increment)
×
1243

×
1244
        if len(ret) == 0 {
×
1245
                panic("no return value specified for IncrementDeploymentTotalSize")
×
1246
        }
1247

1248
        var r0 error
×
1249
        if rf, ok := ret.Get(0).(func(context.Context, string, int64) error); ok {
×
1250
                r0 = rf(ctx, deploymentID, increment)
×
1251
        } else {
×
1252
                r0 = ret.Error(0)
×
1253
        }
×
1254

1255
        return r0
×
1256
}
1257

1258
// InsertDeployment provides a mock function with given fields: ctx, deployment
1259
func (_m *DataStore) InsertDeployment(ctx context.Context, deployment *model.Deployment) error {
×
1260
        ret := _m.Called(ctx, deployment)
×
1261

×
1262
        if len(ret) == 0 {
×
1263
                panic("no return value specified for InsertDeployment")
×
1264
        }
1265

1266
        var r0 error
×
1267
        if rf, ok := ret.Get(0).(func(context.Context, *model.Deployment) error); ok {
×
1268
                r0 = rf(ctx, deployment)
×
1269
        } else {
×
1270
                r0 = ret.Error(0)
×
1271
        }
×
1272

1273
        return r0
×
1274
}
1275

1276
// InsertDeviceDeployment provides a mock function with given fields: ctx, deviceDeployment, incrementDeviceCount
1277
func (_m *DataStore) InsertDeviceDeployment(ctx context.Context, deviceDeployment *model.DeviceDeployment, incrementDeviceCount bool) error {
×
1278
        ret := _m.Called(ctx, deviceDeployment, incrementDeviceCount)
×
1279

×
1280
        if len(ret) == 0 {
×
1281
                panic("no return value specified for InsertDeviceDeployment")
×
1282
        }
1283

1284
        var r0 error
×
1285
        if rf, ok := ret.Get(0).(func(context.Context, *model.DeviceDeployment, bool) error); ok {
×
1286
                r0 = rf(ctx, deviceDeployment, incrementDeviceCount)
×
1287
        } else {
×
1288
                r0 = ret.Error(0)
×
1289
        }
×
1290

1291
        return r0
×
1292
}
1293

1294
// InsertImage provides a mock function with given fields: ctx, image
1295
func (_m *DataStore) InsertImage(ctx context.Context, image *model.Image) error {
×
1296
        ret := _m.Called(ctx, image)
×
1297

×
1298
        if len(ret) == 0 {
×
1299
                panic("no return value specified for InsertImage")
×
1300
        }
1301

1302
        var r0 error
×
1303
        if rf, ok := ret.Get(0).(func(context.Context, *model.Image) error); ok {
×
1304
                r0 = rf(ctx, image)
×
1305
        } else {
×
1306
                r0 = ret.Error(0)
×
1307
        }
×
1308

1309
        return r0
×
1310
}
1311

1312
// InsertMany provides a mock function with given fields: ctx, deployment
1313
func (_m *DataStore) InsertMany(ctx context.Context, deployment ...*model.DeviceDeployment) error {
×
1314
        _va := make([]interface{}, len(deployment))
×
1315
        for _i := range deployment {
×
1316
                _va[_i] = deployment[_i]
×
1317
        }
×
1318
        var _ca []interface{}
×
1319
        _ca = append(_ca, ctx)
×
1320
        _ca = append(_ca, _va...)
×
1321
        ret := _m.Called(_ca...)
×
1322

×
1323
        if len(ret) == 0 {
×
1324
                panic("no return value specified for InsertMany")
×
1325
        }
1326

1327
        var r0 error
×
1328
        if rf, ok := ret.Get(0).(func(context.Context, ...*model.DeviceDeployment) error); ok {
×
1329
                r0 = rf(ctx, deployment...)
×
1330
        } else {
×
1331
                r0 = ret.Error(0)
×
1332
        }
×
1333

1334
        return r0
×
1335
}
1336

1337
// InsertUploadIntent provides a mock function with given fields: ctx, link
1338
func (_m *DataStore) InsertUploadIntent(ctx context.Context, link *model.UploadLink) error {
×
1339
        ret := _m.Called(ctx, link)
×
1340

×
1341
        if len(ret) == 0 {
×
1342
                panic("no return value specified for InsertUploadIntent")
×
1343
        }
1344

1345
        var r0 error
×
1346
        if rf, ok := ret.Get(0).(func(context.Context, *model.UploadLink) error); ok {
×
1347
                r0 = rf(ctx, link)
×
1348
        } else {
×
1349
                r0 = ret.Error(0)
×
1350
        }
×
1351

1352
        return r0
×
1353
}
1354

1355
// IsArtifactUnique provides a mock function with given fields: ctx, artifactName, deviceTypesCompatible
1356
func (_m *DataStore) IsArtifactUnique(ctx context.Context, artifactName string, deviceTypesCompatible []string) (bool, error) {
×
1357
        ret := _m.Called(ctx, artifactName, deviceTypesCompatible)
×
1358

×
1359
        if len(ret) == 0 {
×
1360
                panic("no return value specified for IsArtifactUnique")
×
1361
        }
1362

1363
        var r0 bool
×
1364
        var r1 error
×
1365
        if rf, ok := ret.Get(0).(func(context.Context, string, []string) (bool, error)); ok {
×
1366
                return rf(ctx, artifactName, deviceTypesCompatible)
×
1367
        }
×
1368
        if rf, ok := ret.Get(0).(func(context.Context, string, []string) bool); ok {
×
1369
                r0 = rf(ctx, artifactName, deviceTypesCompatible)
×
1370
        } else {
×
1371
                r0 = ret.Get(0).(bool)
×
1372
        }
×
1373

1374
        if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok {
×
1375
                r1 = rf(ctx, artifactName, deviceTypesCompatible)
×
1376
        } else {
×
1377
                r1 = ret.Error(1)
×
1378
        }
×
1379

1380
        return r0, r1
×
1381
}
1382

1383
// ListImages provides a mock function with given fields: ctx, filt
1384
func (_m *DataStore) ListImages(ctx context.Context, filt *model.ReleaseOrImageFilter) ([]*model.Image, int, error) {
×
1385
        ret := _m.Called(ctx, filt)
×
1386

×
1387
        if len(ret) == 0 {
×
1388
                panic("no return value specified for ListImages")
×
1389
        }
1390

1391
        var r0 []*model.Image
×
1392
        var r1 int
×
1393
        var r2 error
×
1394
        if rf, ok := ret.Get(0).(func(context.Context, *model.ReleaseOrImageFilter) ([]*model.Image, int, error)); ok {
×
1395
                return rf(ctx, filt)
×
1396
        }
×
1397
        if rf, ok := ret.Get(0).(func(context.Context, *model.ReleaseOrImageFilter) []*model.Image); ok {
×
1398
                r0 = rf(ctx, filt)
×
1399
        } else {
×
1400
                if ret.Get(0) != nil {
×
1401
                        r0 = ret.Get(0).([]*model.Image)
×
1402
                }
×
1403
        }
1404

1405
        if rf, ok := ret.Get(1).(func(context.Context, *model.ReleaseOrImageFilter) int); ok {
×
1406
                r1 = rf(ctx, filt)
×
1407
        } else {
×
1408
                r1 = ret.Get(1).(int)
×
1409
        }
×
1410

1411
        if rf, ok := ret.Get(2).(func(context.Context, *model.ReleaseOrImageFilter) error); ok {
×
1412
                r2 = rf(ctx, filt)
×
1413
        } else {
×
1414
                r2 = ret.Error(2)
×
1415
        }
×
1416

1417
        return r0, r1, r2
×
1418
}
1419

1420
// ListImagesV2 provides a mock function with given fields: ctx, filt
NEW
1421
func (_m *DataStore) ListImagesV2(ctx context.Context, filt *model.ImageFilter) ([]*model.Image, error) {
×
NEW
1422
        ret := _m.Called(ctx, filt)
×
NEW
1423

×
NEW
1424
        if len(ret) == 0 {
×
NEW
1425
                panic("no return value specified for ListImagesV2")
×
1426
        }
1427

NEW
1428
        var r0 []*model.Image
×
NEW
1429
        var r1 error
×
NEW
1430
        if rf, ok := ret.Get(0).(func(context.Context, *model.ImageFilter) ([]*model.Image, error)); ok {
×
NEW
1431
                return rf(ctx, filt)
×
NEW
1432
        }
×
NEW
1433
        if rf, ok := ret.Get(0).(func(context.Context, *model.ImageFilter) []*model.Image); ok {
×
NEW
1434
                r0 = rf(ctx, filt)
×
NEW
1435
        } else {
×
NEW
1436
                if ret.Get(0) != nil {
×
NEW
1437
                        r0 = ret.Get(0).([]*model.Image)
×
NEW
1438
                }
×
1439
        }
1440

NEW
1441
        if rf, ok := ret.Get(1).(func(context.Context, *model.ImageFilter) error); ok {
×
NEW
1442
                r1 = rf(ctx, filt)
×
NEW
1443
        } else {
×
NEW
1444
                r1 = ret.Error(1)
×
NEW
1445
        }
×
1446

NEW
1447
        return r0, r1
×
1448
}
1449

1450
// ListReleaseTags provides a mock function with given fields: ctx
1451
func (_m *DataStore) ListReleaseTags(ctx context.Context) (model.Tags, error) {
×
1452
        ret := _m.Called(ctx)
×
1453

×
1454
        if len(ret) == 0 {
×
1455
                panic("no return value specified for ListReleaseTags")
×
1456
        }
1457

1458
        var r0 model.Tags
×
1459
        var r1 error
×
1460
        if rf, ok := ret.Get(0).(func(context.Context) (model.Tags, error)); ok {
×
1461
                return rf(ctx)
×
1462
        }
×
1463
        if rf, ok := ret.Get(0).(func(context.Context) model.Tags); ok {
×
1464
                r0 = rf(ctx)
×
1465
        } else {
×
1466
                if ret.Get(0) != nil {
×
1467
                        r0 = ret.Get(0).(model.Tags)
×
1468
                }
×
1469
        }
1470

1471
        if rf, ok := ret.Get(1).(func(context.Context) error); ok {
×
1472
                r1 = rf(ctx)
×
1473
        } else {
×
1474
                r1 = ret.Error(1)
×
1475
        }
×
1476

1477
        return r0, r1
×
1478
}
1479

1480
// Ping provides a mock function with given fields: ctx
1481
func (_m *DataStore) Ping(ctx context.Context) error {
×
1482
        ret := _m.Called(ctx)
×
1483

×
1484
        if len(ret) == 0 {
×
1485
                panic("no return value specified for Ping")
×
1486
        }
1487

1488
        var r0 error
×
1489
        if rf, ok := ret.Get(0).(func(context.Context) error); ok {
×
1490
                r0 = rf(ctx)
×
1491
        } else {
×
1492
                r0 = ret.Error(0)
×
1493
        }
×
1494

1495
        return r0
×
1496
}
1497

1498
// ProvisionTenant provides a mock function with given fields: ctx, tenantId
1499
func (_m *DataStore) ProvisionTenant(ctx context.Context, tenantId string) error {
×
1500
        ret := _m.Called(ctx, tenantId)
×
1501

×
1502
        if len(ret) == 0 {
×
1503
                panic("no return value specified for ProvisionTenant")
×
1504
        }
1505

1506
        var r0 error
×
1507
        if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
×
1508
                r0 = rf(ctx, tenantId)
×
1509
        } else {
×
1510
                r0 = ret.Error(0)
×
1511
        }
×
1512

1513
        return r0
×
1514
}
1515

1516
// ReplaceReleaseTags provides a mock function with given fields: ctx, releaseName, tags
1517
func (_m *DataStore) ReplaceReleaseTags(ctx context.Context, releaseName string, tags model.Tags) error {
×
1518
        ret := _m.Called(ctx, releaseName, tags)
×
1519

×
1520
        if len(ret) == 0 {
×
1521
                panic("no return value specified for ReplaceReleaseTags")
×
1522
        }
1523

1524
        var r0 error
×
1525
        if rf, ok := ret.Get(0).(func(context.Context, string, model.Tags) error); ok {
×
1526
                r0 = rf(ctx, releaseName, tags)
×
1527
        } else {
×
1528
                r0 = ret.Error(0)
×
1529
        }
×
1530

1531
        return r0
×
1532
}
1533

1534
// SaveDeviceDeploymentLog provides a mock function with given fields: ctx, log
1535
func (_m *DataStore) SaveDeviceDeploymentLog(ctx context.Context, log model.DeploymentLog) error {
×
1536
        ret := _m.Called(ctx, log)
×
1537

×
1538
        if len(ret) == 0 {
×
1539
                panic("no return value specified for SaveDeviceDeploymentLog")
×
1540
        }
1541

1542
        var r0 error
×
1543
        if rf, ok := ret.Get(0).(func(context.Context, model.DeploymentLog) error); ok {
×
1544
                r0 = rf(ctx, log)
×
1545
        } else {
×
1546
                r0 = ret.Error(0)
×
1547
        }
×
1548

1549
        return r0
×
1550
}
1551

1552
// SaveDeviceDeploymentRequest provides a mock function with given fields: ctx, ID, request
1553
func (_m *DataStore) SaveDeviceDeploymentRequest(ctx context.Context, ID string, request *model.DeploymentNextRequest) error {
×
1554
        ret := _m.Called(ctx, ID, request)
×
1555

×
1556
        if len(ret) == 0 {
×
1557
                panic("no return value specified for SaveDeviceDeploymentRequest")
×
1558
        }
1559

1560
        var r0 error
×
1561
        if rf, ok := ret.Get(0).(func(context.Context, string, *model.DeploymentNextRequest) error); ok {
×
1562
                r0 = rf(ctx, ID, request)
×
1563
        } else {
×
1564
                r0 = ret.Error(0)
×
1565
        }
×
1566

1567
        return r0
×
1568
}
1569

1570
// SaveLastDeviceDeploymentStatus provides a mock function with given fields: ctx, deviceDeployment
1571
func (_m *DataStore) SaveLastDeviceDeploymentStatus(ctx context.Context, deviceDeployment model.DeviceDeployment) error {
×
1572
        ret := _m.Called(ctx, deviceDeployment)
×
1573

×
1574
        if len(ret) == 0 {
×
1575
                panic("no return value specified for SaveLastDeviceDeploymentStatus")
×
1576
        }
1577

1578
        var r0 error
×
1579
        if rf, ok := ret.Get(0).(func(context.Context, model.DeviceDeployment) error); ok {
×
1580
                r0 = rf(ctx, deviceDeployment)
×
1581
        } else {
×
1582
                r0 = ret.Error(0)
×
1583
        }
×
1584

1585
        return r0
×
1586
}
1587

1588
// SaveUpdateTypes provides a mock function with given fields: ctx, updateTypes
1589
func (_m *DataStore) SaveUpdateTypes(ctx context.Context, updateTypes []string) error {
×
1590
        ret := _m.Called(ctx, updateTypes)
×
1591

×
1592
        if len(ret) == 0 {
×
1593
                panic("no return value specified for SaveUpdateTypes")
×
1594
        }
1595

1596
        var r0 error
×
1597
        if rf, ok := ret.Get(0).(func(context.Context, []string) error); ok {
×
1598
                r0 = rf(ctx, updateTypes)
×
1599
        } else {
×
1600
                r0 = ret.Error(0)
×
1601
        }
×
1602

1603
        return r0
×
1604
}
1605

1606
// SetDeploymentDeviceCount provides a mock function with given fields: ctx, deploymentID, count
1607
func (_m *DataStore) SetDeploymentDeviceCount(ctx context.Context, deploymentID string, count int) error {
×
1608
        ret := _m.Called(ctx, deploymentID, count)
×
1609

×
1610
        if len(ret) == 0 {
×
1611
                panic("no return value specified for SetDeploymentDeviceCount")
×
1612
        }
1613

1614
        var r0 error
×
1615
        if rf, ok := ret.Get(0).(func(context.Context, string, int) error); ok {
×
1616
                r0 = rf(ctx, deploymentID, count)
×
1617
        } else {
×
1618
                r0 = ret.Error(0)
×
1619
        }
×
1620

1621
        return r0
×
1622
}
1623

1624
// SetDeploymentStatus provides a mock function with given fields: ctx, id, status, now
1625
func (_m *DataStore) SetDeploymentStatus(ctx context.Context, id string, status model.DeploymentStatus, now time.Time) error {
×
1626
        ret := _m.Called(ctx, id, status, now)
×
1627

×
1628
        if len(ret) == 0 {
×
1629
                panic("no return value specified for SetDeploymentStatus")
×
1630
        }
1631

1632
        var r0 error
×
1633
        if rf, ok := ret.Get(0).(func(context.Context, string, model.DeploymentStatus, time.Time) error); ok {
×
1634
                r0 = rf(ctx, id, status, now)
×
1635
        } else {
×
1636
                r0 = ret.Error(0)
×
1637
        }
×
1638

1639
        return r0
×
1640
}
1641

1642
// SetStorageSettings provides a mock function with given fields: ctx, storageSettings
1643
func (_m *DataStore) SetStorageSettings(ctx context.Context, storageSettings *model.StorageSettings) error {
×
1644
        ret := _m.Called(ctx, storageSettings)
×
1645

×
1646
        if len(ret) == 0 {
×
1647
                panic("no return value specified for SetStorageSettings")
×
1648
        }
1649

1650
        var r0 error
×
1651
        if rf, ok := ret.Get(0).(func(context.Context, *model.StorageSettings) error); ok {
×
1652
                r0 = rf(ctx, storageSettings)
×
1653
        } else {
×
1654
                r0 = ret.Error(0)
×
1655
        }
×
1656

1657
        return r0
×
1658
}
1659

1660
// Update provides a mock function with given fields: ctx, image
1661
func (_m *DataStore) Update(ctx context.Context, image *model.Image) (bool, error) {
×
1662
        ret := _m.Called(ctx, image)
×
1663

×
1664
        if len(ret) == 0 {
×
1665
                panic("no return value specified for Update")
×
1666
        }
1667

1668
        var r0 bool
×
1669
        var r1 error
×
1670
        if rf, ok := ret.Get(0).(func(context.Context, *model.Image) (bool, error)); ok {
×
1671
                return rf(ctx, image)
×
1672
        }
×
1673
        if rf, ok := ret.Get(0).(func(context.Context, *model.Image) bool); ok {
×
1674
                r0 = rf(ctx, image)
×
1675
        } else {
×
1676
                r0 = ret.Get(0).(bool)
×
1677
        }
×
1678

1679
        if rf, ok := ret.Get(1).(func(context.Context, *model.Image) error); ok {
×
1680
                r1 = rf(ctx, image)
×
1681
        } else {
×
1682
                r1 = ret.Error(1)
×
1683
        }
×
1684

1685
        return r0, r1
×
1686
}
1687

1688
// UpdateDeploymentsWithArtifactName provides a mock function with given fields: ctx, artifactName, artifactIDs
1689
func (_m *DataStore) UpdateDeploymentsWithArtifactName(ctx context.Context, artifactName string, artifactIDs []string) error {
×
1690
        ret := _m.Called(ctx, artifactName, artifactIDs)
×
1691

×
1692
        if len(ret) == 0 {
×
1693
                panic("no return value specified for UpdateDeploymentsWithArtifactName")
×
1694
        }
1695

1696
        var r0 error
×
1697
        if rf, ok := ret.Get(0).(func(context.Context, string, []string) error); ok {
×
1698
                r0 = rf(ctx, artifactName, artifactIDs)
×
1699
        } else {
×
1700
                r0 = ret.Error(0)
×
1701
        }
×
1702

1703
        return r0
×
1704
}
1705

1706
// UpdateDeviceDeploymentLogAvailability provides a mock function with given fields: ctx, deviceID, deploymentID, log
1707
func (_m *DataStore) UpdateDeviceDeploymentLogAvailability(ctx context.Context, deviceID string, deploymentID string, log bool) error {
×
1708
        ret := _m.Called(ctx, deviceID, deploymentID, log)
×
1709

×
1710
        if len(ret) == 0 {
×
1711
                panic("no return value specified for UpdateDeviceDeploymentLogAvailability")
×
1712
        }
1713

1714
        var r0 error
×
1715
        if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) error); ok {
×
1716
                r0 = rf(ctx, deviceID, deploymentID, log)
×
1717
        } else {
×
1718
                r0 = ret.Error(0)
×
1719
        }
×
1720

1721
        return r0
×
1722
}
1723

1724
// UpdateDeviceDeploymentStatus provides a mock function with given fields: ctx, deviceID, deploymentID, state, currentStatus
1725
func (_m *DataStore) UpdateDeviceDeploymentStatus(ctx context.Context, deviceID string, deploymentID string, state model.DeviceDeploymentState, currentStatus model.DeviceDeploymentStatus) (model.DeviceDeploymentStatus, error) {
×
1726
        ret := _m.Called(ctx, deviceID, deploymentID, state, currentStatus)
×
1727

×
1728
        if len(ret) == 0 {
×
1729
                panic("no return value specified for UpdateDeviceDeploymentStatus")
×
1730
        }
1731

1732
        var r0 model.DeviceDeploymentStatus
×
1733
        var r1 error
×
1734
        if rf, ok := ret.Get(0).(func(context.Context, string, string, model.DeviceDeploymentState, model.DeviceDeploymentStatus) (model.DeviceDeploymentStatus, error)); ok {
×
1735
                return rf(ctx, deviceID, deploymentID, state, currentStatus)
×
1736
        }
×
1737
        if rf, ok := ret.Get(0).(func(context.Context, string, string, model.DeviceDeploymentState, model.DeviceDeploymentStatus) model.DeviceDeploymentStatus); ok {
×
1738
                r0 = rf(ctx, deviceID, deploymentID, state, currentStatus)
×
1739
        } else {
×
1740
                r0 = ret.Get(0).(model.DeviceDeploymentStatus)
×
1741
        }
×
1742

1743
        if rf, ok := ret.Get(1).(func(context.Context, string, string, model.DeviceDeploymentState, model.DeviceDeploymentStatus) error); ok {
×
1744
                r1 = rf(ctx, deviceID, deploymentID, state, currentStatus)
×
1745
        } else {
×
1746
                r1 = ret.Error(1)
×
1747
        }
×
1748

1749
        return r0, r1
×
1750
}
1751

1752
// UpdateRelease provides a mock function with given fields: ctx, releaseName, release
1753
func (_m *DataStore) UpdateRelease(ctx context.Context, releaseName string, release model.ReleasePatch) error {
×
1754
        ret := _m.Called(ctx, releaseName, release)
×
1755

×
1756
        if len(ret) == 0 {
×
1757
                panic("no return value specified for UpdateRelease")
×
1758
        }
1759

1760
        var r0 error
×
1761
        if rf, ok := ret.Get(0).(func(context.Context, string, model.ReleasePatch) error); ok {
×
1762
                r0 = rf(ctx, releaseName, release)
×
1763
        } else {
×
1764
                r0 = ret.Error(0)
×
1765
        }
×
1766

1767
        return r0
×
1768
}
1769

1770
// UpdateReleaseArtifactDescription provides a mock function with given fields: ctx, artifactToEdit, releaseName
1771
func (_m *DataStore) UpdateReleaseArtifactDescription(ctx context.Context, artifactToEdit *model.Image, releaseName string) error {
×
1772
        ret := _m.Called(ctx, artifactToEdit, releaseName)
×
1773

×
1774
        if len(ret) == 0 {
×
1775
                panic("no return value specified for UpdateReleaseArtifactDescription")
×
1776
        }
1777

1778
        var r0 error
×
1779
        if rf, ok := ret.Get(0).(func(context.Context, *model.Image, string) error); ok {
×
1780
                r0 = rf(ctx, artifactToEdit, releaseName)
×
1781
        } else {
×
1782
                r0 = ret.Error(0)
×
1783
        }
×
1784

1785
        return r0
×
1786
}
1787

1788
// UpdateReleaseArtifacts provides a mock function with given fields: ctx, artifactToAdd, artifactToRemove, releaseName
1789
func (_m *DataStore) UpdateReleaseArtifacts(ctx context.Context, artifactToAdd *model.Image, artifactToRemove *model.Image, releaseName string) error {
×
1790
        ret := _m.Called(ctx, artifactToAdd, artifactToRemove, releaseName)
×
1791

×
1792
        if len(ret) == 0 {
×
1793
                panic("no return value specified for UpdateReleaseArtifacts")
×
1794
        }
1795

1796
        var r0 error
×
1797
        if rf, ok := ret.Get(0).(func(context.Context, *model.Image, *model.Image, string) error); ok {
×
1798
                r0 = rf(ctx, artifactToAdd, artifactToRemove, releaseName)
×
1799
        } else {
×
1800
                r0 = ret.Error(0)
×
1801
        }
×
1802

1803
        return r0
×
1804
}
1805

1806
// UpdateStats provides a mock function with given fields: ctx, id, stats
1807
func (_m *DataStore) UpdateStats(ctx context.Context, id string, stats model.Stats) error {
×
1808
        ret := _m.Called(ctx, id, stats)
×
1809

×
1810
        if len(ret) == 0 {
×
1811
                panic("no return value specified for UpdateStats")
×
1812
        }
1813

1814
        var r0 error
×
1815
        if rf, ok := ret.Get(0).(func(context.Context, string, model.Stats) error); ok {
×
1816
                r0 = rf(ctx, id, stats)
×
1817
        } else {
×
1818
                r0 = ret.Error(0)
×
1819
        }
×
1820

1821
        return r0
×
1822
}
1823

1824
// UpdateStatsInc provides a mock function with given fields: ctx, id, stateFrom, stateTo
1825
func (_m *DataStore) UpdateStatsInc(ctx context.Context, id string, stateFrom model.DeviceDeploymentStatus, stateTo model.DeviceDeploymentStatus) (model.Stats, error) {
×
1826
        ret := _m.Called(ctx, id, stateFrom, stateTo)
×
1827

×
1828
        if len(ret) == 0 {
×
1829
                panic("no return value specified for UpdateStatsInc")
×
1830
        }
1831

1832
        var r0 model.Stats
×
1833
        var r1 error
×
1834
        if rf, ok := ret.Get(0).(func(context.Context, string, model.DeviceDeploymentStatus, model.DeviceDeploymentStatus) (model.Stats, error)); ok {
×
1835
                return rf(ctx, id, stateFrom, stateTo)
×
1836
        }
×
1837
        if rf, ok := ret.Get(0).(func(context.Context, string, model.DeviceDeploymentStatus, model.DeviceDeploymentStatus) model.Stats); ok {
×
1838
                r0 = rf(ctx, id, stateFrom, stateTo)
×
1839
        } else {
×
1840
                if ret.Get(0) != nil {
×
1841
                        r0 = ret.Get(0).(model.Stats)
×
1842
                }
×
1843
        }
1844

1845
        if rf, ok := ret.Get(1).(func(context.Context, string, model.DeviceDeploymentStatus, model.DeviceDeploymentStatus) error); ok {
×
1846
                r1 = rf(ctx, id, stateFrom, stateTo)
×
1847
        } else {
×
1848
                r1 = ret.Error(1)
×
1849
        }
×
1850

1851
        return r0, r1
×
1852
}
1853

1854
// UpdateUploadIntentStatus provides a mock function with given fields: ctx, id, from, to
1855
func (_m *DataStore) UpdateUploadIntentStatus(ctx context.Context, id string, from model.LinkStatus, to model.LinkStatus) error {
×
1856
        ret := _m.Called(ctx, id, from, to)
×
1857

×
1858
        if len(ret) == 0 {
×
1859
                panic("no return value specified for UpdateUploadIntentStatus")
×
1860
        }
1861

1862
        var r0 error
×
1863
        if rf, ok := ret.Get(0).(func(context.Context, string, model.LinkStatus, model.LinkStatus) error); ok {
×
1864
                r0 = rf(ctx, id, from, to)
×
1865
        } else {
×
1866
                r0 = ret.Error(0)
×
1867
        }
×
1868

1869
        return r0
×
1870
}
1871

1872
// NewDataStore creates a new instance of DataStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1873
// The first argument is typically a *testing.T value.
1874
func NewDataStore(t interface {
1875
        mock.TestingT
1876
        Cleanup(func())
1877
}) *DataStore {
×
1878
        mock := &DataStore{}
×
1879
        mock.Mock.Test(t)
×
1880

×
1881
        t.Cleanup(func() { mock.AssertExpectations(t) })
×
1882

1883
        return mock
×
1884
}
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