@@ -59,7 +59,9 @@ func Test_syncStatus(t *testing.T) {
59
59
name : "set as Removed but still with Deployment in place" ,
60
60
cfg : & imageregistryv1.Config {
61
61
Spec : imageregistryv1.ImageRegistrySpec {
62
- ManagementState : "Removed" ,
62
+ OperatorSpec : operatorv1.OperatorSpec {
63
+ ManagementState : "Removed" ,
64
+ },
63
65
},
64
66
},
65
67
deploy : & appsapi.Deployment {
@@ -107,7 +109,9 @@ func Test_syncStatus(t *testing.T) {
107
109
name : "everything online and working as expected" ,
108
110
cfg : & imageregistryv1.Config {
109
111
Spec : imageregistryv1.ImageRegistrySpec {
110
- ManagementState : "Managed" ,
112
+ OperatorSpec : operatorv1.OperatorSpec {
113
+ ManagementState : "Managed" ,
114
+ },
111
115
},
112
116
},
113
117
deploy : & appsapi.Deployment {
@@ -195,7 +199,9 @@ func Test_syncStatus(t *testing.T) {
195
199
name : "Deployment lagging some replicas" ,
196
200
cfg : & imageregistryv1.Config {
197
201
Spec : imageregistryv1.ImageRegistrySpec {
198
- ManagementState : "Managed" ,
202
+ OperatorSpec : operatorv1.OperatorSpec {
203
+ ManagementState : "Managed" ,
204
+ },
199
205
},
200
206
},
201
207
deploy : & appsapi.Deployment {
@@ -237,7 +243,9 @@ func Test_syncStatus(t *testing.T) {
237
243
name : "Deployment lagging some replicas (progressing with random reason)" ,
238
244
cfg : & imageregistryv1.Config {
239
245
Spec : imageregistryv1.ImageRegistrySpec {
240
- ManagementState : "Managed" ,
246
+ OperatorSpec : operatorv1.OperatorSpec {
247
+ ManagementState : "Managed" ,
248
+ },
241
249
},
242
250
},
243
251
deploy : & appsapi.Deployment {
@@ -286,7 +294,9 @@ func Test_syncStatus(t *testing.T) {
286
294
name : "Deployment lagging some replicas (progressing with ProgressDeadlineExceeded reason)" ,
287
295
cfg : & imageregistryv1.Config {
288
296
Spec : imageregistryv1.ImageRegistrySpec {
289
- ManagementState : "Managed" ,
297
+ OperatorSpec : operatorv1.OperatorSpec {
298
+ ManagementState : "Managed" ,
299
+ },
290
300
},
291
301
},
292
302
deploy : & appsapi.Deployment {
@@ -340,7 +350,9 @@ func Test_syncStatus(t *testing.T) {
340
350
name : "Deployment without replicas for more than one minute" ,
341
351
cfg : & imageregistryv1.Config {
342
352
Spec : imageregistryv1.ImageRegistrySpec {
343
- ManagementState : "Managed" ,
353
+ OperatorSpec : operatorv1.OperatorSpec {
354
+ ManagementState : "Managed" ,
355
+ },
344
356
},
345
357
Status : imageregistryv1.ImageRegistryStatus {
346
358
OperatorStatus : operatorv1.OperatorStatus {
@@ -386,7 +398,9 @@ func Test_syncStatus(t *testing.T) {
386
398
name : "Deployment without available replicas" ,
387
399
cfg : & imageregistryv1.Config {
388
400
Spec : imageregistryv1.ImageRegistrySpec {
389
- ManagementState : "Managed" ,
401
+ OperatorSpec : operatorv1.OperatorSpec {
402
+ ManagementState : "Managed" ,
403
+ },
390
404
},
391
405
},
392
406
deploy : & appsapi.Deployment {},
@@ -421,7 +435,9 @@ func Test_syncStatus(t *testing.T) {
421
435
name : "Deployment flagged to be deleted" ,
422
436
cfg : & imageregistryv1.Config {
423
437
Spec : imageregistryv1.ImageRegistrySpec {
424
- ManagementState : "Managed" ,
438
+ OperatorSpec : operatorv1.OperatorSpec {
439
+ ManagementState : "Managed" ,
440
+ },
425
441
},
426
442
},
427
443
deploy : & appsapi.Deployment {
@@ -460,7 +476,9 @@ func Test_syncStatus(t *testing.T) {
460
476
name : "set as Removed without Deployment in place" ,
461
477
cfg : & imageregistryv1.Config {
462
478
Spec : imageregistryv1.ImageRegistrySpec {
463
- ManagementState : "Removed" ,
479
+ OperatorSpec : operatorv1.OperatorSpec {
480
+ ManagementState : "Removed" ,
481
+ },
464
482
},
465
483
},
466
484
expectedConditions : []operatorv1.OperatorCondition {
@@ -494,7 +512,9 @@ func Test_syncStatus(t *testing.T) {
494
512
name : "permanent error without Deployment in place" ,
495
513
cfg : & imageregistryv1.Config {
496
514
Spec : imageregistryv1.ImageRegistrySpec {
497
- ManagementState : "Managed" ,
515
+ OperatorSpec : operatorv1.OperatorSpec {
516
+ ManagementState : "Managed" ,
517
+ },
498
518
},
499
519
},
500
520
applyError : newPermanentError ("Permanent" , fmt .Errorf ("segfault" )),
@@ -529,7 +549,9 @@ func Test_syncStatus(t *testing.T) {
529
549
name : "Deployment not in place after one minute" ,
530
550
cfg : & imageregistryv1.Config {
531
551
Spec : imageregistryv1.ImageRegistrySpec {
532
- ManagementState : "Managed" ,
552
+ OperatorSpec : operatorv1.OperatorSpec {
553
+ ManagementState : "Managed" ,
554
+ },
533
555
},
534
556
Status : imageregistryv1.ImageRegistryStatus {
535
557
OperatorStatus : operatorv1.OperatorStatus {
@@ -575,7 +597,9 @@ func Test_syncStatus(t *testing.T) {
575
597
name : "generic error without Deployment in place" ,
576
598
cfg : & imageregistryv1.Config {
577
599
Spec : imageregistryv1.ImageRegistrySpec {
578
- ManagementState : "Managed" ,
600
+ OperatorSpec : operatorv1.OperatorSpec {
601
+ ManagementState : "Managed" ,
602
+ },
579
603
},
580
604
},
581
605
applyError : fmt .Errorf ("error creating deployment" ),
@@ -611,7 +635,9 @@ func Test_syncStatus(t *testing.T) {
611
635
deploy : & appsapi.Deployment {},
612
636
cfg : & imageregistryv1.Config {
613
637
Spec : imageregistryv1.ImageRegistrySpec {
614
- ManagementState : "Unmanaged" ,
638
+ OperatorSpec : operatorv1.OperatorSpec {
639
+ ManagementState : "Unmanaged" ,
640
+ },
615
641
},
616
642
},
617
643
expectedConditions : []operatorv1.OperatorCondition {
@@ -645,7 +671,9 @@ func Test_syncStatus(t *testing.T) {
645
671
name : "set as Managed without Deployment in place" ,
646
672
cfg : & imageregistryv1.Config {
647
673
Spec : imageregistryv1.ImageRegistrySpec {
648
- ManagementState : "Managed" ,
674
+ OperatorSpec : operatorv1.OperatorSpec {
675
+ ManagementState : "Managed" ,
676
+ },
649
677
},
650
678
},
651
679
expectedConditions : []operatorv1.OperatorCondition {
@@ -679,7 +707,9 @@ func Test_syncStatus(t *testing.T) {
679
707
name : "a faulty route" ,
680
708
cfg : & imageregistryv1.Config {
681
709
Spec : imageregistryv1.ImageRegistrySpec {
682
- ManagementState : "Managed" ,
710
+ OperatorSpec : operatorv1.OperatorSpec {
711
+ ManagementState : "Managed" ,
712
+ },
683
713
},
684
714
},
685
715
deploy : & appsapi.Deployment {
0 commit comments