@@ -3192,14 +3192,24 @@ var _ = Describe("Install Plan", func() {
3192
3192
3193
3193
It ("should clear clear up the condition in the InstallPlan status that contains an error message when a valid OperatorGroup is created" , func () {
3194
3194
3195
- // first check that a condition with a message exists
3196
- fetchedInstallPlan , err := fetchInstallPlanWithNamespace (GinkgoT (), crc , installPlanName , ns .GetName (), buildInstallPlanPhaseCheckFunc (operatorsv1alpha1 .InstallPlanPhaseInstalling ))
3197
- Expect (err ).NotTo (HaveOccurred ())
3198
- Expect (fetchedInstallPlan ).NotTo (BeNil ())
3195
+ // first wait for a condition with a message exists
3199
3196
cond := operatorsv1alpha1.InstallPlanCondition {Type : operatorsv1alpha1 .InstallPlanInstalled , Status : corev1 .ConditionFalse , Reason : operatorsv1alpha1 .InstallPlanReasonInstallCheckFailed ,
3200
3197
Message : "no operator group found that is managing this namespace" }
3201
- Expect (fetchedInstallPlan .Status .Phase ).To (Equal (operatorsv1alpha1 .InstallPlanPhaseInstalling ))
3202
- Expect (hasCondition (fetchedInstallPlan , cond )).To (BeTrue ())
3198
+ Eventually (
3199
+ func () (bool , error ) {
3200
+ fetchedInstallPlan , err := fetchInstallPlanWithNamespace (GinkgoT (), crc , installPlanName , ns .GetName (), buildInstallPlanPhaseCheckFunc (operatorsv1alpha1 .InstallPlanPhaseInstalling ))
3201
+ Expect (err ).NotTo (HaveOccurred ())
3202
+ Expect (fetchedInstallPlan ).NotTo (BeNil ())
3203
+ Expect (fetchedInstallPlan .Status .Phase ).To (Equal (operatorsv1alpha1 .InstallPlanPhaseInstalling ))
3204
+ if hasCondition (fetchedInstallPlan , cond ) {
3205
+ return true , nil
3206
+ } else {
3207
+ return false , nil
3208
+ }
3209
+ },
3210
+ 1 * time .Minute ,
3211
+ interval ,
3212
+ ).Should (BeTrue ())
3203
3213
3204
3214
// Create an operatorgroup for the same namespace
3205
3215
og := & operatorsv1.OperatorGroup {
0 commit comments