Skip to content

Commit

Permalink
chore: delete redudant code
Browse files Browse the repository at this point in the history
  • Loading branch information
fengluodb committed Oct 21, 2023
1 parent c9ffa2f commit b1c0e11
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions controllers/apps/backuppolicytemplate_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand All @@ -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() {
Expand Down

0 comments on commit b1c0e11

Please sign in to comment.