diff --git a/controllers/backplaneconfig_controller.go b/controllers/backplaneconfig_controller.go index 0b2223509..16d453b5a 100644 --- a/controllers/backplaneconfig_controller.go +++ b/controllers/backplaneconfig_controller.go @@ -1643,7 +1643,7 @@ func (r *MultiClusterEngineReconciler) finalizeBackplaneConfig(ctx context.Conte } localClusterNS := &corev1.Namespace{} - if err := r.Client.Get(ctx, types.NamespacedName{Name: "local-cluster"}, localClusterNS); err != nil { + if err := r.Client.Get(ctx, types.NamespacedName{Name: "local-cluster"}, localClusterNS); err == nil { // If wait time exceeds expected then uninstall may not be able to progress if time.Since(backplaneConfig.DeletionTimestamp.Time) < 10*time.Minute { terminatingCondition := status.NewCondition( diff --git a/controllers/backplaneconfig_controller_test.go b/controllers/backplaneconfig_controller_test.go index 0243ef53a..bd19db20e 100644 --- a/controllers/backplaneconfig_controller_test.go +++ b/controllers/backplaneconfig_controller_test.go @@ -115,11 +115,6 @@ var _ = Describe("BackplaneConfig controller", func() { Namespace: DestinationNamespace, }, })).To(Succeed()) - Expect(k8sClient.Delete(context.Background(), &corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "local-cluster", - }, - })).To(Succeed()) }) BeforeEach(func() {