mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-20 06:54:32 +00:00
Remove dependency of generated client part 3
Replace generated discovery client with client-go client. Remove generated client from PVR action. Remove generated client from pkg/cmd directory. Delete velero generate client from client factory. Signed-off-by: Xun Jiang <jxun@vmware.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.30.1. DO NOT EDIT.
|
||||
// Code generated by mockery v2.20.0. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
|
||||
@@ -13,8 +13,6 @@ import (
|
||||
pkgclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
rest "k8s.io/client-go/rest"
|
||||
|
||||
versioned "github.com/vmware-tanzu/velero/pkg/generated/clientset/versioned"
|
||||
)
|
||||
|
||||
// Factory is an autogenerated mock type for the Factory type
|
||||
@@ -27,32 +25,6 @@ func (_m *Factory) BindFlags(flags *pflag.FlagSet) {
|
||||
_m.Called(flags)
|
||||
}
|
||||
|
||||
// Client provides a mock function with given fields:
|
||||
func (_m *Factory) Client() (versioned.Interface, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 versioned.Interface
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (versioned.Interface, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() versioned.Interface); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(versioned.Interface)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// ClientConfig provides a mock function with given fields:
|
||||
func (_m *Factory) ClientConfig() (*rest.Config, error) {
|
||||
ret := _m.Called()
|
||||
@@ -212,12 +184,13 @@ func (_m *Factory) SetClientQPS(_a0 float32) {
|
||||
_m.Called(_a0)
|
||||
}
|
||||
|
||||
// NewFactory creates a new instance of Factory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
// The first argument is typically a *testing.T value.
|
||||
func NewFactory(t interface {
|
||||
type mockConstructorTestingTNewFactory interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}) *Factory {
|
||||
}
|
||||
|
||||
// NewFactory creates a new instance of Factory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewFactory(t mockConstructorTestingTNewFactory) *Factory {
|
||||
mock := &Factory{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user