mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 04:22:33 +08:00
chore: update mocks
This commit is contained in:
committed by
github-actions[bot]
parent
f48c975de3
commit
bf04648c64
@@ -469,14 +469,10 @@ func (_c *AppRepo_Installed_Call) RunAndReturn(run func() ([]*biz.App, error)) *
|
||||
}
|
||||
|
||||
// IsInstalled provides a mock function with given fields: query, cond
|
||||
func (_m *AppRepo) IsInstalled(query string, cond ...string) (bool, error) {
|
||||
_va := make([]interface{}, len(cond))
|
||||
for _i := range cond {
|
||||
_va[_i] = cond[_i]
|
||||
}
|
||||
func (_m *AppRepo) IsInstalled(query string, cond ...interface{}) (bool, error) {
|
||||
var _ca []interface{}
|
||||
_ca = append(_ca, query)
|
||||
_ca = append(_ca, _va...)
|
||||
_ca = append(_ca, cond...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
@@ -485,16 +481,16 @@ func (_m *AppRepo) IsInstalled(query string, cond ...string) (bool, error) {
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, ...string) (bool, error)); ok {
|
||||
if rf, ok := ret.Get(0).(func(string, ...interface{}) (bool, error)); ok {
|
||||
return rf(query, cond...)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, ...string) bool); ok {
|
||||
if rf, ok := ret.Get(0).(func(string, ...interface{}) bool); ok {
|
||||
r0 = rf(query, cond...)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(string, ...string) error); ok {
|
||||
if rf, ok := ret.Get(1).(func(string, ...interface{}) error); ok {
|
||||
r1 = rf(query, cond...)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
@@ -510,18 +506,18 @@ type AppRepo_IsInstalled_Call struct {
|
||||
|
||||
// IsInstalled is a helper method to define mock.On call
|
||||
// - query string
|
||||
// - cond ...string
|
||||
// - cond ...interface{}
|
||||
func (_e *AppRepo_Expecter) IsInstalled(query interface{}, cond ...interface{}) *AppRepo_IsInstalled_Call {
|
||||
return &AppRepo_IsInstalled_Call{Call: _e.mock.On("IsInstalled",
|
||||
append([]interface{}{query}, cond...)...)}
|
||||
}
|
||||
|
||||
func (_c *AppRepo_IsInstalled_Call) Run(run func(query string, cond ...string)) *AppRepo_IsInstalled_Call {
|
||||
func (_c *AppRepo_IsInstalled_Call) Run(run func(query string, cond ...interface{})) *AppRepo_IsInstalled_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
variadicArgs := make([]string, len(args)-1)
|
||||
variadicArgs := make([]interface{}, len(args)-1)
|
||||
for i, a := range args[1:] {
|
||||
if a != nil {
|
||||
variadicArgs[i] = a.(string)
|
||||
variadicArgs[i] = a.(interface{})
|
||||
}
|
||||
}
|
||||
run(args[0].(string), variadicArgs...)
|
||||
@@ -534,7 +530,7 @@ func (_c *AppRepo_IsInstalled_Call) Return(_a0 bool, _a1 error) *AppRepo_IsInsta
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *AppRepo_IsInstalled_Call) RunAndReturn(run func(string, ...string) (bool, error)) *AppRepo_IsInstalled_Call {
|
||||
func (_c *AppRepo_IsInstalled_Call) RunAndReturn(run func(string, ...interface{}) (bool, error)) *AppRepo_IsInstalled_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
@@ -178,6 +178,54 @@ func (_c *EnvironmentRepo_Install_Call) RunAndReturn(run func(string, string) er
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user