Files
panel/mocks/biz/ContainerComposeRepo.go
T
耗子 3ce353e8e4 chore: 升级 Go 1.27 并迁移 mockery v3 修复 CI
mockery v2 已 EOL,其内嵌的旧版 x/tools 无法解析 Go 1.27 的 export data,
导致 Mockery workflow 在 stable 切到 1.27.0 后持续失败。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-26 17:37:38 +08:00

446 lines
12 KiB
Go

// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
package biz
import (
"github.com/acepanel/panel/v3/pkg/types"
mock "github.com/stretchr/testify/mock"
)
// NewContainerComposeRepo creates a new instance of ContainerComposeRepo. 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 NewContainerComposeRepo(t interface {
mock.TestingT
Cleanup(func())
}) *ContainerComposeRepo {
mock := &ContainerComposeRepo{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
// ContainerComposeRepo is an autogenerated mock type for the ContainerComposeRepo type
type ContainerComposeRepo struct {
mock.Mock
}
type ContainerComposeRepo_Expecter struct {
mock *mock.Mock
}
func (_m *ContainerComposeRepo) EXPECT() *ContainerComposeRepo_Expecter {
return &ContainerComposeRepo_Expecter{mock: &_m.Mock}
}
// Create provides a mock function for the type ContainerComposeRepo
func (_mock *ContainerComposeRepo) Create(name string, compose string, envs []types.KV) error {
ret := _mock.Called(name, compose, envs)
if len(ret) == 0 {
panic("no return value specified for Create")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string, string, []types.KV) error); ok {
r0 = returnFunc(name, compose, envs)
} else {
r0 = ret.Error(0)
}
return r0
}
// ContainerComposeRepo_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
type ContainerComposeRepo_Create_Call struct {
*mock.Call
}
// Create is a helper method to define mock.On call
// - name string
// - compose string
// - envs []types.KV
func (_e *ContainerComposeRepo_Expecter) Create(name any, compose any, envs any) *ContainerComposeRepo_Create_Call {
return &ContainerComposeRepo_Create_Call{Call: _e.mock.On("Create", name, compose, envs)}
}
func (_c *ContainerComposeRepo_Create_Call) Run(run func(name string, compose string, envs []types.KV)) *ContainerComposeRepo_Create_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
var arg2 []types.KV
if args[2] != nil {
arg2 = args[2].([]types.KV)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *ContainerComposeRepo_Create_Call) Return(err error) *ContainerComposeRepo_Create_Call {
_c.Call.Return(err)
return _c
}
func (_c *ContainerComposeRepo_Create_Call) RunAndReturn(run func(name string, compose string, envs []types.KV) error) *ContainerComposeRepo_Create_Call {
_c.Call.Return(run)
return _c
}
// Down provides a mock function for the type ContainerComposeRepo
func (_mock *ContainerComposeRepo) Down(name string) error {
ret := _mock.Called(name)
if len(ret) == 0 {
panic("no return value specified for Down")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string) error); ok {
r0 = returnFunc(name)
} else {
r0 = ret.Error(0)
}
return r0
}
// ContainerComposeRepo_Down_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Down'
type ContainerComposeRepo_Down_Call struct {
*mock.Call
}
// Down is a helper method to define mock.On call
// - name string
func (_e *ContainerComposeRepo_Expecter) Down(name any) *ContainerComposeRepo_Down_Call {
return &ContainerComposeRepo_Down_Call{Call: _e.mock.On("Down", name)}
}
func (_c *ContainerComposeRepo_Down_Call) Run(run func(name string)) *ContainerComposeRepo_Down_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *ContainerComposeRepo_Down_Call) Return(err error) *ContainerComposeRepo_Down_Call {
_c.Call.Return(err)
return _c
}
func (_c *ContainerComposeRepo_Down_Call) RunAndReturn(run func(name string) error) *ContainerComposeRepo_Down_Call {
_c.Call.Return(run)
return _c
}
// Get provides a mock function for the type ContainerComposeRepo
func (_mock *ContainerComposeRepo) Get(name string) (string, []types.KV, error) {
ret := _mock.Called(name)
if len(ret) == 0 {
panic("no return value specified for Get")
}
var r0 string
var r1 []types.KV
var r2 error
if returnFunc, ok := ret.Get(0).(func(string) (string, []types.KV, error)); ok {
return returnFunc(name)
}
if returnFunc, ok := ret.Get(0).(func(string) string); ok {
r0 = returnFunc(name)
} else {
r0 = ret.Get(0).(string)
}
if returnFunc, ok := ret.Get(1).(func(string) []types.KV); ok {
r1 = returnFunc(name)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).([]types.KV)
}
}
if returnFunc, ok := ret.Get(2).(func(string) error); ok {
r2 = returnFunc(name)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// ContainerComposeRepo_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
type ContainerComposeRepo_Get_Call struct {
*mock.Call
}
// Get is a helper method to define mock.On call
// - name string
func (_e *ContainerComposeRepo_Expecter) Get(name any) *ContainerComposeRepo_Get_Call {
return &ContainerComposeRepo_Get_Call{Call: _e.mock.On("Get", name)}
}
func (_c *ContainerComposeRepo_Get_Call) Run(run func(name string)) *ContainerComposeRepo_Get_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *ContainerComposeRepo_Get_Call) Return(s string, kVs []types.KV, err error) *ContainerComposeRepo_Get_Call {
_c.Call.Return(s, kVs, err)
return _c
}
func (_c *ContainerComposeRepo_Get_Call) RunAndReturn(run func(name string) (string, []types.KV, error)) *ContainerComposeRepo_Get_Call {
_c.Call.Return(run)
return _c
}
// List provides a mock function for the type ContainerComposeRepo
func (_mock *ContainerComposeRepo) List() ([]types.ContainerCompose, error) {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for List")
}
var r0 []types.ContainerCompose
var r1 error
if returnFunc, ok := ret.Get(0).(func() ([]types.ContainerCompose, error)); ok {
return returnFunc()
}
if returnFunc, ok := ret.Get(0).(func() []types.ContainerCompose); ok {
r0 = returnFunc()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]types.ContainerCompose)
}
}
if returnFunc, ok := ret.Get(1).(func() error); ok {
r1 = returnFunc()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ContainerComposeRepo_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
type ContainerComposeRepo_List_Call struct {
*mock.Call
}
// List is a helper method to define mock.On call
func (_e *ContainerComposeRepo_Expecter) List() *ContainerComposeRepo_List_Call {
return &ContainerComposeRepo_List_Call{Call: _e.mock.On("List")}
}
func (_c *ContainerComposeRepo_List_Call) Run(run func()) *ContainerComposeRepo_List_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *ContainerComposeRepo_List_Call) Return(containerComposes []types.ContainerCompose, err error) *ContainerComposeRepo_List_Call {
_c.Call.Return(containerComposes, err)
return _c
}
func (_c *ContainerComposeRepo_List_Call) RunAndReturn(run func() ([]types.ContainerCompose, error)) *ContainerComposeRepo_List_Call {
_c.Call.Return(run)
return _c
}
// RemoveDir provides a mock function for the type ContainerComposeRepo
func (_mock *ContainerComposeRepo) RemoveDir(name string) error {
ret := _mock.Called(name)
if len(ret) == 0 {
panic("no return value specified for RemoveDir")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string) error); ok {
r0 = returnFunc(name)
} else {
r0 = ret.Error(0)
}
return r0
}
// ContainerComposeRepo_RemoveDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveDir'
type ContainerComposeRepo_RemoveDir_Call struct {
*mock.Call
}
// RemoveDir is a helper method to define mock.On call
// - name string
func (_e *ContainerComposeRepo_Expecter) RemoveDir(name any) *ContainerComposeRepo_RemoveDir_Call {
return &ContainerComposeRepo_RemoveDir_Call{Call: _e.mock.On("RemoveDir", name)}
}
func (_c *ContainerComposeRepo_RemoveDir_Call) Run(run func(name string)) *ContainerComposeRepo_RemoveDir_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *ContainerComposeRepo_RemoveDir_Call) Return(err error) *ContainerComposeRepo_RemoveDir_Call {
_c.Call.Return(err)
return _c
}
func (_c *ContainerComposeRepo_RemoveDir_Call) RunAndReturn(run func(name string) error) *ContainerComposeRepo_RemoveDir_Call {
_c.Call.Return(run)
return _c
}
// Up provides a mock function for the type ContainerComposeRepo
func (_mock *ContainerComposeRepo) Up(name string, force bool) error {
ret := _mock.Called(name, force)
if len(ret) == 0 {
panic("no return value specified for Up")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string, bool) error); ok {
r0 = returnFunc(name, force)
} else {
r0 = ret.Error(0)
}
return r0
}
// ContainerComposeRepo_Up_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Up'
type ContainerComposeRepo_Up_Call struct {
*mock.Call
}
// Up is a helper method to define mock.On call
// - name string
// - force bool
func (_e *ContainerComposeRepo_Expecter) Up(name any, force any) *ContainerComposeRepo_Up_Call {
return &ContainerComposeRepo_Up_Call{Call: _e.mock.On("Up", name, force)}
}
func (_c *ContainerComposeRepo_Up_Call) Run(run func(name string, force bool)) *ContainerComposeRepo_Up_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 bool
if args[1] != nil {
arg1 = args[1].(bool)
}
run(
arg0,
arg1,
)
})
return _c
}
func (_c *ContainerComposeRepo_Up_Call) Return(err error) *ContainerComposeRepo_Up_Call {
_c.Call.Return(err)
return _c
}
func (_c *ContainerComposeRepo_Up_Call) RunAndReturn(run func(name string, force bool) error) *ContainerComposeRepo_Up_Call {
_c.Call.Return(run)
return _c
}
// Update provides a mock function for the type ContainerComposeRepo
func (_mock *ContainerComposeRepo) Update(name string, compose string, envs []types.KV) error {
ret := _mock.Called(name, compose, envs)
if len(ret) == 0 {
panic("no return value specified for Update")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string, string, []types.KV) error); ok {
r0 = returnFunc(name, compose, envs)
} else {
r0 = ret.Error(0)
}
return r0
}
// ContainerComposeRepo_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
type ContainerComposeRepo_Update_Call struct {
*mock.Call
}
// Update is a helper method to define mock.On call
// - name string
// - compose string
// - envs []types.KV
func (_e *ContainerComposeRepo_Expecter) Update(name any, compose any, envs any) *ContainerComposeRepo_Update_Call {
return &ContainerComposeRepo_Update_Call{Call: _e.mock.On("Update", name, compose, envs)}
}
func (_c *ContainerComposeRepo_Update_Call) Run(run func(name string, compose string, envs []types.KV)) *ContainerComposeRepo_Update_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
var arg2 []types.KV
if args[2] != nil {
arg2 = args[2].([]types.KV)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *ContainerComposeRepo_Update_Call) Return(err error) *ContainerComposeRepo_Update_Call {
_c.Call.Return(err)
return _c
}
func (_c *ContainerComposeRepo_Update_Call) RunAndReturn(run func(name string, compose string, envs []types.KV) error) *ContainerComposeRepo_Update_Call {
_c.Call.Return(run)
return _c
}