grafana/pkg/registry/apis/provisioning/repository/clone_fn_mock.go

96 lines
2.5 KiB
Go

// Code generated by mockery v2.52.4. DO NOT EDIT.
package repository
import (
context "context"
mock "github.com/stretchr/testify/mock"
)
// MockCloneFn is an autogenerated mock type for the CloneFn type
type MockCloneFn struct {
mock.Mock
}
type MockCloneFn_Expecter struct {
mock *mock.Mock
}
func (_m *MockCloneFn) EXPECT() *MockCloneFn_Expecter {
return &MockCloneFn_Expecter{mock: &_m.Mock}
}
// Execute provides a mock function with given fields: ctx, opts
func (_m *MockCloneFn) Execute(ctx context.Context, opts CloneOptions) (ClonedRepository, error) {
ret := _m.Called(ctx, opts)
if len(ret) == 0 {
panic("no return value specified for Execute")
}
var r0 ClonedRepository
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, CloneOptions) (ClonedRepository, error)); ok {
return rf(ctx, opts)
}
if rf, ok := ret.Get(0).(func(context.Context, CloneOptions) ClonedRepository); ok {
r0 = rf(ctx, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(ClonedRepository)
}
}
if rf, ok := ret.Get(1).(func(context.Context, CloneOptions) error); ok {
r1 = rf(ctx, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockCloneFn_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
type MockCloneFn_Execute_Call struct {
*mock.Call
}
// Execute is a helper method to define mock.On call
// - ctx context.Context
// - opts CloneOptions
func (_e *MockCloneFn_Expecter) Execute(ctx interface{}, opts interface{}) *MockCloneFn_Execute_Call {
return &MockCloneFn_Execute_Call{Call: _e.mock.On("Execute", ctx, opts)}
}
func (_c *MockCloneFn_Execute_Call) Run(run func(ctx context.Context, opts CloneOptions)) *MockCloneFn_Execute_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(CloneOptions))
})
return _c
}
func (_c *MockCloneFn_Execute_Call) Return(_a0 ClonedRepository, _a1 error) *MockCloneFn_Execute_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockCloneFn_Execute_Call) RunAndReturn(run func(context.Context, CloneOptions) (ClonedRepository, error)) *MockCloneFn_Execute_Call {
_c.Call.Return(run)
return _c
}
// NewMockCloneFn creates a new instance of MockCloneFn. 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 NewMockCloneFn(t interface {
mock.TestingT
Cleanup(func())
}) *MockCloneFn {
mock := &MockCloneFn{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}