Files
argo-cd/gitops-engine/pkg/diff/mocks/ServerSideDryRunner.go
2025-11-01 13:07:08 +00:00

112 lines
3.2 KiB
Go
Generated

// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
package mocks
import (
"context"
mock "github.com/stretchr/testify/mock"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)
// NewServerSideDryRunner creates a new instance of ServerSideDryRunner. 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 NewServerSideDryRunner(t interface {
mock.TestingT
Cleanup(func())
}) *ServerSideDryRunner {
mock := &ServerSideDryRunner{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
// ServerSideDryRunner is an autogenerated mock type for the ServerSideDryRunner type
type ServerSideDryRunner struct {
mock.Mock
}
type ServerSideDryRunner_Expecter struct {
mock *mock.Mock
}
func (_m *ServerSideDryRunner) EXPECT() *ServerSideDryRunner_Expecter {
return &ServerSideDryRunner_Expecter{mock: &_m.Mock}
}
// Run provides a mock function for the type ServerSideDryRunner
func (_mock *ServerSideDryRunner) Run(ctx context.Context, obj *unstructured.Unstructured, manager string) (string, error) {
ret := _mock.Called(ctx, obj, manager)
if len(ret) == 0 {
panic("no return value specified for Run")
}
var r0 string
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, *unstructured.Unstructured, string) (string, error)); ok {
return returnFunc(ctx, obj, manager)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, *unstructured.Unstructured, string) string); ok {
r0 = returnFunc(ctx, obj, manager)
} else {
r0 = ret.Get(0).(string)
}
if returnFunc, ok := ret.Get(1).(func(context.Context, *unstructured.Unstructured, string) error); ok {
r1 = returnFunc(ctx, obj, manager)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ServerSideDryRunner_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run'
type ServerSideDryRunner_Run_Call struct {
*mock.Call
}
// Run is a helper method to define mock.On call
// - ctx context.Context
// - obj *unstructured.Unstructured
// - manager string
func (_e *ServerSideDryRunner_Expecter) Run(ctx interface{}, obj interface{}, manager interface{}) *ServerSideDryRunner_Run_Call {
return &ServerSideDryRunner_Run_Call{Call: _e.mock.On("Run", ctx, obj, manager)}
}
func (_c *ServerSideDryRunner_Run_Call) Run(run func(ctx context.Context, obj *unstructured.Unstructured, manager string)) *ServerSideDryRunner_Run_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 *unstructured.Unstructured
if args[1] != nil {
arg1 = args[1].(*unstructured.Unstructured)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *ServerSideDryRunner_Run_Call) Return(s string, err error) *ServerSideDryRunner_Run_Call {
_c.Call.Return(s, err)
return _c
}
func (_c *ServerSideDryRunner_Run_Call) RunAndReturn(run func(ctx context.Context, obj *unstructured.Unstructured, manager string) (string, error)) *ServerSideDryRunner_Run_Call {
_c.Call.Return(run)
return _c
}