INNER CODE UNIT · Go
isPresentAndFalseWithReason
syself/cluster-api-provider-hetzner · controllers/controllers_suite_test.go:455
func isPresentAndFalseWithReason(key types.NamespacedName, getter client.Object, condition string, reason string) bool {
return isConditionWithStatusAndReason(key, getter, condition, metav1.ConditionFalse, reason)
}
func isAbsent(key types.NamespacedName, getter client.Object, condition string) bool {
if err := testEnv.Get(ctx, key, getter); err != nil {
return false
}
conditionsGetter, ok := getter.(conditions.Getter)
if !ok {
return false
}
return conditions.Get(conditionsGetter, condition) == nil
}
func hasEvent(ctx context.Context, c client.Client, namespace, involvedObjectName, reason, message string) bool {