From b1c0e11a629a68523d50cf5b1885eb0afd3baa19 Mon Sep 17 00:00:00 2001 From: fengluodb Date: Sat, 21 Oct 2023 11:22:36 +0800 Subject: [PATCH] chore: delete redudant code --- .../apps/backuppolicytemplate_controller_test.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/controllers/apps/backuppolicytemplate_controller_test.go b/controllers/apps/backuppolicytemplate_controller_test.go index fee75e068b7..7c49afc41fd 100644 --- a/controllers/apps/backuppolicytemplate_controller_test.go +++ b/controllers/apps/backuppolicytemplate_controller_test.go @@ -17,14 +17,13 @@ limitations under the License. package apps import ( - "github.com/apecloud/kubeblocks/apis/apps/v1alpha1" - "github.com/apecloud/kubeblocks/pkg/constant" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "sigs.k8s.io/controller-runtime/pkg/client" - intctrlutil "github.com/apecloud/kubeblocks/pkg/generics" + "github.com/apecloud/kubeblocks/apis/apps/v1alpha1" + "github.com/apecloud/kubeblocks/pkg/constant" testapps "github.com/apecloud/kubeblocks/pkg/testutil/apps" ) @@ -45,14 +44,6 @@ var _ = Describe("", func() { // in race conditions, it will find the existence of old objects, resulting failure to // create the new objects. By("clean resources") - - // delete rest mocked objects - ml := client.HasLabels{testCtx.TestObjLabelKey} - testapps.ClearResources(&testCtx, intctrlutil.ComponentResourceConstraintSignature, ml) - testapps.ClearResources(&testCtx, intctrlutil.ComponentClassDefinitionSignature, ml) - - // non-namespaced - testapps.ClearResourcesWithRemoveFinalizerOption(&testCtx, intctrlutil.BackupPolicyTemplateSignature, true, ml) } BeforeEach(func() {