mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-01 05:37:27 +00:00
82 lines
2.2 KiB
Go
82 lines
2.2 KiB
Go
// Code generated by mockery v2.14.0. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
context "context"
|
|
|
|
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
|
|
}
|
|
|
|
// Init provides a mock function with given fields: ctx, repoOption, createNew
|
|
func (_m *BackupRepoService) Init(ctx context.Context, repoOption udmrepo.RepoOptions, createNew bool) error {
|
|
ret := _m.Called(ctx, repoOption, createNew)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, udmrepo.RepoOptions, bool) error); ok {
|
|
r0 = rf(ctx, repoOption, createNew)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// 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)
|
|
|
|
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)
|
|
|
|
var r0 udmrepo.BackupRepo
|
|
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)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
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
|
|
}
|
|
|
|
type mockConstructorTestingTNewBackupRepoService interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}
|
|
|
|
// 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.
|
|
func NewBackupRepoService(t mockConstructorTestingTNewBackupRepoService) *BackupRepoService {
|
|
mock := &BackupRepoService{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|