@@ -167,12 +167,6 @@ func TestClusterExtensionResolutionSuccessfulUnpackFails(t *testing.T) {
167
167
require .Equal (t , ocv1alpha1 .ReasonSuccess , resolvedCond .Reason )
168
168
require .
Equal (
t ,
"resolved to \" quay.io/operatorhubio/[email protected] \" " ,
resolvedCond .
Message )
169
169
170
- t .Log ("By checking the expected unpacked conditions" )
171
- unpackedCond := apimeta .FindStatusCondition (clusterExtension .Status .Conditions , ocv1alpha1 .TypeUnpacked )
172
- require .NotNil (t , unpackedCond )
173
- require .Equal (t , metav1 .ConditionFalse , unpackedCond .Status )
174
- require .Equal (t , ocv1alpha1 .ReasonFailed , unpackedCond .Reason )
175
-
176
170
progressingCond := apimeta .FindStatusCondition (clusterExtension .Status .Conditions , ocv1alpha1 .TypeProgressing )
177
171
require .NotNil (t , progressingCond )
178
172
require .Equal (t , metav1 .ConditionTrue , progressingCond .Status )
@@ -233,9 +227,12 @@ func TestClusterExtensionUnpackUnexpectedState(t *testing.T) {
233
227
Image :
"quay.io/operatorhubio/[email protected] " ,
234
228
}, & v , nil , nil
235
229
})
230
+
236
231
require .Panics (t , func () {
237
232
_ , _ = reconciler .Reconcile (ctx , ctrl.Request {NamespacedName : extKey })
238
233
}, "reconciliation should panic on unknown unpack state" )
234
+
235
+ require .NoError (t , cl .DeleteAllOf (ctx , & ocv1alpha1.ClusterExtension {}))
239
236
}
240
237
241
238
func TestClusterExtensionResolutionAndUnpackSuccessfulApplierFails (t * testing.T ) {
@@ -312,12 +309,6 @@ func TestClusterExtensionResolutionAndUnpackSuccessfulApplierFails(t *testing.T)
312
309
require .Equal (t , ocv1alpha1 .ReasonSuccess , resolvedCond .Reason )
313
310
require .
Equal (
t ,
"resolved to \" quay.io/operatorhubio/[email protected] \" " ,
resolvedCond .
Message )
314
311
315
- t .Log ("By checking the expected unpacked conditions" )
316
- unpackedCond := apimeta .FindStatusCondition (clusterExtension .Status .Conditions , ocv1alpha1 .TypeUnpacked )
317
- require .NotNil (t , unpackedCond )
318
- require .Equal (t , metav1 .ConditionTrue , unpackedCond .Status )
319
- require .Equal (t , ocv1alpha1 .ReasonSuccess , unpackedCond .Reason )
320
-
321
312
t .Log ("By checking the expected installed conditions" )
322
313
installedCond := apimeta .FindStatusCondition (clusterExtension .Status .Conditions , ocv1alpha1 .TypeInstalled )
323
314
require .NotNil (t , installedCond )
@@ -410,12 +401,6 @@ func TestClusterExtensionManagerFailed(t *testing.T) {
410
401
require .Equal (t , ocv1alpha1 .ReasonSuccess , resolvedCond .Reason )
411
402
require .
Equal (
t ,
"resolved to \" quay.io/operatorhubio/[email protected] \" " ,
resolvedCond .
Message )
412
403
413
- t .Log ("By checking the expected unpacked conditions" )
414
- unpackedCond := apimeta .FindStatusCondition (clusterExtension .Status .Conditions , ocv1alpha1 .TypeUnpacked )
415
- require .NotNil (t , unpackedCond )
416
- require .Equal (t , metav1 .ConditionTrue , unpackedCond .Status )
417
- require .Equal (t , ocv1alpha1 .ReasonSuccess , unpackedCond .Reason )
418
-
419
404
t .Log ("By checking the expected installed conditions" )
420
405
installedCond := apimeta .FindStatusCondition (clusterExtension .Status .Conditions , ocv1alpha1 .TypeInstalled )
421
406
require .NotNil (t , installedCond )
@@ -510,12 +495,6 @@ func TestClusterExtensionManagedContentCacheWatchFail(t *testing.T) {
510
495
require .Equal (t , ocv1alpha1 .ReasonSuccess , resolvedCond .Reason )
511
496
require .
Equal (
t ,
"resolved to \" quay.io/operatorhubio/[email protected] \" " ,
resolvedCond .
Message )
512
497
513
- t .Log ("By checking the expected unpacked conditions" )
514
- unpackedCond := apimeta .FindStatusCondition (clusterExtension .Status .Conditions , ocv1alpha1 .TypeUnpacked )
515
- require .NotNil (t , unpackedCond )
516
- require .Equal (t , metav1 .ConditionTrue , unpackedCond .Status )
517
- require .Equal (t , ocv1alpha1 .ReasonSuccess , unpackedCond .Reason )
518
-
519
498
t .Log ("By checking the expected installed conditions" )
520
499
installedCond := apimeta .FindStatusCondition (clusterExtension .Status .Conditions , ocv1alpha1 .TypeInstalled )
521
500
require .NotNil (t , installedCond )
@@ -607,12 +586,6 @@ func TestClusterExtensionInstallationSucceeds(t *testing.T) {
607
586
require .Equal (t , ocv1alpha1 .ReasonSuccess , resolvedCond .Reason )
608
587
require .
Equal (
t ,
"resolved to \" quay.io/operatorhubio/[email protected] \" " ,
resolvedCond .
Message )
609
588
610
- t .Log ("By checking the expected unpacked conditions" )
611
- unpackedCond := apimeta .FindStatusCondition (clusterExtension .Status .Conditions , ocv1alpha1 .TypeUnpacked )
612
- require .NotNil (t , unpackedCond )
613
- require .Equal (t , metav1 .ConditionTrue , unpackedCond .Status )
614
- require .Equal (t , ocv1alpha1 .ReasonSuccess , unpackedCond .Reason )
615
-
616
589
t .Log ("By checking the expected installed conditions" )
617
590
installedCond := apimeta .FindStatusCondition (clusterExtension .Status .Conditions , ocv1alpha1 .TypeInstalled )
618
591
require .NotNil (t , installedCond )
0 commit comments