mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-10-01 04:05:38 +00:00
180 lines
4.5 KiB
Go
180 lines
4.5 KiB
Go
// Code generated by mockery v2.53.2. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
context "context"
|
|
time "time"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
udmrepo "github.com/vmware-tanzu/velero/pkg/repository/udmrepo"
|
|
)
|
|
|
|
// BackupRepoService is an autogenerated mock type for the BackupRepoService type
|
|
type BackupRepoService struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// ClientSideCacheLimit provides a mock function with given fields: repoOption
|
|
func (_m *BackupRepoService) ClientSideCacheLimit(repoOption map[string]string) int64 {
|
|
ret := _m.Called(repoOption)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ClientSideCacheLimit")
|
|
}
|
|
|
|
var r0 int64
|
|
if rf, ok := ret.Get(0).(func(map[string]string) int64); ok {
|
|
r0 = rf(repoOption)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Connect provides a mock function with given fields: ctx, repoOption
|
|
func (_m *BackupRepoService) Connect(ctx context.Context, repoOption udmrepo.RepoOptions) error {
|
|
ret := _m.Called(ctx, repoOption)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Connect")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, udmrepo.RepoOptions) error); ok {
|
|
r0 = rf(ctx, repoOption)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Create provides a mock function with given fields: ctx, repoOption
|
|
func (_m *BackupRepoService) Create(ctx context.Context, repoOption udmrepo.RepoOptions) error {
|
|
ret := _m.Called(ctx, repoOption)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Create")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, udmrepo.RepoOptions) error); ok {
|
|
r0 = rf(ctx, repoOption)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// DefaultMaintenanceFrequency provides a mock function with no fields
|
|
func (_m *BackupRepoService) DefaultMaintenanceFrequency() time.Duration {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DefaultMaintenanceFrequency")
|
|
}
|
|
|
|
var r0 time.Duration
|
|
if rf, ok := ret.Get(0).(func() time.Duration); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(time.Duration)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IsCreated provides a mock function with given fields: ctx, repoOption
|
|
func (_m *BackupRepoService) IsCreated(ctx context.Context, repoOption udmrepo.RepoOptions) (bool, error) {
|
|
ret := _m.Called(ctx, repoOption)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for IsCreated")
|
|
}
|
|
|
|
var r0 bool
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, udmrepo.RepoOptions) (bool, error)); ok {
|
|
return rf(ctx, repoOption)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, udmrepo.RepoOptions) bool); ok {
|
|
r0 = rf(ctx, repoOption)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, udmrepo.RepoOptions) error); ok {
|
|
r1 = rf(ctx, repoOption)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Maintain provides a mock function with given fields: ctx, repoOption
|
|
func (_m *BackupRepoService) Maintain(ctx context.Context, repoOption udmrepo.RepoOptions) error {
|
|
ret := _m.Called(ctx, repoOption)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Maintain")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, udmrepo.RepoOptions) error); ok {
|
|
r0 = rf(ctx, repoOption)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Open provides a mock function with given fields: ctx, repoOption
|
|
func (_m *BackupRepoService) Open(ctx context.Context, repoOption udmrepo.RepoOptions) (udmrepo.BackupRepo, error) {
|
|
ret := _m.Called(ctx, repoOption)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Open")
|
|
}
|
|
|
|
var r0 udmrepo.BackupRepo
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, udmrepo.RepoOptions) (udmrepo.BackupRepo, error)); ok {
|
|
return rf(ctx, repoOption)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, udmrepo.RepoOptions) udmrepo.BackupRepo); ok {
|
|
r0 = rf(ctx, repoOption)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(udmrepo.BackupRepo)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, udmrepo.RepoOptions) error); ok {
|
|
r1 = rf(ctx, repoOption)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// NewBackupRepoService creates a new instance of BackupRepoService. 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 NewBackupRepoService(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *BackupRepoService {
|
|
mock := &BackupRepoService{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|