mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-04-04 15:58:49 +02:00
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
114 lines
3.2 KiB
Go
Generated
114 lines
3.2 KiB
Go
Generated
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// NewRepoGetter creates a new instance of RepoGetter. 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 NewRepoGetter(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *RepoGetter {
|
|
mock := &RepoGetter{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// RepoGetter is an autogenerated mock type for the RepoGetter type
|
|
type RepoGetter struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type RepoGetter_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *RepoGetter) EXPECT() *RepoGetter_Expecter {
|
|
return &RepoGetter_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// GetRepository provides a mock function for the type RepoGetter
|
|
func (_mock *RepoGetter) GetRepository(ctx context.Context, repoURL string, project string) (*v1alpha1.Repository, error) {
|
|
ret := _mock.Called(ctx, repoURL, project)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetRepository")
|
|
}
|
|
|
|
var r0 *v1alpha1.Repository
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.Repository, error)); ok {
|
|
return returnFunc(ctx, repoURL, project)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.Repository); ok {
|
|
r0 = returnFunc(ctx, repoURL, project)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*v1alpha1.Repository)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
|
r1 = returnFunc(ctx, repoURL, project)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// RepoGetter_GetRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepository'
|
|
type RepoGetter_GetRepository_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetRepository is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - repoURL string
|
|
// - project string
|
|
func (_e *RepoGetter_Expecter) GetRepository(ctx interface{}, repoURL interface{}, project interface{}) *RepoGetter_GetRepository_Call {
|
|
return &RepoGetter_GetRepository_Call{Call: _e.mock.On("GetRepository", ctx, repoURL, project)}
|
|
}
|
|
|
|
func (_c *RepoGetter_GetRepository_Call) Run(run func(ctx context.Context, repoURL string, project string)) *RepoGetter_GetRepository_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *RepoGetter_GetRepository_Call) Return(repository *v1alpha1.Repository, err error) *RepoGetter_GetRepository_Call {
|
|
_c.Call.Return(repository, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *RepoGetter_GetRepository_Call) RunAndReturn(run func(ctx context.Context, repoURL string, project string) (*v1alpha1.Repository, error)) *RepoGetter_GetRepository_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|