-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathcandlepin_client_mock.go
745 lines (602 loc) · 20.8 KB
/
candlepin_client_mock.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
// Code generated by mockery. DO NOT EDIT.
package candlepin_client
import (
context "context"
caliri "github.com/content-services/caliri/release/v4"
mock "github.com/stretchr/testify/mock"
)
// MockCandlepinClient is an autogenerated mock type for the CandlepinClient type
type MockCandlepinClient struct {
mock.Mock
}
// AddContentBatchToProduct provides a mock function with given fields: ctx, orgID, contentIDs
func (_m *MockCandlepinClient) AddContentBatchToProduct(ctx context.Context, orgID string, contentIDs []string) error {
ret := _m.Called(ctx, orgID, contentIDs)
if len(ret) == 0 {
panic("no return value specified for AddContentBatchToProduct")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, []string) error); ok {
r0 = rf(ctx, orgID, contentIDs)
} else {
r0 = ret.Error(0)
}
return r0
}
// AssociateEnvironment provides a mock function with given fields: ctx, orgID, templateName, consumerUuid
func (_m *MockCandlepinClient) AssociateEnvironment(ctx context.Context, orgID string, templateName string, consumerUuid string) error {
ret := _m.Called(ctx, orgID, templateName, consumerUuid)
if len(ret) == 0 {
panic("no return value specified for AssociateEnvironment")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok {
r0 = rf(ctx, orgID, templateName, consumerUuid)
} else {
r0 = ret.Error(0)
}
return r0
}
// CreateConsumer provides a mock function with given fields: ctx, orgID, name
func (_m *MockCandlepinClient) CreateConsumer(ctx context.Context, orgID string, name string) (*caliri.ConsumerDTO, error) {
ret := _m.Called(ctx, orgID, name)
if len(ret) == 0 {
panic("no return value specified for CreateConsumer")
}
var r0 *caliri.ConsumerDTO
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*caliri.ConsumerDTO, error)); ok {
return rf(ctx, orgID, name)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) *caliri.ConsumerDTO); ok {
r0 = rf(ctx, orgID, name)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*caliri.ConsumerDTO)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, orgID, name)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CreateContent provides a mock function with given fields: ctx, orgID, content
func (_m *MockCandlepinClient) CreateContent(ctx context.Context, orgID string, content caliri.ContentDTO) error {
ret := _m.Called(ctx, orgID, content)
if len(ret) == 0 {
panic("no return value specified for CreateContent")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, caliri.ContentDTO) error); ok {
r0 = rf(ctx, orgID, content)
} else {
r0 = ret.Error(0)
}
return r0
}
// CreateContentBatch provides a mock function with given fields: ctx, orgID, content
func (_m *MockCandlepinClient) CreateContentBatch(ctx context.Context, orgID string, content []caliri.ContentDTO) error {
ret := _m.Called(ctx, orgID, content)
if len(ret) == 0 {
panic("no return value specified for CreateContentBatch")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, []caliri.ContentDTO) error); ok {
r0 = rf(ctx, orgID, content)
} else {
r0 = ret.Error(0)
}
return r0
}
// CreateEnvironment provides a mock function with given fields: ctx, orgID, name, id, prefix
func (_m *MockCandlepinClient) CreateEnvironment(ctx context.Context, orgID string, name string, id string, prefix string) (*caliri.EnvironmentDTO, error) {
ret := _m.Called(ctx, orgID, name, id, prefix)
if len(ret) == 0 {
panic("no return value specified for CreateEnvironment")
}
var r0 *caliri.EnvironmentDTO
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) (*caliri.EnvironmentDTO, error)); ok {
return rf(ctx, orgID, name, id, prefix)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) *caliri.EnvironmentDTO); ok {
r0 = rf(ctx, orgID, name, id, prefix)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*caliri.EnvironmentDTO)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok {
r1 = rf(ctx, orgID, name, id, prefix)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CreateOwner provides a mock function with given fields: ctx
func (_m *MockCandlepinClient) CreateOwner(ctx context.Context) error {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for CreateOwner")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
r0 = rf(ctx)
} else {
r0 = ret.Error(0)
}
return r0
}
// CreatePool provides a mock function with given fields: ctx, orgID
func (_m *MockCandlepinClient) CreatePool(ctx context.Context, orgID string) (string, error) {
ret := _m.Called(ctx, orgID)
if len(ret) == 0 {
panic("no return value specified for CreatePool")
}
var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok {
return rf(ctx, orgID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) string); ok {
r0 = rf(ctx, orgID)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, orgID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CreateProduct provides a mock function with given fields: ctx, orgID
func (_m *MockCandlepinClient) CreateProduct(ctx context.Context, orgID string) error {
ret := _m.Called(ctx, orgID)
if len(ret) == 0 {
panic("no return value specified for CreateProduct")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, orgID)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteConsumer provides a mock function with given fields: ctx, consumerUUID
func (_m *MockCandlepinClient) DeleteConsumer(ctx context.Context, consumerUUID string) error {
ret := _m.Called(ctx, consumerUUID)
if len(ret) == 0 {
panic("no return value specified for DeleteConsumer")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, consumerUUID)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteContent provides a mock function with given fields: ctx, ownerKey, repoConfigUUID
func (_m *MockCandlepinClient) DeleteContent(ctx context.Context, ownerKey string, repoConfigUUID string) error {
ret := _m.Called(ctx, ownerKey, repoConfigUUID)
if len(ret) == 0 {
panic("no return value specified for DeleteContent")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
r0 = rf(ctx, ownerKey, repoConfigUUID)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteEnvironment provides a mock function with given fields: ctx, templateUUID
func (_m *MockCandlepinClient) DeleteEnvironment(ctx context.Context, templateUUID string) error {
ret := _m.Called(ctx, templateUUID)
if len(ret) == 0 {
panic("no return value specified for DeleteEnvironment")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, templateUUID)
} else {
r0 = ret.Error(0)
}
return r0
}
// DemoteContentFromEnvironment provides a mock function with given fields: ctx, templateUUID, repoConfigUUIDs
func (_m *MockCandlepinClient) DemoteContentFromEnvironment(ctx context.Context, templateUUID string, repoConfigUUIDs []string) error {
ret := _m.Called(ctx, templateUUID, repoConfigUUIDs)
if len(ret) == 0 {
panic("no return value specified for DemoteContentFromEnvironment")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, []string) error); ok {
r0 = rf(ctx, templateUUID, repoConfigUUIDs)
} else {
r0 = ret.Error(0)
}
return r0
}
// FetchConsumer provides a mock function with given fields: ctx, consumerUUID
func (_m *MockCandlepinClient) FetchConsumer(ctx context.Context, consumerUUID string) (*caliri.ConsumerDTO, error) {
ret := _m.Called(ctx, consumerUUID)
if len(ret) == 0 {
panic("no return value specified for FetchConsumer")
}
var r0 *caliri.ConsumerDTO
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*caliri.ConsumerDTO, error)); ok {
return rf(ctx, consumerUUID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *caliri.ConsumerDTO); ok {
r0 = rf(ctx, consumerUUID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*caliri.ConsumerDTO)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, consumerUUID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FetchContent provides a mock function with given fields: ctx, orgID, repoConfigUUID
func (_m *MockCandlepinClient) FetchContent(ctx context.Context, orgID string, repoConfigUUID string) (*caliri.ContentDTO, error) {
ret := _m.Called(ctx, orgID, repoConfigUUID)
if len(ret) == 0 {
panic("no return value specified for FetchContent")
}
var r0 *caliri.ContentDTO
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*caliri.ContentDTO, error)); ok {
return rf(ctx, orgID, repoConfigUUID)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) *caliri.ContentDTO); ok {
r0 = rf(ctx, orgID, repoConfigUUID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*caliri.ContentDTO)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, orgID, repoConfigUUID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FetchContentOverrides provides a mock function with given fields: ctx, templateUUID
func (_m *MockCandlepinClient) FetchContentOverrides(ctx context.Context, templateUUID string) ([]caliri.ContentOverrideDTO, error) {
ret := _m.Called(ctx, templateUUID)
if len(ret) == 0 {
panic("no return value specified for FetchContentOverrides")
}
var r0 []caliri.ContentOverrideDTO
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]caliri.ContentOverrideDTO, error)); ok {
return rf(ctx, templateUUID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []caliri.ContentOverrideDTO); ok {
r0 = rf(ctx, templateUUID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]caliri.ContentOverrideDTO)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, templateUUID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FetchContentOverridesForRepo provides a mock function with given fields: ctx, templateUUID, label
func (_m *MockCandlepinClient) FetchContentOverridesForRepo(ctx context.Context, templateUUID string, label string) ([]caliri.ContentOverrideDTO, error) {
ret := _m.Called(ctx, templateUUID, label)
if len(ret) == 0 {
panic("no return value specified for FetchContentOverridesForRepo")
}
var r0 []caliri.ContentOverrideDTO
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]caliri.ContentOverrideDTO, error)); ok {
return rf(ctx, templateUUID, label)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) []caliri.ContentOverrideDTO); ok {
r0 = rf(ctx, templateUUID, label)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]caliri.ContentOverrideDTO)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, templateUUID, label)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FetchContentsByLabel provides a mock function with given fields: ctx, orgID, labels
func (_m *MockCandlepinClient) FetchContentsByLabel(ctx context.Context, orgID string, labels []string) ([]caliri.ContentDTO, error) {
ret := _m.Called(ctx, orgID, labels)
if len(ret) == 0 {
panic("no return value specified for FetchContentsByLabel")
}
var r0 []caliri.ContentDTO
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, []string) ([]caliri.ContentDTO, error)); ok {
return rf(ctx, orgID, labels)
}
if rf, ok := ret.Get(0).(func(context.Context, string, []string) []caliri.ContentDTO); ok {
r0 = rf(ctx, orgID, labels)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]caliri.ContentDTO)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok {
r1 = rf(ctx, orgID, labels)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FetchEnvironment provides a mock function with given fields: ctx, templateUUID
func (_m *MockCandlepinClient) FetchEnvironment(ctx context.Context, templateUUID string) (*caliri.EnvironmentDTO, error) {
ret := _m.Called(ctx, templateUUID)
if len(ret) == 0 {
panic("no return value specified for FetchEnvironment")
}
var r0 *caliri.EnvironmentDTO
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*caliri.EnvironmentDTO, error)); ok {
return rf(ctx, templateUUID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *caliri.EnvironmentDTO); ok {
r0 = rf(ctx, templateUUID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*caliri.EnvironmentDTO)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, templateUUID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FetchPool provides a mock function with given fields: ctx, orgID
func (_m *MockCandlepinClient) FetchPool(ctx context.Context, orgID string) (*caliri.PoolDTO, error) {
ret := _m.Called(ctx, orgID)
if len(ret) == 0 {
panic("no return value specified for FetchPool")
}
var r0 *caliri.PoolDTO
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*caliri.PoolDTO, error)); ok {
return rf(ctx, orgID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *caliri.PoolDTO); ok {
r0 = rf(ctx, orgID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*caliri.PoolDTO)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, orgID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FetchProduct provides a mock function with given fields: ctx, orgID, productID
func (_m *MockCandlepinClient) FetchProduct(ctx context.Context, orgID string, productID string) (*caliri.ProductDTO, error) {
ret := _m.Called(ctx, orgID, productID)
if len(ret) == 0 {
panic("no return value specified for FetchProduct")
}
var r0 *caliri.ProductDTO
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*caliri.ProductDTO, error)); ok {
return rf(ctx, orgID, productID)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) *caliri.ProductDTO); ok {
r0 = rf(ctx, orgID, productID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*caliri.ProductDTO)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, orgID, productID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ImportManifest provides a mock function with given fields: ctx, filename
func (_m *MockCandlepinClient) ImportManifest(ctx context.Context, filename string) error {
ret := _m.Called(ctx, filename)
if len(ret) == 0 {
panic("no return value specified for ImportManifest")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, filename)
} else {
r0 = ret.Error(0)
}
return r0
}
// ListContents provides a mock function with given fields: ctx, orgID
func (_m *MockCandlepinClient) ListContents(ctx context.Context, orgID string) ([]string, []string, error) {
ret := _m.Called(ctx, orgID)
if len(ret) == 0 {
panic("no return value specified for ListContents")
}
var r0 []string
var r1 []string
var r2 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]string, []string, error)); ok {
return rf(ctx, orgID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []string); ok {
r0 = rf(ctx, orgID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) []string); ok {
r1 = rf(ctx, orgID)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).([]string)
}
}
if rf, ok := ret.Get(2).(func(context.Context, string) error); ok {
r2 = rf(ctx, orgID)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// ListProducts provides a mock function with given fields: ctx, orgID, productIDs
func (_m *MockCandlepinClient) ListProducts(ctx context.Context, orgID string, productIDs []string) ([]caliri.ProductDTO, error) {
ret := _m.Called(ctx, orgID, productIDs)
if len(ret) == 0 {
panic("no return value specified for ListProducts")
}
var r0 []caliri.ProductDTO
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, []string) ([]caliri.ProductDTO, error)); ok {
return rf(ctx, orgID, productIDs)
}
if rf, ok := ret.Get(0).(func(context.Context, string, []string) []caliri.ProductDTO); ok {
r0 = rf(ctx, orgID, productIDs)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]caliri.ProductDTO)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok {
r1 = rf(ctx, orgID, productIDs)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PromoteContentToEnvironment provides a mock function with given fields: ctx, templateUUID, repoConfigUUIDs
func (_m *MockCandlepinClient) PromoteContentToEnvironment(ctx context.Context, templateUUID string, repoConfigUUIDs []string) error {
ret := _m.Called(ctx, templateUUID, repoConfigUUIDs)
if len(ret) == 0 {
panic("no return value specified for PromoteContentToEnvironment")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, []string) error); ok {
r0 = rf(ctx, templateUUID, repoConfigUUIDs)
} else {
r0 = ret.Error(0)
}
return r0
}
// RemoveContentFromProduct provides a mock function with given fields: ctx, orgID, repoConfigUUID
func (_m *MockCandlepinClient) RemoveContentFromProduct(ctx context.Context, orgID string, repoConfigUUID string) error {
ret := _m.Called(ctx, orgID, repoConfigUUID)
if len(ret) == 0 {
panic("no return value specified for RemoveContentFromProduct")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
r0 = rf(ctx, orgID, repoConfigUUID)
} else {
r0 = ret.Error(0)
}
return r0
}
// RemoveContentOverrides provides a mock function with given fields: ctx, templateUUID, toRemove
func (_m *MockCandlepinClient) RemoveContentOverrides(ctx context.Context, templateUUID string, toRemove []caliri.ContentOverrideDTO) error {
ret := _m.Called(ctx, templateUUID, toRemove)
if len(ret) == 0 {
panic("no return value specified for RemoveContentOverrides")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, []caliri.ContentOverrideDTO) error); ok {
r0 = rf(ctx, templateUUID, toRemove)
} else {
r0 = ret.Error(0)
}
return r0
}
// RenameEnvironment provides a mock function with given fields: ctx, templateUUID, name
func (_m *MockCandlepinClient) RenameEnvironment(ctx context.Context, templateUUID string, name string) (*caliri.EnvironmentDTO, error) {
ret := _m.Called(ctx, templateUUID, name)
if len(ret) == 0 {
panic("no return value specified for RenameEnvironment")
}
var r0 *caliri.EnvironmentDTO
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*caliri.EnvironmentDTO, error)); ok {
return rf(ctx, templateUUID, name)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) *caliri.EnvironmentDTO); ok {
r0 = rf(ctx, templateUUID, name)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*caliri.EnvironmentDTO)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, templateUUID, name)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// UpdateContent provides a mock function with given fields: ctx, orgID, repoConfigUUID, content
func (_m *MockCandlepinClient) UpdateContent(ctx context.Context, orgID string, repoConfigUUID string, content caliri.ContentDTO) error {
ret := _m.Called(ctx, orgID, repoConfigUUID, content)
if len(ret) == 0 {
panic("no return value specified for UpdateContent")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, caliri.ContentDTO) error); ok {
r0 = rf(ctx, orgID, repoConfigUUID, content)
} else {
r0 = ret.Error(0)
}
return r0
}
// UpdateContentOverrides provides a mock function with given fields: ctx, templateUUID, dtos
func (_m *MockCandlepinClient) UpdateContentOverrides(ctx context.Context, templateUUID string, dtos []caliri.ContentOverrideDTO) error {
ret := _m.Called(ctx, templateUUID, dtos)
if len(ret) == 0 {
panic("no return value specified for UpdateContentOverrides")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, []caliri.ContentOverrideDTO) error); ok {
r0 = rf(ctx, templateUUID, dtos)
} else {
r0 = ret.Error(0)
}
return r0
}
// NewMockCandlepinClient creates a new instance of MockCandlepinClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockCandlepinClient(t interface {
mock.TestingT
Cleanup(func())
}) *MockCandlepinClient {
mock := &MockCandlepinClient{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}