mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-20 15:04:17 +00:00
Clean up unused variables and functions (#5818)
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
This commit is contained in:
@@ -49,7 +49,6 @@ import (
|
||||
velerov1api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
|
||||
pkgbackup "github.com/vmware-tanzu/velero/pkg/backup"
|
||||
"github.com/vmware-tanzu/velero/pkg/builder"
|
||||
informers "github.com/vmware-tanzu/velero/pkg/generated/informers/externalversions"
|
||||
"github.com/vmware-tanzu/velero/pkg/metrics"
|
||||
persistencemocks "github.com/vmware-tanzu/velero/pkg/persistence/mocks"
|
||||
"github.com/vmware-tanzu/velero/pkg/plugin/clientmgmt"
|
||||
@@ -60,7 +59,6 @@ import (
|
||||
|
||||
type backupDeletionControllerTestData struct {
|
||||
fakeClient client.Client
|
||||
sharedInformers informers.SharedInformerFactory
|
||||
volumeSnapshotter *velerotest.FakeVolumeSnapshotter
|
||||
backupStore *persistencemocks.BackupStore
|
||||
controller *backupDeletionReconciler
|
||||
|
||||
@@ -144,18 +144,3 @@ func (c *genericController) processNextWorkItem() bool {
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func (c *genericController) enqueue(obj interface{}) {
|
||||
key, err := cache.MetaNamespaceKeyFunc(obj)
|
||||
if err != nil {
|
||||
c.logger.WithError(errors.WithStack(err)).
|
||||
Error("Error creating queue key, item not added to queue")
|
||||
return
|
||||
}
|
||||
|
||||
c.queue.Add(key)
|
||||
}
|
||||
|
||||
func (c *genericController) enqueueSecond(_, obj interface{}) {
|
||||
c.enqueue(obj)
|
||||
}
|
||||
|
||||
@@ -87,7 +87,6 @@ type testEnvironment struct {
|
||||
Config *rest.Config
|
||||
|
||||
doneMgr context.Context
|
||||
cancel context.CancelFunc
|
||||
}
|
||||
|
||||
// newTestEnvironment creates a new environment spinning up a local api-server.
|
||||
|
||||
Reference in New Issue
Block a user