mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
219 lines
7.2 KiB
Go
Generated
219 lines
7.2 KiB
Go
Generated
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
|
|
mock "github.com/stretchr/testify/mock"
|
|
"sigs.k8s.io/controller-runtime/pkg/client"
|
|
)
|
|
|
|
// NewGenerator creates a new instance of Generator. 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 NewGenerator(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Generator {
|
|
mock := &Generator{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// Generator is an autogenerated mock type for the Generator type
|
|
type Generator struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type Generator_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *Generator) EXPECT() *Generator_Expecter {
|
|
return &Generator_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// GenerateParams provides a mock function for the type Generator
|
|
func (_mock *Generator) GenerateParams(appSetGenerator *v1alpha1.ApplicationSetGenerator, applicationSetInfo *v1alpha1.ApplicationSet, client1 client.Client) ([]map[string]any, error) {
|
|
ret := _mock.Called(appSetGenerator, applicationSetInfo, client1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GenerateParams")
|
|
}
|
|
|
|
var r0 []map[string]any
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(*v1alpha1.ApplicationSetGenerator, *v1alpha1.ApplicationSet, client.Client) ([]map[string]any, error)); ok {
|
|
return returnFunc(appSetGenerator, applicationSetInfo, client1)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(*v1alpha1.ApplicationSetGenerator, *v1alpha1.ApplicationSet, client.Client) []map[string]any); ok {
|
|
r0 = returnFunc(appSetGenerator, applicationSetInfo, client1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]map[string]any)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(*v1alpha1.ApplicationSetGenerator, *v1alpha1.ApplicationSet, client.Client) error); ok {
|
|
r1 = returnFunc(appSetGenerator, applicationSetInfo, client1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Generator_GenerateParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateParams'
|
|
type Generator_GenerateParams_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GenerateParams is a helper method to define mock.On call
|
|
// - appSetGenerator *v1alpha1.ApplicationSetGenerator
|
|
// - applicationSetInfo *v1alpha1.ApplicationSet
|
|
// - client1 client.Client
|
|
func (_e *Generator_Expecter) GenerateParams(appSetGenerator interface{}, applicationSetInfo interface{}, client1 interface{}) *Generator_GenerateParams_Call {
|
|
return &Generator_GenerateParams_Call{Call: _e.mock.On("GenerateParams", appSetGenerator, applicationSetInfo, client1)}
|
|
}
|
|
|
|
func (_c *Generator_GenerateParams_Call) Run(run func(appSetGenerator *v1alpha1.ApplicationSetGenerator, applicationSetInfo *v1alpha1.ApplicationSet, client1 client.Client)) *Generator_GenerateParams_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 *v1alpha1.ApplicationSetGenerator
|
|
if args[0] != nil {
|
|
arg0 = args[0].(*v1alpha1.ApplicationSetGenerator)
|
|
}
|
|
var arg1 *v1alpha1.ApplicationSet
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*v1alpha1.ApplicationSet)
|
|
}
|
|
var arg2 client.Client
|
|
if args[2] != nil {
|
|
arg2 = args[2].(client.Client)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Generator_GenerateParams_Call) Return(stringToVs []map[string]any, err error) *Generator_GenerateParams_Call {
|
|
_c.Call.Return(stringToVs, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Generator_GenerateParams_Call) RunAndReturn(run func(appSetGenerator *v1alpha1.ApplicationSetGenerator, applicationSetInfo *v1alpha1.ApplicationSet, client1 client.Client) ([]map[string]any, error)) *Generator_GenerateParams_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetRequeueAfter provides a mock function for the type Generator
|
|
func (_mock *Generator) GetRequeueAfter(appSetGenerator *v1alpha1.ApplicationSetGenerator) time.Duration {
|
|
ret := _mock.Called(appSetGenerator)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetRequeueAfter")
|
|
}
|
|
|
|
var r0 time.Duration
|
|
if returnFunc, ok := ret.Get(0).(func(*v1alpha1.ApplicationSetGenerator) time.Duration); ok {
|
|
r0 = returnFunc(appSetGenerator)
|
|
} else {
|
|
r0 = ret.Get(0).(time.Duration)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Generator_GetRequeueAfter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRequeueAfter'
|
|
type Generator_GetRequeueAfter_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetRequeueAfter is a helper method to define mock.On call
|
|
// - appSetGenerator *v1alpha1.ApplicationSetGenerator
|
|
func (_e *Generator_Expecter) GetRequeueAfter(appSetGenerator interface{}) *Generator_GetRequeueAfter_Call {
|
|
return &Generator_GetRequeueAfter_Call{Call: _e.mock.On("GetRequeueAfter", appSetGenerator)}
|
|
}
|
|
|
|
func (_c *Generator_GetRequeueAfter_Call) Run(run func(appSetGenerator *v1alpha1.ApplicationSetGenerator)) *Generator_GetRequeueAfter_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 *v1alpha1.ApplicationSetGenerator
|
|
if args[0] != nil {
|
|
arg0 = args[0].(*v1alpha1.ApplicationSetGenerator)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Generator_GetRequeueAfter_Call) Return(duration time.Duration) *Generator_GetRequeueAfter_Call {
|
|
_c.Call.Return(duration)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Generator_GetRequeueAfter_Call) RunAndReturn(run func(appSetGenerator *v1alpha1.ApplicationSetGenerator) time.Duration) *Generator_GetRequeueAfter_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTemplate provides a mock function for the type Generator
|
|
func (_mock *Generator) GetTemplate(appSetGenerator *v1alpha1.ApplicationSetGenerator) *v1alpha1.ApplicationSetTemplate {
|
|
ret := _mock.Called(appSetGenerator)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTemplate")
|
|
}
|
|
|
|
var r0 *v1alpha1.ApplicationSetTemplate
|
|
if returnFunc, ok := ret.Get(0).(func(*v1alpha1.ApplicationSetGenerator) *v1alpha1.ApplicationSetTemplate); ok {
|
|
r0 = returnFunc(appSetGenerator)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.ApplicationSetTemplate)
|
|
}
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Generator_GetTemplate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTemplate'
|
|
type Generator_GetTemplate_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTemplate is a helper method to define mock.On call
|
|
// - appSetGenerator *v1alpha1.ApplicationSetGenerator
|
|
func (_e *Generator_Expecter) GetTemplate(appSetGenerator interface{}) *Generator_GetTemplate_Call {
|
|
return &Generator_GetTemplate_Call{Call: _e.mock.On("GetTemplate", appSetGenerator)}
|
|
}
|
|
|
|
func (_c *Generator_GetTemplate_Call) Run(run func(appSetGenerator *v1alpha1.ApplicationSetGenerator)) *Generator_GetTemplate_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 *v1alpha1.ApplicationSetGenerator
|
|
if args[0] != nil {
|
|
arg0 = args[0].(*v1alpha1.ApplicationSetGenerator)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Generator_GetTemplate_Call) Return(applicationSetTemplate *v1alpha1.ApplicationSetTemplate) *Generator_GetTemplate_Call {
|
|
_c.Call.Return(applicationSetTemplate)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Generator_GetTemplate_Call) RunAndReturn(run func(appSetGenerator *v1alpha1.ApplicationSetGenerator) *v1alpha1.ApplicationSetTemplate) *Generator_GetTemplate_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|