mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 06:47:20 +08:00
477 lines
13 KiB
Go
477 lines
13 KiB
Go
// Code generated by mockery. DO NOT EDIT.
|
|
|
|
package biz
|
|
|
|
import (
|
|
api "github.com/acepanel/panel/pkg/api"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
types "github.com/acepanel/panel/pkg/types"
|
|
)
|
|
|
|
// EnvironmentRepo is an autogenerated mock type for the EnvironmentRepo type
|
|
type EnvironmentRepo struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type EnvironmentRepo_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *EnvironmentRepo) EXPECT() *EnvironmentRepo_Expecter {
|
|
return &EnvironmentRepo_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// All provides a mock function with given fields: typ
|
|
func (_m *EnvironmentRepo) All(typ ...string) api.Environments {
|
|
_va := make([]interface{}, len(typ))
|
|
for _i := range typ {
|
|
_va[_i] = typ[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for All")
|
|
}
|
|
|
|
var r0 api.Environments
|
|
if rf, ok := ret.Get(0).(func(...string) api.Environments); ok {
|
|
r0 = rf(typ...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(api.Environments)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// EnvironmentRepo_All_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'All'
|
|
type EnvironmentRepo_All_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// All is a helper method to define mock.On call
|
|
// - typ ...string
|
|
func (_e *EnvironmentRepo_Expecter) All(typ ...interface{}) *EnvironmentRepo_All_Call {
|
|
return &EnvironmentRepo_All_Call{Call: _e.mock.On("All",
|
|
append([]interface{}{}, typ...)...)}
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_All_Call) Run(run func(typ ...string)) *EnvironmentRepo_All_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]string, len(args)-0)
|
|
for i, a := range args[0:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(string)
|
|
}
|
|
}
|
|
run(variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_All_Call) Return(_a0 api.Environments) *EnvironmentRepo_All_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_All_Call) RunAndReturn(run func(...string) api.Environments) *EnvironmentRepo_All_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// HasUpdate provides a mock function with given fields: typ, slug
|
|
func (_m *EnvironmentRepo) HasUpdate(typ string, slug string) bool {
|
|
ret := _m.Called(typ, slug)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for HasUpdate")
|
|
}
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func(string, string) bool); ok {
|
|
r0 = rf(typ, slug)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// EnvironmentRepo_HasUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasUpdate'
|
|
type EnvironmentRepo_HasUpdate_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// HasUpdate is a helper method to define mock.On call
|
|
// - typ string
|
|
// - slug string
|
|
func (_e *EnvironmentRepo_Expecter) HasUpdate(typ interface{}, slug interface{}) *EnvironmentRepo_HasUpdate_Call {
|
|
return &EnvironmentRepo_HasUpdate_Call{Call: _e.mock.On("HasUpdate", typ, slug)}
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_HasUpdate_Call) Run(run func(typ string, slug string)) *EnvironmentRepo_HasUpdate_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_HasUpdate_Call) Return(_a0 bool) *EnvironmentRepo_HasUpdate_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_HasUpdate_Call) RunAndReturn(run func(string, string) bool) *EnvironmentRepo_HasUpdate_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Install provides a mock function with given fields: typ, slug
|
|
func (_m *EnvironmentRepo) Install(typ string, slug string) error {
|
|
ret := _m.Called(typ, slug)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Install")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(typ, slug)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// EnvironmentRepo_Install_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Install'
|
|
type EnvironmentRepo_Install_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Install is a helper method to define mock.On call
|
|
// - typ string
|
|
// - slug string
|
|
func (_e *EnvironmentRepo_Expecter) Install(typ interface{}, slug interface{}) *EnvironmentRepo_Install_Call {
|
|
return &EnvironmentRepo_Install_Call{Call: _e.mock.On("Install", typ, slug)}
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_Install_Call) Run(run func(typ string, slug string)) *EnvironmentRepo_Install_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_Install_Call) Return(_a0 error) *EnvironmentRepo_Install_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_Install_Call) RunAndReturn(run func(string, string) error) *EnvironmentRepo_Install_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// InstalledSlugs provides a mock function with given fields: typ
|
|
func (_m *EnvironmentRepo) InstalledSlugs(typ string) []string {
|
|
ret := _m.Called(typ)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for InstalledSlugs")
|
|
}
|
|
|
|
var r0 []string
|
|
if rf, ok := ret.Get(0).(func(string) []string); ok {
|
|
r0 = rf(typ)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// EnvironmentRepo_InstalledSlugs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InstalledSlugs'
|
|
type EnvironmentRepo_InstalledSlugs_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// InstalledSlugs is a helper method to define mock.On call
|
|
// - typ string
|
|
func (_e *EnvironmentRepo_Expecter) InstalledSlugs(typ interface{}) *EnvironmentRepo_InstalledSlugs_Call {
|
|
return &EnvironmentRepo_InstalledSlugs_Call{Call: _e.mock.On("InstalledSlugs", typ)}
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_InstalledSlugs_Call) Run(run func(typ string)) *EnvironmentRepo_InstalledSlugs_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_InstalledSlugs_Call) Return(_a0 []string) *EnvironmentRepo_InstalledSlugs_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_InstalledSlugs_Call) RunAndReturn(run func(string) []string) *EnvironmentRepo_InstalledSlugs_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// InstalledVersion provides a mock function with given fields: typ, slug
|
|
func (_m *EnvironmentRepo) InstalledVersion(typ string, slug string) string {
|
|
ret := _m.Called(typ, slug)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for InstalledVersion")
|
|
}
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func(string, string) string); ok {
|
|
r0 = rf(typ, slug)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// EnvironmentRepo_InstalledVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InstalledVersion'
|
|
type EnvironmentRepo_InstalledVersion_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// InstalledVersion is a helper method to define mock.On call
|
|
// - typ string
|
|
// - slug string
|
|
func (_e *EnvironmentRepo_Expecter) InstalledVersion(typ interface{}, slug interface{}) *EnvironmentRepo_InstalledVersion_Call {
|
|
return &EnvironmentRepo_InstalledVersion_Call{Call: _e.mock.On("InstalledVersion", typ, slug)}
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_InstalledVersion_Call) Run(run func(typ string, slug string)) *EnvironmentRepo_InstalledVersion_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_InstalledVersion_Call) Return(_a0 string) *EnvironmentRepo_InstalledVersion_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_InstalledVersion_Call) RunAndReturn(run func(string, string) string) *EnvironmentRepo_InstalledVersion_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// IsInstalled provides a mock function with given fields: typ, slug
|
|
func (_m *EnvironmentRepo) IsInstalled(typ string, slug string) bool {
|
|
ret := _m.Called(typ, slug)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for IsInstalled")
|
|
}
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func(string, string) bool); ok {
|
|
r0 = rf(typ, slug)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// EnvironmentRepo_IsInstalled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsInstalled'
|
|
type EnvironmentRepo_IsInstalled_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// IsInstalled is a helper method to define mock.On call
|
|
// - typ string
|
|
// - slug string
|
|
func (_e *EnvironmentRepo_Expecter) IsInstalled(typ interface{}, slug interface{}) *EnvironmentRepo_IsInstalled_Call {
|
|
return &EnvironmentRepo_IsInstalled_Call{Call: _e.mock.On("IsInstalled", typ, slug)}
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_IsInstalled_Call) Run(run func(typ string, slug string)) *EnvironmentRepo_IsInstalled_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_IsInstalled_Call) Return(_a0 bool) *EnvironmentRepo_IsInstalled_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_IsInstalled_Call) RunAndReturn(run func(string, string) bool) *EnvironmentRepo_IsInstalled_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Types provides a mock function with no fields
|
|
func (_m *EnvironmentRepo) Types() []types.LV {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Types")
|
|
}
|
|
|
|
var r0 []types.LV
|
|
if rf, ok := ret.Get(0).(func() []types.LV); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]types.LV)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// EnvironmentRepo_Types_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Types'
|
|
type EnvironmentRepo_Types_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Types is a helper method to define mock.On call
|
|
func (_e *EnvironmentRepo_Expecter) Types() *EnvironmentRepo_Types_Call {
|
|
return &EnvironmentRepo_Types_Call{Call: _e.mock.On("Types")}
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_Types_Call) Run(run func()) *EnvironmentRepo_Types_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_Types_Call) Return(_a0 []types.LV) *EnvironmentRepo_Types_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_Types_Call) RunAndReturn(run func() []types.LV) *EnvironmentRepo_Types_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Uninstall provides a mock function with given fields: typ, slug
|
|
func (_m *EnvironmentRepo) Uninstall(typ string, slug string) error {
|
|
ret := _m.Called(typ, slug)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Uninstall")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(typ, slug)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// EnvironmentRepo_Uninstall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Uninstall'
|
|
type EnvironmentRepo_Uninstall_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Uninstall is a helper method to define mock.On call
|
|
// - typ string
|
|
// - slug string
|
|
func (_e *EnvironmentRepo_Expecter) Uninstall(typ interface{}, slug interface{}) *EnvironmentRepo_Uninstall_Call {
|
|
return &EnvironmentRepo_Uninstall_Call{Call: _e.mock.On("Uninstall", typ, slug)}
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_Uninstall_Call) Run(run func(typ string, slug string)) *EnvironmentRepo_Uninstall_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_Uninstall_Call) Return(_a0 error) *EnvironmentRepo_Uninstall_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_Uninstall_Call) RunAndReturn(run func(string, string) error) *EnvironmentRepo_Uninstall_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Update provides a mock function with given fields: typ, slug
|
|
func (_m *EnvironmentRepo) Update(typ string, slug string) error {
|
|
ret := _m.Called(typ, slug)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Update")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(typ, slug)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// EnvironmentRepo_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
|
|
type EnvironmentRepo_Update_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Update is a helper method to define mock.On call
|
|
// - typ string
|
|
// - slug string
|
|
func (_e *EnvironmentRepo_Expecter) Update(typ interface{}, slug interface{}) *EnvironmentRepo_Update_Call {
|
|
return &EnvironmentRepo_Update_Call{Call: _e.mock.On("Update", typ, slug)}
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_Update_Call) Run(run func(typ string, slug string)) *EnvironmentRepo_Update_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_Update_Call) Return(_a0 error) *EnvironmentRepo_Update_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *EnvironmentRepo_Update_Call) RunAndReturn(run func(string, string) error) *EnvironmentRepo_Update_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewEnvironmentRepo creates a new instance of EnvironmentRepo. 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 NewEnvironmentRepo(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *EnvironmentRepo {
|
|
mock := &EnvironmentRepo{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|