From 4ada6b7232a33e17f27324511b839362addd6737 Mon Sep 17 00:00:00 2001 From: Matt Boersma Date: Wed, 27 Mar 2024 12:28:07 -0600 Subject: [PATCH] Fix unit test by not relying on GVK --- controllers/asosecret_controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/asosecret_controller.go b/controllers/asosecret_controller.go index 7f6d41a08f5..e9cd1ba3516 100644 --- a/controllers/asosecret_controller.go +++ b/controllers/asosecret_controller.go @@ -226,9 +226,9 @@ func (asos *ASOSecretReconciler) Reconcile(ctx context.Context, req ctrl.Request // Return early if the ASO Secret Owner(AzureCluster or AzureManagedControlPlane) or Cluster is paused. if annotations.IsPaused(cluster, asoSecretOwner) { - log.Info(fmt.Sprintf("%s or linked Cluster is marked as paused. Won't reconcile", asoSecretOwner.GetObjectKind())) + log.Info(fmt.Sprintf("%T or linked Cluster is marked as paused. Won't reconcile", asoSecretOwner)) asos.Recorder.Eventf(asoSecretOwner, corev1.EventTypeNormal, "ClusterPaused", - fmt.Sprintf("%s or linked Cluster is marked as paused. Won't reconcile", asoSecretOwner.GetObjectKind().GroupVersionKind().Kind)) + fmt.Sprintf("%T or linked Cluster is marked as paused. Won't reconcile", asoSecretOwner)) return ctrl.Result{}, nil }