Files
velero/pkg/repository/mocks/ConfigManager.go
2025-11-04 16:32:55 +08:00

85 lines
2.1 KiB
Go

// Code generated by mockery v2.53.2. DO NOT EDIT.
package mocks
import (
mock "github.com/stretchr/testify/mock"
time "time"
)
// ConfigManager is an autogenerated mock type for the ConfigManager type
type ConfigManager struct {
mock.Mock
}
// ClientSideCacheLimit provides a mock function with given fields: repoType, repoOption
func (_m *ConfigManager) ClientSideCacheLimit(repoType string, repoOption map[string]string) (int64, error) {
ret := _m.Called(repoType, repoOption)
if len(ret) == 0 {
panic("no return value specified for ClientSideCacheLimit")
}
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(string, map[string]string) (int64, error)); ok {
return rf(repoType, repoOption)
}
if rf, ok := ret.Get(0).(func(string, map[string]string) int64); ok {
r0 = rf(repoType, repoOption)
} else {
r0 = ret.Get(0).(int64)
}
if rf, ok := ret.Get(1).(func(string, map[string]string) error); ok {
r1 = rf(repoType, repoOption)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// DefaultMaintenanceFrequency provides a mock function with given fields: repoType
func (_m *ConfigManager) DefaultMaintenanceFrequency(repoType string) (time.Duration, error) {
ret := _m.Called(repoType)
if len(ret) == 0 {
panic("no return value specified for DefaultMaintenanceFrequency")
}
var r0 time.Duration
var r1 error
if rf, ok := ret.Get(0).(func(string) (time.Duration, error)); ok {
return rf(repoType)
}
if rf, ok := ret.Get(0).(func(string) time.Duration); ok {
r0 = rf(repoType)
} else {
r0 = ret.Get(0).(time.Duration)
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(repoType)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// NewConfigManager creates a new instance of ConfigManager. 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 NewConfigManager(t interface {
mock.TestingT
Cleanup(func())
}) *ConfigManager {
mock := &ConfigManager{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}