INNER CODE UNIT · Go

isAbsent

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

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 {
	eventList := &corev1.EventList{}
	if err := c.List(ctx, eventList, client.InNamespace(namespace)); err != nil {
		return false
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…