Skip to content

Commit ae53ee1

Browse files
committed
Refrain verifyOperatorStatusCond to bypass status.Conditions
when empty or has the required condition type missing Signed-off-by: Swarup Ghosh <swghosh@redhat.com>
1 parent 072db14 commit ae53ee1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/e2e/utils_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,20 @@ func verifyOperatorStatusCondition(client *certmanoperatorclient.Clientset, cont
8181
return false, nil
8282
}
8383

84+
var condMatchCount int
8485
for _, cond := range operator.Status.Conditions {
8586
if status, exists := expectedConditionMap[strings.TrimPrefix(cond.Type, controllerNames[index])]; exists {
87+
condMatchCount += 1
88+
8689
if cond.Status != status {
8790
return false, nil
8891
}
8992
}
9093
}
9194

92-
return true, nil
95+
// [retry] false: when NOT all expected conditions were found
96+
// [no-retry] true: when all expected conditions were found
97+
return condMatchCount == len(expectedConditionMap), nil
9398
})
9499
errs[index] = err
95100
}(index)

0 commit comments

Comments
 (0)