From d61f32f43d19879c2901e2413dd48220e00bdf88 Mon Sep 17 00:00:00 2001 From: Sheetal Pamecha Date: Mon, 26 Aug 2024 10:34:29 +0530 Subject: [PATCH] tests: keep all suite cleanup functions in suite_test.go Signed-off-by: Sheetal Pamecha --- internal/controller/drplacementcontrol.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/controller/drplacementcontrol.go b/internal/controller/drplacementcontrol.go index 8eee6d53b..89583afb8 100644 --- a/internal/controller/drplacementcontrol.go +++ b/internal/controller/drplacementcontrol.go @@ -1850,10 +1850,6 @@ func (d *DRPCInstance) ensureVRGManifestWorkOnClusterDeleted(clusterName string) d.log.Info("Request not complete yet", "cluster", clusterName) - if d.instance.Spec.ProtectedNamespaces != nil && len(*d.instance.Spec.ProtectedNamespaces) > 0 { - d.setProgression(rmn.ProgressionWaitOnUserToCleanUp) - } - // IF we get here, either the VRG has not transitioned to secondary (yet) or delete didn't succeed. In either cases, // we need to make sure that the VRG object is deleted. IOW, we still have to wait return !done, nil @@ -1915,6 +1911,10 @@ func (d *DRPCInstance) ensureVRGIsSecondaryOnCluster(clusterName string) bool { return false } + if d.instance.Spec.ProtectedNamespaces != nil && len(*d.instance.Spec.ProtectedNamespaces) > 0 { + d.setProgression(rmn.ProgressionWaitOnUserToCleanUp) + } + return true }