INNER CODE UNIT · Go

isPresentAndFalseWithReasonDeprecatedV1Beta1

syself/cluster-api-provider-hetzner · controllers/controllers_suite_test.go:410

func isPresentAndFalseWithReasonDeprecatedV1Beta1(key types.NamespacedName, obj client.Object, condition clusterv1.ConditionType, reason string) bool {
	if err := testEnv.Get(ctx, key, obj); err != nil {
		return false
	}
	getter, ok := obj.(deprecatedv1beta1conditions.Getter)
	if !ok {
		return false
	}
	c := deprecatedv1beta1conditions.Get(getter, condition)
	return c != nil && c.Status == corev1.ConditionFalse && c.Reason == reason
}

// isPresentAndTrueDeprecatedV1Beta1 reads a condition from the object's
// status.deprecated.v1beta1.conditions.
func isPresentAndTrueDeprecatedV1Beta1(key types.NamespacedName, obj client.Object, condition clusterv1.ConditionType) bool {
	if err := testEnv.Get(ctx, key, obj); err != nil {
		return false
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…