@@ -2697,7 +2697,6 @@ var _ = Describe("Install Plan", func() {
2697
2697
// Create a namespace
2698
2698
ns , err := c .KubernetesInterface ().CoreV1 ().Namespaces ().Create (context .TODO (), ns , metav1.CreateOptions {})
2699
2699
Expect (err ).NotTo (HaveOccurred ())
2700
- require .NoError (GinkgoT (), err )
2701
2700
deleteOpts := & metav1.DeleteOptions {}
2702
2701
defer func () {
2703
2702
require .NoError (GinkgoT (), c .KubernetesInterface ().CoreV1 ().Namespaces ().Delete (context .TODO (), ns .GetName (), * deleteOpts ))
@@ -2753,7 +2752,6 @@ var _ = Describe("Install Plan", func() {
2753
2752
// Create a namespace
2754
2753
ns , err := c .KubernetesInterface ().CoreV1 ().Namespaces ().Create (context .TODO (), ns , metav1.CreateOptions {})
2755
2754
Expect (err ).NotTo (HaveOccurred ())
2756
- require .NoError (GinkgoT (), err )
2757
2755
deleteOpts := & metav1.DeleteOptions {}
2758
2756
defer func () {
2759
2757
require .NoError (GinkgoT (), c .KubernetesInterface ().CoreV1 ().Namespaces ().Delete (context .TODO (), ns .GetName (), * deleteOpts ))
@@ -2794,7 +2792,7 @@ var _ = Describe("Install Plan", func() {
2794
2792
Expect (err ).NotTo (HaveOccurred ())
2795
2793
2796
2794
fetchedInstallPlan , err := fetchInstallPlanWithNamespace (GinkgoT (), crc , installPlanName , ns .GetName (), buildInstallPlanPhaseCheckFunc (operatorsv1alpha1 .InstallPlanPhaseFailed ))
2797
- require . NoError ( GinkgoT (), err )
2795
+ Expect ( err ). NotTo ( HaveOccurred () )
2798
2796
ctx .Ctx ().Logf (fmt .Sprintf ("Install plan %s fetched with status %s" , fetchedInstallPlan .GetName (), fetchedInstallPlan .Status .Phase ))
2799
2797
ctx .Ctx ().Logf (fmt .Sprintf ("Install plan %s fetched with conditions %+v" , fetchedInstallPlan .GetName (), fetchedInstallPlan .Status .Conditions ))
2800
2798
})
@@ -2965,7 +2963,7 @@ var _ = Describe("Install Plan", func() {
2965
2963
}
2966
2964
ctx .Ctx ().Logf ("[DEBUG] Operator Group Status: %+v\n " , outOG .Status )
2967
2965
return outOG .Status .ServiceAccountRef , nil
2968
- }).Should (BeNil ())
2966
+ }).ShouldNot (BeNil ())
2969
2967
2970
2968
crd := apiextensionsv1.CustomResourceDefinition {
2971
2969
ObjectMeta : metav1.ObjectMeta {
@@ -3219,14 +3217,14 @@ var _ = Describe("Install Plan", func() {
3219
3217
// Wait for the OperatorGroup to be synced and have a status.ServiceAccountRef
3220
3218
// before moving on. Otherwise the catalog operator treats it as an invalid OperatorGroup
3221
3219
// and fails the InstallPlan
3222
- Eventually (func () (bool , error ) {
3220
+ Eventually (func () (* corev1. ObjectReference , error ) {
3223
3221
outOG , err := crc .OperatorsV1 ().OperatorGroups (ns .GetName ()).Get (context .TODO (), og .Name , metav1.GetOptions {})
3224
3222
if err != nil {
3225
- return false , err
3223
+ return nil , err
3226
3224
}
3227
- fmt . Fprintf ( GinkgoWriter , "[DEBUG] Operator Group Status: %+v\n " , outOG .Status )
3228
- return outOG .Status .ServiceAccountRef != nil , nil
3229
- }).Should ( BeTrue ())
3225
+ ctx . Ctx (). Logf ( "[DEBUG] Operator Group Status: %+v\n " , outOG .Status )
3226
+ return outOG .Status .ServiceAccountRef , nil
3227
+ }).ShouldNot ( BeNil ())
3230
3228
3231
3229
By ("using the OLM client to install CRDs from the installplan and the scoped client for other resources" )
3232
3230
0 commit comments