From 155d2404e784a735a8850788f5de1d19183b3bce Mon Sep 17 00:00:00 2001 From: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Date: Thu, 15 May 2025 13:14:36 -0400 Subject: [PATCH 1/2] chore(test): fix mockery deprecation warnings Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --- .mockery.yaml | 5 +- applicationset/generators/mocks/Generator.go | 106 +- applicationset/services/mocks/Repos.go | 77 +- .../mocks/AWSCodeCommitClient.go | 194 +- .../aws_codecommit/mocks/AWSTaggingClient.go | 59 +- .../azure_devops/git/mocks/Client.go | 3467 ++++++++++++++++- applicationset/utils/mocks/Renderer.go | 89 +- commitserver/apiclient/mocks/Clientset.go | 37 +- .../apiclient/mocks/CommitServiceClient.go | 47 +- .../commit/mocks/RepoClientFactory.go | 39 +- controller/cache/mocks/LiveStateCache.go | 353 +- .../cluster/mocks/ClusterServiceServer.go | 213 +- .../session/mocks/SessionServiceClient.go | 121 +- .../session/mocks/SessionServiceServer.go | 97 +- .../v1alpha1/mocks/AppProjectInterface.go | 258 +- .../mocks/RepoServerServiceClient.go | 527 ++- ...Service_GenerateManifestWithFilesClient.go | 237 +- server/application/mocks/Broadcaster.go | 138 +- server/extension/mocks/ApplicationGetter.go | 39 +- .../mocks/ExtensionMetricsRegistry.go | 68 +- server/extension/mocks/ProjectGetter.go | 66 +- server/extension/mocks/RbacEnforcer.go | 49 +- server/extension/mocks/SettingsGetter.go | 37 +- server/extension/mocks/UserGetter.go | 66 +- util/db/mocks/ArgoDB.go | 1196 +++++- util/git/mocks/Client.go | 571 ++- util/helm/mocks/Client.go | 156 +- util/io/mocks/TempPaths.go | 122 +- util/notification/argocd/mocks/Service.go | 70 +- util/workloadidentity/mocks/TokenProvider.go | 38 +- 30 files changed, 8462 insertions(+), 80 deletions(-) diff --git a/.mockery.yaml b/.mockery.yaml index b8a1c4906424b..b62de07e9b8ad 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -3,7 +3,10 @@ filename: "{{.InterfaceName}}.go" dir: "{{.InterfaceDir}}/mocks" outpkg: "mocks" mockname: "{{.InterfaceName}}" -with-expecter: false +with-expecter: true +resolve-type-alias: false +disable-version-string: true +issue-845-fix: true # individual interface config packages: github.com/argoproj/argo-cd/v3/applicationset/generators: diff --git a/applicationset/generators/mocks/Generator.go b/applicationset/generators/mocks/Generator.go index 7ad6533479534..d6b4a3564ef9d 100644 --- a/applicationset/generators/mocks/Generator.go +++ b/applicationset/generators/mocks/Generator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -17,24 +17,32 @@ 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 with given fields: appSetGenerator, applicationSetInfo, _a2 -func (_m *Generator) GenerateParams(appSetGenerator *v1alpha1.ApplicationSetGenerator, applicationSetInfo *v1alpha1.ApplicationSet, _a2 client.Client) ([]map[string]interface{}, error) { +func (_m *Generator) GenerateParams(appSetGenerator *v1alpha1.ApplicationSetGenerator, applicationSetInfo *v1alpha1.ApplicationSet, _a2 client.Client) ([]map[string]any, error) { ret := _m.Called(appSetGenerator, applicationSetInfo, _a2) if len(ret) == 0 { panic("no return value specified for GenerateParams") } - var r0 []map[string]interface{} + var r0 []map[string]any var r1 error - if rf, ok := ret.Get(0).(func(*v1alpha1.ApplicationSetGenerator, *v1alpha1.ApplicationSet, client.Client) ([]map[string]interface{}, error)); ok { + if rf, ok := ret.Get(0).(func(*v1alpha1.ApplicationSetGenerator, *v1alpha1.ApplicationSet, client.Client) ([]map[string]any, error)); ok { return rf(appSetGenerator, applicationSetInfo, _a2) } - if rf, ok := ret.Get(0).(func(*v1alpha1.ApplicationSetGenerator, *v1alpha1.ApplicationSet, client.Client) []map[string]interface{}); ok { + if rf, ok := ret.Get(0).(func(*v1alpha1.ApplicationSetGenerator, *v1alpha1.ApplicationSet, client.Client) []map[string]any); ok { r0 = rf(appSetGenerator, applicationSetInfo, _a2) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]map[string]interface{}) + r0 = ret.Get(0).([]map[string]any) } } @@ -47,6 +55,36 @@ func (_m *Generator) GenerateParams(appSetGenerator *v1alpha1.ApplicationSetGene 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 +// - _a2 client.Client +func (_e *Generator_Expecter) GenerateParams(appSetGenerator interface{}, applicationSetInfo interface{}, _a2 interface{}) *Generator_GenerateParams_Call { + return &Generator_GenerateParams_Call{Call: _e.mock.On("GenerateParams", appSetGenerator, applicationSetInfo, _a2)} +} + +func (_c *Generator_GenerateParams_Call) Run(run func(appSetGenerator *v1alpha1.ApplicationSetGenerator, applicationSetInfo *v1alpha1.ApplicationSet, _a2 client.Client)) *Generator_GenerateParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*v1alpha1.ApplicationSetGenerator), args[1].(*v1alpha1.ApplicationSet), args[2].(client.Client)) + }) + return _c +} + +func (_c *Generator_GenerateParams_Call) Return(_a0 []map[string]any, _a1 error) *Generator_GenerateParams_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Generator_GenerateParams_Call) RunAndReturn(run func(*v1alpha1.ApplicationSetGenerator, *v1alpha1.ApplicationSet, client.Client) ([]map[string]any, error)) *Generator_GenerateParams_Call { + _c.Call.Return(run) + return _c +} + // GetRequeueAfter provides a mock function with given fields: appSetGenerator func (_m *Generator) GetRequeueAfter(appSetGenerator *v1alpha1.ApplicationSetGenerator) time.Duration { ret := _m.Called(appSetGenerator) @@ -65,6 +103,34 @@ func (_m *Generator) GetRequeueAfter(appSetGenerator *v1alpha1.ApplicationSetGen 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) { + run(args[0].(*v1alpha1.ApplicationSetGenerator)) + }) + return _c +} + +func (_c *Generator_GetRequeueAfter_Call) Return(_a0 time.Duration) *Generator_GetRequeueAfter_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Generator_GetRequeueAfter_Call) RunAndReturn(run func(*v1alpha1.ApplicationSetGenerator) time.Duration) *Generator_GetRequeueAfter_Call { + _c.Call.Return(run) + return _c +} + // GetTemplate provides a mock function with given fields: appSetGenerator func (_m *Generator) GetTemplate(appSetGenerator *v1alpha1.ApplicationSetGenerator) *v1alpha1.ApplicationSetTemplate { ret := _m.Called(appSetGenerator) @@ -85,6 +151,34 @@ func (_m *Generator) GetTemplate(appSetGenerator *v1alpha1.ApplicationSetGenerat 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) { + run(args[0].(*v1alpha1.ApplicationSetGenerator)) + }) + return _c +} + +func (_c *Generator_GetTemplate_Call) Return(_a0 *v1alpha1.ApplicationSetTemplate) *Generator_GetTemplate_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Generator_GetTemplate_Call) RunAndReturn(run func(*v1alpha1.ApplicationSetGenerator) *v1alpha1.ApplicationSetTemplate) *Generator_GetTemplate_Call { + _c.Call.Return(run) + return _c +} + // 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 { diff --git a/applicationset/services/mocks/Repos.go b/applicationset/services/mocks/Repos.go index 766ef0d63ace8..7172e21378982 100644 --- a/applicationset/services/mocks/Repos.go +++ b/applicationset/services/mocks/Repos.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -13,6 +13,14 @@ type Repos struct { mock.Mock } +type Repos_Expecter struct { + mock *mock.Mock +} + +func (_m *Repos) EXPECT() *Repos_Expecter { + return &Repos_Expecter{mock: &_m.Mock} +} + // GetDirectories provides a mock function with given fields: ctx, repoURL, revision, project, noRevisionCache, verifyCommit func (_m *Repos) GetDirectories(ctx context.Context, repoURL string, revision string, project string, noRevisionCache bool, verifyCommit bool) ([]string, error) { ret := _m.Called(ctx, repoURL, revision, project, noRevisionCache, verifyCommit) @@ -43,6 +51,39 @@ func (_m *Repos) GetDirectories(ctx context.Context, repoURL string, revision st return r0, r1 } +// Repos_GetDirectories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDirectories' +type Repos_GetDirectories_Call struct { + *mock.Call +} + +// GetDirectories is a helper method to define mock.On call +// - ctx context.Context +// - repoURL string +// - revision string +// - project string +// - noRevisionCache bool +// - verifyCommit bool +func (_e *Repos_Expecter) GetDirectories(ctx interface{}, repoURL interface{}, revision interface{}, project interface{}, noRevisionCache interface{}, verifyCommit interface{}) *Repos_GetDirectories_Call { + return &Repos_GetDirectories_Call{Call: _e.mock.On("GetDirectories", ctx, repoURL, revision, project, noRevisionCache, verifyCommit)} +} + +func (_c *Repos_GetDirectories_Call) Run(run func(ctx context.Context, repoURL string, revision string, project string, noRevisionCache bool, verifyCommit bool)) *Repos_GetDirectories_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(bool), args[5].(bool)) + }) + return _c +} + +func (_c *Repos_GetDirectories_Call) Return(_a0 []string, _a1 error) *Repos_GetDirectories_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Repos_GetDirectories_Call) RunAndReturn(run func(context.Context, string, string, string, bool, bool) ([]string, error)) *Repos_GetDirectories_Call { + _c.Call.Return(run) + return _c +} + // GetFiles provides a mock function with given fields: ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit func (_m *Repos) GetFiles(ctx context.Context, repoURL string, revision string, project string, pattern string, noRevisionCache bool, verifyCommit bool) (map[string][]byte, error) { ret := _m.Called(ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit) @@ -73,6 +114,40 @@ func (_m *Repos) GetFiles(ctx context.Context, repoURL string, revision string, return r0, r1 } +// Repos_GetFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFiles' +type Repos_GetFiles_Call struct { + *mock.Call +} + +// GetFiles is a helper method to define mock.On call +// - ctx context.Context +// - repoURL string +// - revision string +// - project string +// - pattern string +// - noRevisionCache bool +// - verifyCommit bool +func (_e *Repos_Expecter) GetFiles(ctx interface{}, repoURL interface{}, revision interface{}, project interface{}, pattern interface{}, noRevisionCache interface{}, verifyCommit interface{}) *Repos_GetFiles_Call { + return &Repos_GetFiles_Call{Call: _e.mock.On("GetFiles", ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit)} +} + +func (_c *Repos_GetFiles_Call) Run(run func(ctx context.Context, repoURL string, revision string, project string, pattern string, noRevisionCache bool, verifyCommit bool)) *Repos_GetFiles_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string), args[5].(bool), args[6].(bool)) + }) + return _c +} + +func (_c *Repos_GetFiles_Call) Return(_a0 map[string][]byte, _a1 error) *Repos_GetFiles_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Repos_GetFiles_Call) RunAndReturn(run func(context.Context, string, string, string, string, bool, bool) (map[string][]byte, error)) *Repos_GetFiles_Call { + _c.Call.Return(run) + return _c +} + // NewRepos creates a new instance of Repos. 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 NewRepos(t interface { diff --git a/applicationset/services/scm_provider/aws_codecommit/mocks/AWSCodeCommitClient.go b/applicationset/services/scm_provider/aws_codecommit/mocks/AWSCodeCommitClient.go index d9081f64396c4..2187cf926e2b1 100644 --- a/applicationset/services/scm_provider/aws_codecommit/mocks/AWSCodeCommitClient.go +++ b/applicationset/services/scm_provider/aws_codecommit/mocks/AWSCodeCommitClient.go @@ -1,12 +1,10 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks import ( - context "context" - + aws "github.com/aws/aws-sdk-go/aws" codecommit "github.com/aws/aws-sdk-go/service/codecommit" - mock "github.com/stretchr/testify/mock" request "github.com/aws/aws-sdk-go/aws/request" @@ -17,8 +15,16 @@ type AWSCodeCommitClient struct { mock.Mock } +type AWSCodeCommitClient_Expecter struct { + mock *mock.Mock +} + +func (_m *AWSCodeCommitClient) EXPECT() *AWSCodeCommitClient_Expecter { + return &AWSCodeCommitClient_Expecter{mock: &_m.Mock} +} + // GetFolderWithContext provides a mock function with given fields: _a0, _a1, _a2 -func (_m *AWSCodeCommitClient) GetFolderWithContext(_a0 context.Context, _a1 *codecommit.GetFolderInput, _a2 ...request.Option) (*codecommit.GetFolderOutput, error) { +func (_m *AWSCodeCommitClient) GetFolderWithContext(_a0 aws.Context, _a1 *codecommit.GetFolderInput, _a2 ...request.Option) (*codecommit.GetFolderOutput, error) { _va := make([]interface{}, len(_a2)) for _i := range _a2 { _va[_i] = _a2[_i] @@ -34,10 +40,10 @@ func (_m *AWSCodeCommitClient) GetFolderWithContext(_a0 context.Context, _a1 *co var r0 *codecommit.GetFolderOutput var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *codecommit.GetFolderInput, ...request.Option) (*codecommit.GetFolderOutput, error)); ok { + if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.GetFolderInput, ...request.Option) (*codecommit.GetFolderOutput, error)); ok { return rf(_a0, _a1, _a2...) } - if rf, ok := ret.Get(0).(func(context.Context, *codecommit.GetFolderInput, ...request.Option) *codecommit.GetFolderOutput); ok { + if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.GetFolderInput, ...request.Option) *codecommit.GetFolderOutput); ok { r0 = rf(_a0, _a1, _a2...) } else { if ret.Get(0) != nil { @@ -45,7 +51,7 @@ func (_m *AWSCodeCommitClient) GetFolderWithContext(_a0 context.Context, _a1 *co } } - if rf, ok := ret.Get(1).(func(context.Context, *codecommit.GetFolderInput, ...request.Option) error); ok { + if rf, ok := ret.Get(1).(func(aws.Context, *codecommit.GetFolderInput, ...request.Option) error); ok { r1 = rf(_a0, _a1, _a2...) } else { r1 = ret.Error(1) @@ -54,8 +60,45 @@ func (_m *AWSCodeCommitClient) GetFolderWithContext(_a0 context.Context, _a1 *co return r0, r1 } +// AWSCodeCommitClient_GetFolderWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFolderWithContext' +type AWSCodeCommitClient_GetFolderWithContext_Call struct { + *mock.Call +} + +// GetFolderWithContext is a helper method to define mock.On call +// - _a0 aws.Context +// - _a1 *codecommit.GetFolderInput +// - _a2 ...request.Option +func (_e *AWSCodeCommitClient_Expecter) GetFolderWithContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *AWSCodeCommitClient_GetFolderWithContext_Call { + return &AWSCodeCommitClient_GetFolderWithContext_Call{Call: _e.mock.On("GetFolderWithContext", + append([]interface{}{_a0, _a1}, _a2...)...)} +} + +func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) Run(run func(_a0 aws.Context, _a1 *codecommit.GetFolderInput, _a2 ...request.Option)) *AWSCodeCommitClient_GetFolderWithContext_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]request.Option, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(request.Option) + } + } + run(args[0].(aws.Context), args[1].(*codecommit.GetFolderInput), variadicArgs...) + }) + return _c +} + +func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) Return(_a0 *codecommit.GetFolderOutput, _a1 error) *AWSCodeCommitClient_GetFolderWithContext_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) RunAndReturn(run func(aws.Context, *codecommit.GetFolderInput, ...request.Option) (*codecommit.GetFolderOutput, error)) *AWSCodeCommitClient_GetFolderWithContext_Call { + _c.Call.Return(run) + return _c +} + // GetRepositoryWithContext provides a mock function with given fields: _a0, _a1, _a2 -func (_m *AWSCodeCommitClient) GetRepositoryWithContext(_a0 context.Context, _a1 *codecommit.GetRepositoryInput, _a2 ...request.Option) (*codecommit.GetRepositoryOutput, error) { +func (_m *AWSCodeCommitClient) GetRepositoryWithContext(_a0 aws.Context, _a1 *codecommit.GetRepositoryInput, _a2 ...request.Option) (*codecommit.GetRepositoryOutput, error) { _va := make([]interface{}, len(_a2)) for _i := range _a2 { _va[_i] = _a2[_i] @@ -71,10 +114,10 @@ func (_m *AWSCodeCommitClient) GetRepositoryWithContext(_a0 context.Context, _a1 var r0 *codecommit.GetRepositoryOutput var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *codecommit.GetRepositoryInput, ...request.Option) (*codecommit.GetRepositoryOutput, error)); ok { + if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) (*codecommit.GetRepositoryOutput, error)); ok { return rf(_a0, _a1, _a2...) } - if rf, ok := ret.Get(0).(func(context.Context, *codecommit.GetRepositoryInput, ...request.Option) *codecommit.GetRepositoryOutput); ok { + if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) *codecommit.GetRepositoryOutput); ok { r0 = rf(_a0, _a1, _a2...) } else { if ret.Get(0) != nil { @@ -82,7 +125,7 @@ func (_m *AWSCodeCommitClient) GetRepositoryWithContext(_a0 context.Context, _a1 } } - if rf, ok := ret.Get(1).(func(context.Context, *codecommit.GetRepositoryInput, ...request.Option) error); ok { + if rf, ok := ret.Get(1).(func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) error); ok { r1 = rf(_a0, _a1, _a2...) } else { r1 = ret.Error(1) @@ -91,8 +134,45 @@ func (_m *AWSCodeCommitClient) GetRepositoryWithContext(_a0 context.Context, _a1 return r0, r1 } +// AWSCodeCommitClient_GetRepositoryWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepositoryWithContext' +type AWSCodeCommitClient_GetRepositoryWithContext_Call struct { + *mock.Call +} + +// GetRepositoryWithContext is a helper method to define mock.On call +// - _a0 aws.Context +// - _a1 *codecommit.GetRepositoryInput +// - _a2 ...request.Option +func (_e *AWSCodeCommitClient_Expecter) GetRepositoryWithContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *AWSCodeCommitClient_GetRepositoryWithContext_Call { + return &AWSCodeCommitClient_GetRepositoryWithContext_Call{Call: _e.mock.On("GetRepositoryWithContext", + append([]interface{}{_a0, _a1}, _a2...)...)} +} + +func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) Run(run func(_a0 aws.Context, _a1 *codecommit.GetRepositoryInput, _a2 ...request.Option)) *AWSCodeCommitClient_GetRepositoryWithContext_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]request.Option, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(request.Option) + } + } + run(args[0].(aws.Context), args[1].(*codecommit.GetRepositoryInput), variadicArgs...) + }) + return _c +} + +func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) Return(_a0 *codecommit.GetRepositoryOutput, _a1 error) *AWSCodeCommitClient_GetRepositoryWithContext_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) RunAndReturn(run func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) (*codecommit.GetRepositoryOutput, error)) *AWSCodeCommitClient_GetRepositoryWithContext_Call { + _c.Call.Return(run) + return _c +} + // ListBranchesWithContext provides a mock function with given fields: _a0, _a1, _a2 -func (_m *AWSCodeCommitClient) ListBranchesWithContext(_a0 context.Context, _a1 *codecommit.ListBranchesInput, _a2 ...request.Option) (*codecommit.ListBranchesOutput, error) { +func (_m *AWSCodeCommitClient) ListBranchesWithContext(_a0 aws.Context, _a1 *codecommit.ListBranchesInput, _a2 ...request.Option) (*codecommit.ListBranchesOutput, error) { _va := make([]interface{}, len(_a2)) for _i := range _a2 { _va[_i] = _a2[_i] @@ -108,10 +188,10 @@ func (_m *AWSCodeCommitClient) ListBranchesWithContext(_a0 context.Context, _a1 var r0 *codecommit.ListBranchesOutput var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *codecommit.ListBranchesInput, ...request.Option) (*codecommit.ListBranchesOutput, error)); ok { + if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) (*codecommit.ListBranchesOutput, error)); ok { return rf(_a0, _a1, _a2...) } - if rf, ok := ret.Get(0).(func(context.Context, *codecommit.ListBranchesInput, ...request.Option) *codecommit.ListBranchesOutput); ok { + if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) *codecommit.ListBranchesOutput); ok { r0 = rf(_a0, _a1, _a2...) } else { if ret.Get(0) != nil { @@ -119,7 +199,7 @@ func (_m *AWSCodeCommitClient) ListBranchesWithContext(_a0 context.Context, _a1 } } - if rf, ok := ret.Get(1).(func(context.Context, *codecommit.ListBranchesInput, ...request.Option) error); ok { + if rf, ok := ret.Get(1).(func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) error); ok { r1 = rf(_a0, _a1, _a2...) } else { r1 = ret.Error(1) @@ -128,8 +208,45 @@ func (_m *AWSCodeCommitClient) ListBranchesWithContext(_a0 context.Context, _a1 return r0, r1 } +// AWSCodeCommitClient_ListBranchesWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBranchesWithContext' +type AWSCodeCommitClient_ListBranchesWithContext_Call struct { + *mock.Call +} + +// ListBranchesWithContext is a helper method to define mock.On call +// - _a0 aws.Context +// - _a1 *codecommit.ListBranchesInput +// - _a2 ...request.Option +func (_e *AWSCodeCommitClient_Expecter) ListBranchesWithContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *AWSCodeCommitClient_ListBranchesWithContext_Call { + return &AWSCodeCommitClient_ListBranchesWithContext_Call{Call: _e.mock.On("ListBranchesWithContext", + append([]interface{}{_a0, _a1}, _a2...)...)} +} + +func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) Run(run func(_a0 aws.Context, _a1 *codecommit.ListBranchesInput, _a2 ...request.Option)) *AWSCodeCommitClient_ListBranchesWithContext_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]request.Option, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(request.Option) + } + } + run(args[0].(aws.Context), args[1].(*codecommit.ListBranchesInput), variadicArgs...) + }) + return _c +} + +func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) Return(_a0 *codecommit.ListBranchesOutput, _a1 error) *AWSCodeCommitClient_ListBranchesWithContext_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) RunAndReturn(run func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) (*codecommit.ListBranchesOutput, error)) *AWSCodeCommitClient_ListBranchesWithContext_Call { + _c.Call.Return(run) + return _c +} + // ListRepositoriesWithContext provides a mock function with given fields: _a0, _a1, _a2 -func (_m *AWSCodeCommitClient) ListRepositoriesWithContext(_a0 context.Context, _a1 *codecommit.ListRepositoriesInput, _a2 ...request.Option) (*codecommit.ListRepositoriesOutput, error) { +func (_m *AWSCodeCommitClient) ListRepositoriesWithContext(_a0 aws.Context, _a1 *codecommit.ListRepositoriesInput, _a2 ...request.Option) (*codecommit.ListRepositoriesOutput, error) { _va := make([]interface{}, len(_a2)) for _i := range _a2 { _va[_i] = _a2[_i] @@ -145,10 +262,10 @@ func (_m *AWSCodeCommitClient) ListRepositoriesWithContext(_a0 context.Context, var r0 *codecommit.ListRepositoriesOutput var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *codecommit.ListRepositoriesInput, ...request.Option) (*codecommit.ListRepositoriesOutput, error)); ok { + if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) (*codecommit.ListRepositoriesOutput, error)); ok { return rf(_a0, _a1, _a2...) } - if rf, ok := ret.Get(0).(func(context.Context, *codecommit.ListRepositoriesInput, ...request.Option) *codecommit.ListRepositoriesOutput); ok { + if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) *codecommit.ListRepositoriesOutput); ok { r0 = rf(_a0, _a1, _a2...) } else { if ret.Get(0) != nil { @@ -156,7 +273,7 @@ func (_m *AWSCodeCommitClient) ListRepositoriesWithContext(_a0 context.Context, } } - if rf, ok := ret.Get(1).(func(context.Context, *codecommit.ListRepositoriesInput, ...request.Option) error); ok { + if rf, ok := ret.Get(1).(func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) error); ok { r1 = rf(_a0, _a1, _a2...) } else { r1 = ret.Error(1) @@ -165,6 +282,43 @@ func (_m *AWSCodeCommitClient) ListRepositoriesWithContext(_a0 context.Context, return r0, r1 } +// AWSCodeCommitClient_ListRepositoriesWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRepositoriesWithContext' +type AWSCodeCommitClient_ListRepositoriesWithContext_Call struct { + *mock.Call +} + +// ListRepositoriesWithContext is a helper method to define mock.On call +// - _a0 aws.Context +// - _a1 *codecommit.ListRepositoriesInput +// - _a2 ...request.Option +func (_e *AWSCodeCommitClient_Expecter) ListRepositoriesWithContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { + return &AWSCodeCommitClient_ListRepositoriesWithContext_Call{Call: _e.mock.On("ListRepositoriesWithContext", + append([]interface{}{_a0, _a1}, _a2...)...)} +} + +func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) Run(run func(_a0 aws.Context, _a1 *codecommit.ListRepositoriesInput, _a2 ...request.Option)) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]request.Option, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(request.Option) + } + } + run(args[0].(aws.Context), args[1].(*codecommit.ListRepositoriesInput), variadicArgs...) + }) + return _c +} + +func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) Return(_a0 *codecommit.ListRepositoriesOutput, _a1 error) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) RunAndReturn(run func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) (*codecommit.ListRepositoriesOutput, error)) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { + _c.Call.Return(run) + return _c +} + // NewAWSCodeCommitClient creates a new instance of AWSCodeCommitClient. 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 NewAWSCodeCommitClient(t interface { diff --git a/applicationset/services/scm_provider/aws_codecommit/mocks/AWSTaggingClient.go b/applicationset/services/scm_provider/aws_codecommit/mocks/AWSTaggingClient.go index 1ba9503551cd8..62318552bde08 100644 --- a/applicationset/services/scm_provider/aws_codecommit/mocks/AWSTaggingClient.go +++ b/applicationset/services/scm_provider/aws_codecommit/mocks/AWSTaggingClient.go @@ -1,12 +1,12 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks import ( - context "context" + aws "github.com/aws/aws-sdk-go/aws" + mock "github.com/stretchr/testify/mock" request "github.com/aws/aws-sdk-go/aws/request" - mock "github.com/stretchr/testify/mock" resourcegroupstaggingapi "github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi" ) @@ -16,8 +16,16 @@ type AWSTaggingClient struct { mock.Mock } +type AWSTaggingClient_Expecter struct { + mock *mock.Mock +} + +func (_m *AWSTaggingClient) EXPECT() *AWSTaggingClient_Expecter { + return &AWSTaggingClient_Expecter{mock: &_m.Mock} +} + // GetResourcesWithContext provides a mock function with given fields: _a0, _a1, _a2 -func (_m *AWSTaggingClient) GetResourcesWithContext(_a0 context.Context, _a1 *resourcegroupstaggingapi.GetResourcesInput, _a2 ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error) { +func (_m *AWSTaggingClient) GetResourcesWithContext(_a0 aws.Context, _a1 *resourcegroupstaggingapi.GetResourcesInput, _a2 ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error) { _va := make([]interface{}, len(_a2)) for _i := range _a2 { _va[_i] = _a2[_i] @@ -33,10 +41,10 @@ func (_m *AWSTaggingClient) GetResourcesWithContext(_a0 context.Context, _a1 *re var r0 *resourcegroupstaggingapi.GetResourcesOutput var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error)); ok { + if rf, ok := ret.Get(0).(func(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error)); ok { return rf(_a0, _a1, _a2...) } - if rf, ok := ret.Get(0).(func(context.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) *resourcegroupstaggingapi.GetResourcesOutput); ok { + if rf, ok := ret.Get(0).(func(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) *resourcegroupstaggingapi.GetResourcesOutput); ok { r0 = rf(_a0, _a1, _a2...) } else { if ret.Get(0) != nil { @@ -44,7 +52,7 @@ func (_m *AWSTaggingClient) GetResourcesWithContext(_a0 context.Context, _a1 *re } } - if rf, ok := ret.Get(1).(func(context.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) error); ok { + if rf, ok := ret.Get(1).(func(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) error); ok { r1 = rf(_a0, _a1, _a2...) } else { r1 = ret.Error(1) @@ -53,6 +61,43 @@ func (_m *AWSTaggingClient) GetResourcesWithContext(_a0 context.Context, _a1 *re return r0, r1 } +// AWSTaggingClient_GetResourcesWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetResourcesWithContext' +type AWSTaggingClient_GetResourcesWithContext_Call struct { + *mock.Call +} + +// GetResourcesWithContext is a helper method to define mock.On call +// - _a0 aws.Context +// - _a1 *resourcegroupstaggingapi.GetResourcesInput +// - _a2 ...request.Option +func (_e *AWSTaggingClient_Expecter) GetResourcesWithContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *AWSTaggingClient_GetResourcesWithContext_Call { + return &AWSTaggingClient_GetResourcesWithContext_Call{Call: _e.mock.On("GetResourcesWithContext", + append([]interface{}{_a0, _a1}, _a2...)...)} +} + +func (_c *AWSTaggingClient_GetResourcesWithContext_Call) Run(run func(_a0 aws.Context, _a1 *resourcegroupstaggingapi.GetResourcesInput, _a2 ...request.Option)) *AWSTaggingClient_GetResourcesWithContext_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]request.Option, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(request.Option) + } + } + run(args[0].(aws.Context), args[1].(*resourcegroupstaggingapi.GetResourcesInput), variadicArgs...) + }) + return _c +} + +func (_c *AWSTaggingClient_GetResourcesWithContext_Call) Return(_a0 *resourcegroupstaggingapi.GetResourcesOutput, _a1 error) *AWSTaggingClient_GetResourcesWithContext_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AWSTaggingClient_GetResourcesWithContext_Call) RunAndReturn(run func(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error)) *AWSTaggingClient_GetResourcesWithContext_Call { + _c.Call.Return(run) + return _c +} + // NewAWSTaggingClient creates a new instance of AWSTaggingClient. 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 NewAWSTaggingClient(t interface { diff --git a/applicationset/services/scm_provider/azure_devops/git/mocks/Client.go b/applicationset/services/scm_provider/azure_devops/git/mocks/Client.go index 893ddfbc721a3..b1df4142bcf56 100644 --- a/applicationset/services/scm_provider/azure_devops/git/mocks/Client.go +++ b/applicationset/services/scm_provider/azure_devops/git/mocks/Client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -20,6 +20,14 @@ type Client struct { mock.Mock } +type Client_Expecter struct { + mock *mock.Mock +} + +func (_m *Client) EXPECT() *Client_Expecter { + return &Client_Expecter{mock: &_m.Mock} +} + // CreateAnnotatedTag provides a mock function with given fields: _a0, _a1 func (_m *Client) CreateAnnotatedTag(_a0 context.Context, _a1 git.CreateAnnotatedTagArgs) (*git.GitAnnotatedTag, error) { ret := _m.Called(_a0, _a1) @@ -50,6 +58,35 @@ func (_m *Client) CreateAnnotatedTag(_a0 context.Context, _a1 git.CreateAnnotate return r0, r1 } +// Client_CreateAnnotatedTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAnnotatedTag' +type Client_CreateAnnotatedTag_Call struct { + *mock.Call +} + +// CreateAnnotatedTag is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreateAnnotatedTagArgs +func (_e *Client_Expecter) CreateAnnotatedTag(_a0 interface{}, _a1 interface{}) *Client_CreateAnnotatedTag_Call { + return &Client_CreateAnnotatedTag_Call{Call: _e.mock.On("CreateAnnotatedTag", _a0, _a1)} +} + +func (_c *Client_CreateAnnotatedTag_Call) Run(run func(_a0 context.Context, _a1 git.CreateAnnotatedTagArgs)) *Client_CreateAnnotatedTag_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreateAnnotatedTagArgs)) + }) + return _c +} + +func (_c *Client_CreateAnnotatedTag_Call) Return(_a0 *git.GitAnnotatedTag, _a1 error) *Client_CreateAnnotatedTag_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreateAnnotatedTag_Call) RunAndReturn(run func(context.Context, git.CreateAnnotatedTagArgs) (*git.GitAnnotatedTag, error)) *Client_CreateAnnotatedTag_Call { + _c.Call.Return(run) + return _c +} + // CreateAttachment provides a mock function with given fields: _a0, _a1 func (_m *Client) CreateAttachment(_a0 context.Context, _a1 git.CreateAttachmentArgs) (*git.Attachment, error) { ret := _m.Called(_a0, _a1) @@ -80,6 +117,35 @@ func (_m *Client) CreateAttachment(_a0 context.Context, _a1 git.CreateAttachment return r0, r1 } +// Client_CreateAttachment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAttachment' +type Client_CreateAttachment_Call struct { + *mock.Call +} + +// CreateAttachment is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreateAttachmentArgs +func (_e *Client_Expecter) CreateAttachment(_a0 interface{}, _a1 interface{}) *Client_CreateAttachment_Call { + return &Client_CreateAttachment_Call{Call: _e.mock.On("CreateAttachment", _a0, _a1)} +} + +func (_c *Client_CreateAttachment_Call) Run(run func(_a0 context.Context, _a1 git.CreateAttachmentArgs)) *Client_CreateAttachment_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreateAttachmentArgs)) + }) + return _c +} + +func (_c *Client_CreateAttachment_Call) Return(_a0 *git.Attachment, _a1 error) *Client_CreateAttachment_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreateAttachment_Call) RunAndReturn(run func(context.Context, git.CreateAttachmentArgs) (*git.Attachment, error)) *Client_CreateAttachment_Call { + _c.Call.Return(run) + return _c +} + // CreateCherryPick provides a mock function with given fields: _a0, _a1 func (_m *Client) CreateCherryPick(_a0 context.Context, _a1 git.CreateCherryPickArgs) (*git.GitCherryPick, error) { ret := _m.Called(_a0, _a1) @@ -110,6 +176,35 @@ func (_m *Client) CreateCherryPick(_a0 context.Context, _a1 git.CreateCherryPick return r0, r1 } +// Client_CreateCherryPick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCherryPick' +type Client_CreateCherryPick_Call struct { + *mock.Call +} + +// CreateCherryPick is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreateCherryPickArgs +func (_e *Client_Expecter) CreateCherryPick(_a0 interface{}, _a1 interface{}) *Client_CreateCherryPick_Call { + return &Client_CreateCherryPick_Call{Call: _e.mock.On("CreateCherryPick", _a0, _a1)} +} + +func (_c *Client_CreateCherryPick_Call) Run(run func(_a0 context.Context, _a1 git.CreateCherryPickArgs)) *Client_CreateCherryPick_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreateCherryPickArgs)) + }) + return _c +} + +func (_c *Client_CreateCherryPick_Call) Return(_a0 *git.GitCherryPick, _a1 error) *Client_CreateCherryPick_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreateCherryPick_Call) RunAndReturn(run func(context.Context, git.CreateCherryPickArgs) (*git.GitCherryPick, error)) *Client_CreateCherryPick_Call { + _c.Call.Return(run) + return _c +} + // CreateComment provides a mock function with given fields: _a0, _a1 func (_m *Client) CreateComment(_a0 context.Context, _a1 git.CreateCommentArgs) (*git.Comment, error) { ret := _m.Called(_a0, _a1) @@ -140,6 +235,35 @@ func (_m *Client) CreateComment(_a0 context.Context, _a1 git.CreateCommentArgs) return r0, r1 } +// Client_CreateComment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateComment' +type Client_CreateComment_Call struct { + *mock.Call +} + +// CreateComment is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreateCommentArgs +func (_e *Client_Expecter) CreateComment(_a0 interface{}, _a1 interface{}) *Client_CreateComment_Call { + return &Client_CreateComment_Call{Call: _e.mock.On("CreateComment", _a0, _a1)} +} + +func (_c *Client_CreateComment_Call) Run(run func(_a0 context.Context, _a1 git.CreateCommentArgs)) *Client_CreateComment_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreateCommentArgs)) + }) + return _c +} + +func (_c *Client_CreateComment_Call) Return(_a0 *git.Comment, _a1 error) *Client_CreateComment_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreateComment_Call) RunAndReturn(run func(context.Context, git.CreateCommentArgs) (*git.Comment, error)) *Client_CreateComment_Call { + _c.Call.Return(run) + return _c +} + // CreateCommitStatus provides a mock function with given fields: _a0, _a1 func (_m *Client) CreateCommitStatus(_a0 context.Context, _a1 git.CreateCommitStatusArgs) (*git.GitStatus, error) { ret := _m.Called(_a0, _a1) @@ -170,6 +294,35 @@ func (_m *Client) CreateCommitStatus(_a0 context.Context, _a1 git.CreateCommitSt return r0, r1 } +// Client_CreateCommitStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCommitStatus' +type Client_CreateCommitStatus_Call struct { + *mock.Call +} + +// CreateCommitStatus is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreateCommitStatusArgs +func (_e *Client_Expecter) CreateCommitStatus(_a0 interface{}, _a1 interface{}) *Client_CreateCommitStatus_Call { + return &Client_CreateCommitStatus_Call{Call: _e.mock.On("CreateCommitStatus", _a0, _a1)} +} + +func (_c *Client_CreateCommitStatus_Call) Run(run func(_a0 context.Context, _a1 git.CreateCommitStatusArgs)) *Client_CreateCommitStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreateCommitStatusArgs)) + }) + return _c +} + +func (_c *Client_CreateCommitStatus_Call) Return(_a0 *git.GitStatus, _a1 error) *Client_CreateCommitStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreateCommitStatus_Call) RunAndReturn(run func(context.Context, git.CreateCommitStatusArgs) (*git.GitStatus, error)) *Client_CreateCommitStatus_Call { + _c.Call.Return(run) + return _c +} + // CreateFavorite provides a mock function with given fields: _a0, _a1 func (_m *Client) CreateFavorite(_a0 context.Context, _a1 git.CreateFavoriteArgs) (*git.GitRefFavorite, error) { ret := _m.Called(_a0, _a1) @@ -200,6 +353,35 @@ func (_m *Client) CreateFavorite(_a0 context.Context, _a1 git.CreateFavoriteArgs return r0, r1 } +// Client_CreateFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateFavorite' +type Client_CreateFavorite_Call struct { + *mock.Call +} + +// CreateFavorite is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreateFavoriteArgs +func (_e *Client_Expecter) CreateFavorite(_a0 interface{}, _a1 interface{}) *Client_CreateFavorite_Call { + return &Client_CreateFavorite_Call{Call: _e.mock.On("CreateFavorite", _a0, _a1)} +} + +func (_c *Client_CreateFavorite_Call) Run(run func(_a0 context.Context, _a1 git.CreateFavoriteArgs)) *Client_CreateFavorite_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreateFavoriteArgs)) + }) + return _c +} + +func (_c *Client_CreateFavorite_Call) Return(_a0 *git.GitRefFavorite, _a1 error) *Client_CreateFavorite_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreateFavorite_Call) RunAndReturn(run func(context.Context, git.CreateFavoriteArgs) (*git.GitRefFavorite, error)) *Client_CreateFavorite_Call { + _c.Call.Return(run) + return _c +} + // CreateForkSyncRequest provides a mock function with given fields: _a0, _a1 func (_m *Client) CreateForkSyncRequest(_a0 context.Context, _a1 git.CreateForkSyncRequestArgs) (*git.GitForkSyncRequest, error) { ret := _m.Called(_a0, _a1) @@ -230,6 +412,35 @@ func (_m *Client) CreateForkSyncRequest(_a0 context.Context, _a1 git.CreateForkS return r0, r1 } +// Client_CreateForkSyncRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateForkSyncRequest' +type Client_CreateForkSyncRequest_Call struct { + *mock.Call +} + +// CreateForkSyncRequest is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreateForkSyncRequestArgs +func (_e *Client_Expecter) CreateForkSyncRequest(_a0 interface{}, _a1 interface{}) *Client_CreateForkSyncRequest_Call { + return &Client_CreateForkSyncRequest_Call{Call: _e.mock.On("CreateForkSyncRequest", _a0, _a1)} +} + +func (_c *Client_CreateForkSyncRequest_Call) Run(run func(_a0 context.Context, _a1 git.CreateForkSyncRequestArgs)) *Client_CreateForkSyncRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreateForkSyncRequestArgs)) + }) + return _c +} + +func (_c *Client_CreateForkSyncRequest_Call) Return(_a0 *git.GitForkSyncRequest, _a1 error) *Client_CreateForkSyncRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreateForkSyncRequest_Call) RunAndReturn(run func(context.Context, git.CreateForkSyncRequestArgs) (*git.GitForkSyncRequest, error)) *Client_CreateForkSyncRequest_Call { + _c.Call.Return(run) + return _c +} + // CreateImportRequest provides a mock function with given fields: _a0, _a1 func (_m *Client) CreateImportRequest(_a0 context.Context, _a1 git.CreateImportRequestArgs) (*git.GitImportRequest, error) { ret := _m.Called(_a0, _a1) @@ -260,6 +471,35 @@ func (_m *Client) CreateImportRequest(_a0 context.Context, _a1 git.CreateImportR return r0, r1 } +// Client_CreateImportRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateImportRequest' +type Client_CreateImportRequest_Call struct { + *mock.Call +} + +// CreateImportRequest is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreateImportRequestArgs +func (_e *Client_Expecter) CreateImportRequest(_a0 interface{}, _a1 interface{}) *Client_CreateImportRequest_Call { + return &Client_CreateImportRequest_Call{Call: _e.mock.On("CreateImportRequest", _a0, _a1)} +} + +func (_c *Client_CreateImportRequest_Call) Run(run func(_a0 context.Context, _a1 git.CreateImportRequestArgs)) *Client_CreateImportRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreateImportRequestArgs)) + }) + return _c +} + +func (_c *Client_CreateImportRequest_Call) Return(_a0 *git.GitImportRequest, _a1 error) *Client_CreateImportRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreateImportRequest_Call) RunAndReturn(run func(context.Context, git.CreateImportRequestArgs) (*git.GitImportRequest, error)) *Client_CreateImportRequest_Call { + _c.Call.Return(run) + return _c +} + // CreateLike provides a mock function with given fields: _a0, _a1 func (_m *Client) CreateLike(_a0 context.Context, _a1 git.CreateLikeArgs) error { ret := _m.Called(_a0, _a1) @@ -278,6 +518,35 @@ func (_m *Client) CreateLike(_a0 context.Context, _a1 git.CreateLikeArgs) error return r0 } +// Client_CreateLike_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateLike' +type Client_CreateLike_Call struct { + *mock.Call +} + +// CreateLike is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreateLikeArgs +func (_e *Client_Expecter) CreateLike(_a0 interface{}, _a1 interface{}) *Client_CreateLike_Call { + return &Client_CreateLike_Call{Call: _e.mock.On("CreateLike", _a0, _a1)} +} + +func (_c *Client_CreateLike_Call) Run(run func(_a0 context.Context, _a1 git.CreateLikeArgs)) *Client_CreateLike_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreateLikeArgs)) + }) + return _c +} + +func (_c *Client_CreateLike_Call) Return(_a0 error) *Client_CreateLike_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_CreateLike_Call) RunAndReturn(run func(context.Context, git.CreateLikeArgs) error) *Client_CreateLike_Call { + _c.Call.Return(run) + return _c +} + // CreateMergeRequest provides a mock function with given fields: _a0, _a1 func (_m *Client) CreateMergeRequest(_a0 context.Context, _a1 git.CreateMergeRequestArgs) (*git.GitMerge, error) { ret := _m.Called(_a0, _a1) @@ -308,6 +577,35 @@ func (_m *Client) CreateMergeRequest(_a0 context.Context, _a1 git.CreateMergeReq return r0, r1 } +// Client_CreateMergeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateMergeRequest' +type Client_CreateMergeRequest_Call struct { + *mock.Call +} + +// CreateMergeRequest is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreateMergeRequestArgs +func (_e *Client_Expecter) CreateMergeRequest(_a0 interface{}, _a1 interface{}) *Client_CreateMergeRequest_Call { + return &Client_CreateMergeRequest_Call{Call: _e.mock.On("CreateMergeRequest", _a0, _a1)} +} + +func (_c *Client_CreateMergeRequest_Call) Run(run func(_a0 context.Context, _a1 git.CreateMergeRequestArgs)) *Client_CreateMergeRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreateMergeRequestArgs)) + }) + return _c +} + +func (_c *Client_CreateMergeRequest_Call) Return(_a0 *git.GitMerge, _a1 error) *Client_CreateMergeRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreateMergeRequest_Call) RunAndReturn(run func(context.Context, git.CreateMergeRequestArgs) (*git.GitMerge, error)) *Client_CreateMergeRequest_Call { + _c.Call.Return(run) + return _c +} + // CreatePullRequest provides a mock function with given fields: _a0, _a1 func (_m *Client) CreatePullRequest(_a0 context.Context, _a1 git.CreatePullRequestArgs) (*git.GitPullRequest, error) { ret := _m.Called(_a0, _a1) @@ -338,6 +636,35 @@ func (_m *Client) CreatePullRequest(_a0 context.Context, _a1 git.CreatePullReque return r0, r1 } +// Client_CreatePullRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePullRequest' +type Client_CreatePullRequest_Call struct { + *mock.Call +} + +// CreatePullRequest is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreatePullRequestArgs +func (_e *Client_Expecter) CreatePullRequest(_a0 interface{}, _a1 interface{}) *Client_CreatePullRequest_Call { + return &Client_CreatePullRequest_Call{Call: _e.mock.On("CreatePullRequest", _a0, _a1)} +} + +func (_c *Client_CreatePullRequest_Call) Run(run func(_a0 context.Context, _a1 git.CreatePullRequestArgs)) *Client_CreatePullRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreatePullRequestArgs)) + }) + return _c +} + +func (_c *Client_CreatePullRequest_Call) Return(_a0 *git.GitPullRequest, _a1 error) *Client_CreatePullRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreatePullRequest_Call) RunAndReturn(run func(context.Context, git.CreatePullRequestArgs) (*git.GitPullRequest, error)) *Client_CreatePullRequest_Call { + _c.Call.Return(run) + return _c +} + // CreatePullRequestIterationStatus provides a mock function with given fields: _a0, _a1 func (_m *Client) CreatePullRequestIterationStatus(_a0 context.Context, _a1 git.CreatePullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error) { ret := _m.Called(_a0, _a1) @@ -368,6 +695,35 @@ func (_m *Client) CreatePullRequestIterationStatus(_a0 context.Context, _a1 git. return r0, r1 } +// Client_CreatePullRequestIterationStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePullRequestIterationStatus' +type Client_CreatePullRequestIterationStatus_Call struct { + *mock.Call +} + +// CreatePullRequestIterationStatus is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreatePullRequestIterationStatusArgs +func (_e *Client_Expecter) CreatePullRequestIterationStatus(_a0 interface{}, _a1 interface{}) *Client_CreatePullRequestIterationStatus_Call { + return &Client_CreatePullRequestIterationStatus_Call{Call: _e.mock.On("CreatePullRequestIterationStatus", _a0, _a1)} +} + +func (_c *Client_CreatePullRequestIterationStatus_Call) Run(run func(_a0 context.Context, _a1 git.CreatePullRequestIterationStatusArgs)) *Client_CreatePullRequestIterationStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreatePullRequestIterationStatusArgs)) + }) + return _c +} + +func (_c *Client_CreatePullRequestIterationStatus_Call) Return(_a0 *git.GitPullRequestStatus, _a1 error) *Client_CreatePullRequestIterationStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreatePullRequestIterationStatus_Call) RunAndReturn(run func(context.Context, git.CreatePullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error)) *Client_CreatePullRequestIterationStatus_Call { + _c.Call.Return(run) + return _c +} + // CreatePullRequestLabel provides a mock function with given fields: _a0, _a1 func (_m *Client) CreatePullRequestLabel(_a0 context.Context, _a1 git.CreatePullRequestLabelArgs) (*core.WebApiTagDefinition, error) { ret := _m.Called(_a0, _a1) @@ -398,6 +754,35 @@ func (_m *Client) CreatePullRequestLabel(_a0 context.Context, _a1 git.CreatePull return r0, r1 } +// Client_CreatePullRequestLabel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePullRequestLabel' +type Client_CreatePullRequestLabel_Call struct { + *mock.Call +} + +// CreatePullRequestLabel is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreatePullRequestLabelArgs +func (_e *Client_Expecter) CreatePullRequestLabel(_a0 interface{}, _a1 interface{}) *Client_CreatePullRequestLabel_Call { + return &Client_CreatePullRequestLabel_Call{Call: _e.mock.On("CreatePullRequestLabel", _a0, _a1)} +} + +func (_c *Client_CreatePullRequestLabel_Call) Run(run func(_a0 context.Context, _a1 git.CreatePullRequestLabelArgs)) *Client_CreatePullRequestLabel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreatePullRequestLabelArgs)) + }) + return _c +} + +func (_c *Client_CreatePullRequestLabel_Call) Return(_a0 *core.WebApiTagDefinition, _a1 error) *Client_CreatePullRequestLabel_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreatePullRequestLabel_Call) RunAndReturn(run func(context.Context, git.CreatePullRequestLabelArgs) (*core.WebApiTagDefinition, error)) *Client_CreatePullRequestLabel_Call { + _c.Call.Return(run) + return _c +} + // CreatePullRequestReviewer provides a mock function with given fields: _a0, _a1 func (_m *Client) CreatePullRequestReviewer(_a0 context.Context, _a1 git.CreatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error) { ret := _m.Called(_a0, _a1) @@ -428,6 +813,35 @@ func (_m *Client) CreatePullRequestReviewer(_a0 context.Context, _a1 git.CreateP return r0, r1 } +// Client_CreatePullRequestReviewer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePullRequestReviewer' +type Client_CreatePullRequestReviewer_Call struct { + *mock.Call +} + +// CreatePullRequestReviewer is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreatePullRequestReviewerArgs +func (_e *Client_Expecter) CreatePullRequestReviewer(_a0 interface{}, _a1 interface{}) *Client_CreatePullRequestReviewer_Call { + return &Client_CreatePullRequestReviewer_Call{Call: _e.mock.On("CreatePullRequestReviewer", _a0, _a1)} +} + +func (_c *Client_CreatePullRequestReviewer_Call) Run(run func(_a0 context.Context, _a1 git.CreatePullRequestReviewerArgs)) *Client_CreatePullRequestReviewer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreatePullRequestReviewerArgs)) + }) + return _c +} + +func (_c *Client_CreatePullRequestReviewer_Call) Return(_a0 *git.IdentityRefWithVote, _a1 error) *Client_CreatePullRequestReviewer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreatePullRequestReviewer_Call) RunAndReturn(run func(context.Context, git.CreatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error)) *Client_CreatePullRequestReviewer_Call { + _c.Call.Return(run) + return _c +} + // CreatePullRequestReviewers provides a mock function with given fields: _a0, _a1 func (_m *Client) CreatePullRequestReviewers(_a0 context.Context, _a1 git.CreatePullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error) { ret := _m.Called(_a0, _a1) @@ -458,6 +872,35 @@ func (_m *Client) CreatePullRequestReviewers(_a0 context.Context, _a1 git.Create return r0, r1 } +// Client_CreatePullRequestReviewers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePullRequestReviewers' +type Client_CreatePullRequestReviewers_Call struct { + *mock.Call +} + +// CreatePullRequestReviewers is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreatePullRequestReviewersArgs +func (_e *Client_Expecter) CreatePullRequestReviewers(_a0 interface{}, _a1 interface{}) *Client_CreatePullRequestReviewers_Call { + return &Client_CreatePullRequestReviewers_Call{Call: _e.mock.On("CreatePullRequestReviewers", _a0, _a1)} +} + +func (_c *Client_CreatePullRequestReviewers_Call) Run(run func(_a0 context.Context, _a1 git.CreatePullRequestReviewersArgs)) *Client_CreatePullRequestReviewers_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreatePullRequestReviewersArgs)) + }) + return _c +} + +func (_c *Client_CreatePullRequestReviewers_Call) Return(_a0 *[]git.IdentityRefWithVote, _a1 error) *Client_CreatePullRequestReviewers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreatePullRequestReviewers_Call) RunAndReturn(run func(context.Context, git.CreatePullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error)) *Client_CreatePullRequestReviewers_Call { + _c.Call.Return(run) + return _c +} + // CreatePullRequestStatus provides a mock function with given fields: _a0, _a1 func (_m *Client) CreatePullRequestStatus(_a0 context.Context, _a1 git.CreatePullRequestStatusArgs) (*git.GitPullRequestStatus, error) { ret := _m.Called(_a0, _a1) @@ -488,6 +931,35 @@ func (_m *Client) CreatePullRequestStatus(_a0 context.Context, _a1 git.CreatePul return r0, r1 } +// Client_CreatePullRequestStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePullRequestStatus' +type Client_CreatePullRequestStatus_Call struct { + *mock.Call +} + +// CreatePullRequestStatus is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreatePullRequestStatusArgs +func (_e *Client_Expecter) CreatePullRequestStatus(_a0 interface{}, _a1 interface{}) *Client_CreatePullRequestStatus_Call { + return &Client_CreatePullRequestStatus_Call{Call: _e.mock.On("CreatePullRequestStatus", _a0, _a1)} +} + +func (_c *Client_CreatePullRequestStatus_Call) Run(run func(_a0 context.Context, _a1 git.CreatePullRequestStatusArgs)) *Client_CreatePullRequestStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreatePullRequestStatusArgs)) + }) + return _c +} + +func (_c *Client_CreatePullRequestStatus_Call) Return(_a0 *git.GitPullRequestStatus, _a1 error) *Client_CreatePullRequestStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreatePullRequestStatus_Call) RunAndReturn(run func(context.Context, git.CreatePullRequestStatusArgs) (*git.GitPullRequestStatus, error)) *Client_CreatePullRequestStatus_Call { + _c.Call.Return(run) + return _c +} + // CreatePush provides a mock function with given fields: _a0, _a1 func (_m *Client) CreatePush(_a0 context.Context, _a1 git.CreatePushArgs) (*git.GitPush, error) { ret := _m.Called(_a0, _a1) @@ -518,6 +990,35 @@ func (_m *Client) CreatePush(_a0 context.Context, _a1 git.CreatePushArgs) (*git. return r0, r1 } +// Client_CreatePush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePush' +type Client_CreatePush_Call struct { + *mock.Call +} + +// CreatePush is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreatePushArgs +func (_e *Client_Expecter) CreatePush(_a0 interface{}, _a1 interface{}) *Client_CreatePush_Call { + return &Client_CreatePush_Call{Call: _e.mock.On("CreatePush", _a0, _a1)} +} + +func (_c *Client_CreatePush_Call) Run(run func(_a0 context.Context, _a1 git.CreatePushArgs)) *Client_CreatePush_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreatePushArgs)) + }) + return _c +} + +func (_c *Client_CreatePush_Call) Return(_a0 *git.GitPush, _a1 error) *Client_CreatePush_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreatePush_Call) RunAndReturn(run func(context.Context, git.CreatePushArgs) (*git.GitPush, error)) *Client_CreatePush_Call { + _c.Call.Return(run) + return _c +} + // CreateRepository provides a mock function with given fields: _a0, _a1 func (_m *Client) CreateRepository(_a0 context.Context, _a1 git.CreateRepositoryArgs) (*git.GitRepository, error) { ret := _m.Called(_a0, _a1) @@ -548,6 +1049,35 @@ func (_m *Client) CreateRepository(_a0 context.Context, _a1 git.CreateRepository return r0, r1 } +// Client_CreateRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRepository' +type Client_CreateRepository_Call struct { + *mock.Call +} + +// CreateRepository is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreateRepositoryArgs +func (_e *Client_Expecter) CreateRepository(_a0 interface{}, _a1 interface{}) *Client_CreateRepository_Call { + return &Client_CreateRepository_Call{Call: _e.mock.On("CreateRepository", _a0, _a1)} +} + +func (_c *Client_CreateRepository_Call) Run(run func(_a0 context.Context, _a1 git.CreateRepositoryArgs)) *Client_CreateRepository_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreateRepositoryArgs)) + }) + return _c +} + +func (_c *Client_CreateRepository_Call) Return(_a0 *git.GitRepository, _a1 error) *Client_CreateRepository_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreateRepository_Call) RunAndReturn(run func(context.Context, git.CreateRepositoryArgs) (*git.GitRepository, error)) *Client_CreateRepository_Call { + _c.Call.Return(run) + return _c +} + // CreateRevert provides a mock function with given fields: _a0, _a1 func (_m *Client) CreateRevert(_a0 context.Context, _a1 git.CreateRevertArgs) (*git.GitRevert, error) { ret := _m.Called(_a0, _a1) @@ -578,6 +1108,35 @@ func (_m *Client) CreateRevert(_a0 context.Context, _a1 git.CreateRevertArgs) (* return r0, r1 } +// Client_CreateRevert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRevert' +type Client_CreateRevert_Call struct { + *mock.Call +} + +// CreateRevert is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreateRevertArgs +func (_e *Client_Expecter) CreateRevert(_a0 interface{}, _a1 interface{}) *Client_CreateRevert_Call { + return &Client_CreateRevert_Call{Call: _e.mock.On("CreateRevert", _a0, _a1)} +} + +func (_c *Client_CreateRevert_Call) Run(run func(_a0 context.Context, _a1 git.CreateRevertArgs)) *Client_CreateRevert_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreateRevertArgs)) + }) + return _c +} + +func (_c *Client_CreateRevert_Call) Return(_a0 *git.GitRevert, _a1 error) *Client_CreateRevert_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreateRevert_Call) RunAndReturn(run func(context.Context, git.CreateRevertArgs) (*git.GitRevert, error)) *Client_CreateRevert_Call { + _c.Call.Return(run) + return _c +} + // CreateThread provides a mock function with given fields: _a0, _a1 func (_m *Client) CreateThread(_a0 context.Context, _a1 git.CreateThreadArgs) (*git.GitPullRequestCommentThread, error) { ret := _m.Called(_a0, _a1) @@ -608,6 +1167,35 @@ func (_m *Client) CreateThread(_a0 context.Context, _a1 git.CreateThreadArgs) (* return r0, r1 } +// Client_CreateThread_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateThread' +type Client_CreateThread_Call struct { + *mock.Call +} + +// CreateThread is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreateThreadArgs +func (_e *Client_Expecter) CreateThread(_a0 interface{}, _a1 interface{}) *Client_CreateThread_Call { + return &Client_CreateThread_Call{Call: _e.mock.On("CreateThread", _a0, _a1)} +} + +func (_c *Client_CreateThread_Call) Run(run func(_a0 context.Context, _a1 git.CreateThreadArgs)) *Client_CreateThread_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreateThreadArgs)) + }) + return _c +} + +func (_c *Client_CreateThread_Call) Return(_a0 *git.GitPullRequestCommentThread, _a1 error) *Client_CreateThread_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreateThread_Call) RunAndReturn(run func(context.Context, git.CreateThreadArgs) (*git.GitPullRequestCommentThread, error)) *Client_CreateThread_Call { + _c.Call.Return(run) + return _c +} + // CreateUnmaterializedPullRequestReviewer provides a mock function with given fields: _a0, _a1 func (_m *Client) CreateUnmaterializedPullRequestReviewer(_a0 context.Context, _a1 git.CreateUnmaterializedPullRequestReviewerArgs) (*git.IdentityRefWithVote, error) { ret := _m.Called(_a0, _a1) @@ -638,6 +1226,35 @@ func (_m *Client) CreateUnmaterializedPullRequestReviewer(_a0 context.Context, _ return r0, r1 } +// Client_CreateUnmaterializedPullRequestReviewer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUnmaterializedPullRequestReviewer' +type Client_CreateUnmaterializedPullRequestReviewer_Call struct { + *mock.Call +} + +// CreateUnmaterializedPullRequestReviewer is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.CreateUnmaterializedPullRequestReviewerArgs +func (_e *Client_Expecter) CreateUnmaterializedPullRequestReviewer(_a0 interface{}, _a1 interface{}) *Client_CreateUnmaterializedPullRequestReviewer_Call { + return &Client_CreateUnmaterializedPullRequestReviewer_Call{Call: _e.mock.On("CreateUnmaterializedPullRequestReviewer", _a0, _a1)} +} + +func (_c *Client_CreateUnmaterializedPullRequestReviewer_Call) Run(run func(_a0 context.Context, _a1 git.CreateUnmaterializedPullRequestReviewerArgs)) *Client_CreateUnmaterializedPullRequestReviewer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.CreateUnmaterializedPullRequestReviewerArgs)) + }) + return _c +} + +func (_c *Client_CreateUnmaterializedPullRequestReviewer_Call) Return(_a0 *git.IdentityRefWithVote, _a1 error) *Client_CreateUnmaterializedPullRequestReviewer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CreateUnmaterializedPullRequestReviewer_Call) RunAndReturn(run func(context.Context, git.CreateUnmaterializedPullRequestReviewerArgs) (*git.IdentityRefWithVote, error)) *Client_CreateUnmaterializedPullRequestReviewer_Call { + _c.Call.Return(run) + return _c +} + // DeleteAttachment provides a mock function with given fields: _a0, _a1 func (_m *Client) DeleteAttachment(_a0 context.Context, _a1 git.DeleteAttachmentArgs) error { ret := _m.Called(_a0, _a1) @@ -656,6 +1273,35 @@ func (_m *Client) DeleteAttachment(_a0 context.Context, _a1 git.DeleteAttachment return r0 } +// Client_DeleteAttachment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAttachment' +type Client_DeleteAttachment_Call struct { + *mock.Call +} + +// DeleteAttachment is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.DeleteAttachmentArgs +func (_e *Client_Expecter) DeleteAttachment(_a0 interface{}, _a1 interface{}) *Client_DeleteAttachment_Call { + return &Client_DeleteAttachment_Call{Call: _e.mock.On("DeleteAttachment", _a0, _a1)} +} + +func (_c *Client_DeleteAttachment_Call) Run(run func(_a0 context.Context, _a1 git.DeleteAttachmentArgs)) *Client_DeleteAttachment_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.DeleteAttachmentArgs)) + }) + return _c +} + +func (_c *Client_DeleteAttachment_Call) Return(_a0 error) *Client_DeleteAttachment_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_DeleteAttachment_Call) RunAndReturn(run func(context.Context, git.DeleteAttachmentArgs) error) *Client_DeleteAttachment_Call { + _c.Call.Return(run) + return _c +} + // DeleteComment provides a mock function with given fields: _a0, _a1 func (_m *Client) DeleteComment(_a0 context.Context, _a1 git.DeleteCommentArgs) error { ret := _m.Called(_a0, _a1) @@ -674,6 +1320,35 @@ func (_m *Client) DeleteComment(_a0 context.Context, _a1 git.DeleteCommentArgs) return r0 } +// Client_DeleteComment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteComment' +type Client_DeleteComment_Call struct { + *mock.Call +} + +// DeleteComment is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.DeleteCommentArgs +func (_e *Client_Expecter) DeleteComment(_a0 interface{}, _a1 interface{}) *Client_DeleteComment_Call { + return &Client_DeleteComment_Call{Call: _e.mock.On("DeleteComment", _a0, _a1)} +} + +func (_c *Client_DeleteComment_Call) Run(run func(_a0 context.Context, _a1 git.DeleteCommentArgs)) *Client_DeleteComment_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.DeleteCommentArgs)) + }) + return _c +} + +func (_c *Client_DeleteComment_Call) Return(_a0 error) *Client_DeleteComment_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_DeleteComment_Call) RunAndReturn(run func(context.Context, git.DeleteCommentArgs) error) *Client_DeleteComment_Call { + _c.Call.Return(run) + return _c +} + // DeleteLike provides a mock function with given fields: _a0, _a1 func (_m *Client) DeleteLike(_a0 context.Context, _a1 git.DeleteLikeArgs) error { ret := _m.Called(_a0, _a1) @@ -692,6 +1367,35 @@ func (_m *Client) DeleteLike(_a0 context.Context, _a1 git.DeleteLikeArgs) error return r0 } +// Client_DeleteLike_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteLike' +type Client_DeleteLike_Call struct { + *mock.Call +} + +// DeleteLike is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.DeleteLikeArgs +func (_e *Client_Expecter) DeleteLike(_a0 interface{}, _a1 interface{}) *Client_DeleteLike_Call { + return &Client_DeleteLike_Call{Call: _e.mock.On("DeleteLike", _a0, _a1)} +} + +func (_c *Client_DeleteLike_Call) Run(run func(_a0 context.Context, _a1 git.DeleteLikeArgs)) *Client_DeleteLike_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.DeleteLikeArgs)) + }) + return _c +} + +func (_c *Client_DeleteLike_Call) Return(_a0 error) *Client_DeleteLike_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_DeleteLike_Call) RunAndReturn(run func(context.Context, git.DeleteLikeArgs) error) *Client_DeleteLike_Call { + _c.Call.Return(run) + return _c +} + // DeletePullRequestIterationStatus provides a mock function with given fields: _a0, _a1 func (_m *Client) DeletePullRequestIterationStatus(_a0 context.Context, _a1 git.DeletePullRequestIterationStatusArgs) error { ret := _m.Called(_a0, _a1) @@ -710,6 +1414,35 @@ func (_m *Client) DeletePullRequestIterationStatus(_a0 context.Context, _a1 git. return r0 } +// Client_DeletePullRequestIterationStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePullRequestIterationStatus' +type Client_DeletePullRequestIterationStatus_Call struct { + *mock.Call +} + +// DeletePullRequestIterationStatus is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.DeletePullRequestIterationStatusArgs +func (_e *Client_Expecter) DeletePullRequestIterationStatus(_a0 interface{}, _a1 interface{}) *Client_DeletePullRequestIterationStatus_Call { + return &Client_DeletePullRequestIterationStatus_Call{Call: _e.mock.On("DeletePullRequestIterationStatus", _a0, _a1)} +} + +func (_c *Client_DeletePullRequestIterationStatus_Call) Run(run func(_a0 context.Context, _a1 git.DeletePullRequestIterationStatusArgs)) *Client_DeletePullRequestIterationStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.DeletePullRequestIterationStatusArgs)) + }) + return _c +} + +func (_c *Client_DeletePullRequestIterationStatus_Call) Return(_a0 error) *Client_DeletePullRequestIterationStatus_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_DeletePullRequestIterationStatus_Call) RunAndReturn(run func(context.Context, git.DeletePullRequestIterationStatusArgs) error) *Client_DeletePullRequestIterationStatus_Call { + _c.Call.Return(run) + return _c +} + // DeletePullRequestLabels provides a mock function with given fields: _a0, _a1 func (_m *Client) DeletePullRequestLabels(_a0 context.Context, _a1 git.DeletePullRequestLabelsArgs) error { ret := _m.Called(_a0, _a1) @@ -728,8 +1461,37 @@ func (_m *Client) DeletePullRequestLabels(_a0 context.Context, _a1 git.DeletePul return r0 } -// DeletePullRequestReviewer provides a mock function with given fields: _a0, _a1 -func (_m *Client) DeletePullRequestReviewer(_a0 context.Context, _a1 git.DeletePullRequestReviewerArgs) error { +// Client_DeletePullRequestLabels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePullRequestLabels' +type Client_DeletePullRequestLabels_Call struct { + *mock.Call +} + +// DeletePullRequestLabels is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.DeletePullRequestLabelsArgs +func (_e *Client_Expecter) DeletePullRequestLabels(_a0 interface{}, _a1 interface{}) *Client_DeletePullRequestLabels_Call { + return &Client_DeletePullRequestLabels_Call{Call: _e.mock.On("DeletePullRequestLabels", _a0, _a1)} +} + +func (_c *Client_DeletePullRequestLabels_Call) Run(run func(_a0 context.Context, _a1 git.DeletePullRequestLabelsArgs)) *Client_DeletePullRequestLabels_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.DeletePullRequestLabelsArgs)) + }) + return _c +} + +func (_c *Client_DeletePullRequestLabels_Call) Return(_a0 error) *Client_DeletePullRequestLabels_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_DeletePullRequestLabels_Call) RunAndReturn(run func(context.Context, git.DeletePullRequestLabelsArgs) error) *Client_DeletePullRequestLabels_Call { + _c.Call.Return(run) + return _c +} + +// DeletePullRequestReviewer provides a mock function with given fields: _a0, _a1 +func (_m *Client) DeletePullRequestReviewer(_a0 context.Context, _a1 git.DeletePullRequestReviewerArgs) error { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -746,6 +1508,35 @@ func (_m *Client) DeletePullRequestReviewer(_a0 context.Context, _a1 git.DeleteP return r0 } +// Client_DeletePullRequestReviewer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePullRequestReviewer' +type Client_DeletePullRequestReviewer_Call struct { + *mock.Call +} + +// DeletePullRequestReviewer is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.DeletePullRequestReviewerArgs +func (_e *Client_Expecter) DeletePullRequestReviewer(_a0 interface{}, _a1 interface{}) *Client_DeletePullRequestReviewer_Call { + return &Client_DeletePullRequestReviewer_Call{Call: _e.mock.On("DeletePullRequestReviewer", _a0, _a1)} +} + +func (_c *Client_DeletePullRequestReviewer_Call) Run(run func(_a0 context.Context, _a1 git.DeletePullRequestReviewerArgs)) *Client_DeletePullRequestReviewer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.DeletePullRequestReviewerArgs)) + }) + return _c +} + +func (_c *Client_DeletePullRequestReviewer_Call) Return(_a0 error) *Client_DeletePullRequestReviewer_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_DeletePullRequestReviewer_Call) RunAndReturn(run func(context.Context, git.DeletePullRequestReviewerArgs) error) *Client_DeletePullRequestReviewer_Call { + _c.Call.Return(run) + return _c +} + // DeletePullRequestStatus provides a mock function with given fields: _a0, _a1 func (_m *Client) DeletePullRequestStatus(_a0 context.Context, _a1 git.DeletePullRequestStatusArgs) error { ret := _m.Called(_a0, _a1) @@ -764,6 +1555,35 @@ func (_m *Client) DeletePullRequestStatus(_a0 context.Context, _a1 git.DeletePul return r0 } +// Client_DeletePullRequestStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePullRequestStatus' +type Client_DeletePullRequestStatus_Call struct { + *mock.Call +} + +// DeletePullRequestStatus is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.DeletePullRequestStatusArgs +func (_e *Client_Expecter) DeletePullRequestStatus(_a0 interface{}, _a1 interface{}) *Client_DeletePullRequestStatus_Call { + return &Client_DeletePullRequestStatus_Call{Call: _e.mock.On("DeletePullRequestStatus", _a0, _a1)} +} + +func (_c *Client_DeletePullRequestStatus_Call) Run(run func(_a0 context.Context, _a1 git.DeletePullRequestStatusArgs)) *Client_DeletePullRequestStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.DeletePullRequestStatusArgs)) + }) + return _c +} + +func (_c *Client_DeletePullRequestStatus_Call) Return(_a0 error) *Client_DeletePullRequestStatus_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_DeletePullRequestStatus_Call) RunAndReturn(run func(context.Context, git.DeletePullRequestStatusArgs) error) *Client_DeletePullRequestStatus_Call { + _c.Call.Return(run) + return _c +} + // DeleteRefFavorite provides a mock function with given fields: _a0, _a1 func (_m *Client) DeleteRefFavorite(_a0 context.Context, _a1 git.DeleteRefFavoriteArgs) error { ret := _m.Called(_a0, _a1) @@ -782,6 +1602,35 @@ func (_m *Client) DeleteRefFavorite(_a0 context.Context, _a1 git.DeleteRefFavori return r0 } +// Client_DeleteRefFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRefFavorite' +type Client_DeleteRefFavorite_Call struct { + *mock.Call +} + +// DeleteRefFavorite is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.DeleteRefFavoriteArgs +func (_e *Client_Expecter) DeleteRefFavorite(_a0 interface{}, _a1 interface{}) *Client_DeleteRefFavorite_Call { + return &Client_DeleteRefFavorite_Call{Call: _e.mock.On("DeleteRefFavorite", _a0, _a1)} +} + +func (_c *Client_DeleteRefFavorite_Call) Run(run func(_a0 context.Context, _a1 git.DeleteRefFavoriteArgs)) *Client_DeleteRefFavorite_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.DeleteRefFavoriteArgs)) + }) + return _c +} + +func (_c *Client_DeleteRefFavorite_Call) Return(_a0 error) *Client_DeleteRefFavorite_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_DeleteRefFavorite_Call) RunAndReturn(run func(context.Context, git.DeleteRefFavoriteArgs) error) *Client_DeleteRefFavorite_Call { + _c.Call.Return(run) + return _c +} + // DeleteRepository provides a mock function with given fields: _a0, _a1 func (_m *Client) DeleteRepository(_a0 context.Context, _a1 git.DeleteRepositoryArgs) error { ret := _m.Called(_a0, _a1) @@ -800,6 +1649,35 @@ func (_m *Client) DeleteRepository(_a0 context.Context, _a1 git.DeleteRepository return r0 } +// Client_DeleteRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRepository' +type Client_DeleteRepository_Call struct { + *mock.Call +} + +// DeleteRepository is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.DeleteRepositoryArgs +func (_e *Client_Expecter) DeleteRepository(_a0 interface{}, _a1 interface{}) *Client_DeleteRepository_Call { + return &Client_DeleteRepository_Call{Call: _e.mock.On("DeleteRepository", _a0, _a1)} +} + +func (_c *Client_DeleteRepository_Call) Run(run func(_a0 context.Context, _a1 git.DeleteRepositoryArgs)) *Client_DeleteRepository_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.DeleteRepositoryArgs)) + }) + return _c +} + +func (_c *Client_DeleteRepository_Call) Return(_a0 error) *Client_DeleteRepository_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_DeleteRepository_Call) RunAndReturn(run func(context.Context, git.DeleteRepositoryArgs) error) *Client_DeleteRepository_Call { + _c.Call.Return(run) + return _c +} + // DeleteRepositoryFromRecycleBin provides a mock function with given fields: _a0, _a1 func (_m *Client) DeleteRepositoryFromRecycleBin(_a0 context.Context, _a1 git.DeleteRepositoryFromRecycleBinArgs) error { ret := _m.Called(_a0, _a1) @@ -818,6 +1696,35 @@ func (_m *Client) DeleteRepositoryFromRecycleBin(_a0 context.Context, _a1 git.De return r0 } +// Client_DeleteRepositoryFromRecycleBin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRepositoryFromRecycleBin' +type Client_DeleteRepositoryFromRecycleBin_Call struct { + *mock.Call +} + +// DeleteRepositoryFromRecycleBin is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.DeleteRepositoryFromRecycleBinArgs +func (_e *Client_Expecter) DeleteRepositoryFromRecycleBin(_a0 interface{}, _a1 interface{}) *Client_DeleteRepositoryFromRecycleBin_Call { + return &Client_DeleteRepositoryFromRecycleBin_Call{Call: _e.mock.On("DeleteRepositoryFromRecycleBin", _a0, _a1)} +} + +func (_c *Client_DeleteRepositoryFromRecycleBin_Call) Run(run func(_a0 context.Context, _a1 git.DeleteRepositoryFromRecycleBinArgs)) *Client_DeleteRepositoryFromRecycleBin_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.DeleteRepositoryFromRecycleBinArgs)) + }) + return _c +} + +func (_c *Client_DeleteRepositoryFromRecycleBin_Call) Return(_a0 error) *Client_DeleteRepositoryFromRecycleBin_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_DeleteRepositoryFromRecycleBin_Call) RunAndReturn(run func(context.Context, git.DeleteRepositoryFromRecycleBinArgs) error) *Client_DeleteRepositoryFromRecycleBin_Call { + _c.Call.Return(run) + return _c +} + // GetAnnotatedTag provides a mock function with given fields: _a0, _a1 func (_m *Client) GetAnnotatedTag(_a0 context.Context, _a1 git.GetAnnotatedTagArgs) (*git.GitAnnotatedTag, error) { ret := _m.Called(_a0, _a1) @@ -848,6 +1755,35 @@ func (_m *Client) GetAnnotatedTag(_a0 context.Context, _a1 git.GetAnnotatedTagAr return r0, r1 } +// Client_GetAnnotatedTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAnnotatedTag' +type Client_GetAnnotatedTag_Call struct { + *mock.Call +} + +// GetAnnotatedTag is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetAnnotatedTagArgs +func (_e *Client_Expecter) GetAnnotatedTag(_a0 interface{}, _a1 interface{}) *Client_GetAnnotatedTag_Call { + return &Client_GetAnnotatedTag_Call{Call: _e.mock.On("GetAnnotatedTag", _a0, _a1)} +} + +func (_c *Client_GetAnnotatedTag_Call) Run(run func(_a0 context.Context, _a1 git.GetAnnotatedTagArgs)) *Client_GetAnnotatedTag_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetAnnotatedTagArgs)) + }) + return _c +} + +func (_c *Client_GetAnnotatedTag_Call) Return(_a0 *git.GitAnnotatedTag, _a1 error) *Client_GetAnnotatedTag_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetAnnotatedTag_Call) RunAndReturn(run func(context.Context, git.GetAnnotatedTagArgs) (*git.GitAnnotatedTag, error)) *Client_GetAnnotatedTag_Call { + _c.Call.Return(run) + return _c +} + // GetAttachmentContent provides a mock function with given fields: _a0, _a1 func (_m *Client) GetAttachmentContent(_a0 context.Context, _a1 git.GetAttachmentContentArgs) (io.ReadCloser, error) { ret := _m.Called(_a0, _a1) @@ -878,6 +1814,35 @@ func (_m *Client) GetAttachmentContent(_a0 context.Context, _a1 git.GetAttachmen return r0, r1 } +// Client_GetAttachmentContent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAttachmentContent' +type Client_GetAttachmentContent_Call struct { + *mock.Call +} + +// GetAttachmentContent is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetAttachmentContentArgs +func (_e *Client_Expecter) GetAttachmentContent(_a0 interface{}, _a1 interface{}) *Client_GetAttachmentContent_Call { + return &Client_GetAttachmentContent_Call{Call: _e.mock.On("GetAttachmentContent", _a0, _a1)} +} + +func (_c *Client_GetAttachmentContent_Call) Run(run func(_a0 context.Context, _a1 git.GetAttachmentContentArgs)) *Client_GetAttachmentContent_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetAttachmentContentArgs)) + }) + return _c +} + +func (_c *Client_GetAttachmentContent_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetAttachmentContent_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetAttachmentContent_Call) RunAndReturn(run func(context.Context, git.GetAttachmentContentArgs) (io.ReadCloser, error)) *Client_GetAttachmentContent_Call { + _c.Call.Return(run) + return _c +} + // GetAttachmentZip provides a mock function with given fields: _a0, _a1 func (_m *Client) GetAttachmentZip(_a0 context.Context, _a1 git.GetAttachmentZipArgs) (io.ReadCloser, error) { ret := _m.Called(_a0, _a1) @@ -908,6 +1873,35 @@ func (_m *Client) GetAttachmentZip(_a0 context.Context, _a1 git.GetAttachmentZip return r0, r1 } +// Client_GetAttachmentZip_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAttachmentZip' +type Client_GetAttachmentZip_Call struct { + *mock.Call +} + +// GetAttachmentZip is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetAttachmentZipArgs +func (_e *Client_Expecter) GetAttachmentZip(_a0 interface{}, _a1 interface{}) *Client_GetAttachmentZip_Call { + return &Client_GetAttachmentZip_Call{Call: _e.mock.On("GetAttachmentZip", _a0, _a1)} +} + +func (_c *Client_GetAttachmentZip_Call) Run(run func(_a0 context.Context, _a1 git.GetAttachmentZipArgs)) *Client_GetAttachmentZip_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetAttachmentZipArgs)) + }) + return _c +} + +func (_c *Client_GetAttachmentZip_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetAttachmentZip_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetAttachmentZip_Call) RunAndReturn(run func(context.Context, git.GetAttachmentZipArgs) (io.ReadCloser, error)) *Client_GetAttachmentZip_Call { + _c.Call.Return(run) + return _c +} + // GetAttachments provides a mock function with given fields: _a0, _a1 func (_m *Client) GetAttachments(_a0 context.Context, _a1 git.GetAttachmentsArgs) (*[]git.Attachment, error) { ret := _m.Called(_a0, _a1) @@ -938,6 +1932,35 @@ func (_m *Client) GetAttachments(_a0 context.Context, _a1 git.GetAttachmentsArgs return r0, r1 } +// Client_GetAttachments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAttachments' +type Client_GetAttachments_Call struct { + *mock.Call +} + +// GetAttachments is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetAttachmentsArgs +func (_e *Client_Expecter) GetAttachments(_a0 interface{}, _a1 interface{}) *Client_GetAttachments_Call { + return &Client_GetAttachments_Call{Call: _e.mock.On("GetAttachments", _a0, _a1)} +} + +func (_c *Client_GetAttachments_Call) Run(run func(_a0 context.Context, _a1 git.GetAttachmentsArgs)) *Client_GetAttachments_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetAttachmentsArgs)) + }) + return _c +} + +func (_c *Client_GetAttachments_Call) Return(_a0 *[]git.Attachment, _a1 error) *Client_GetAttachments_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetAttachments_Call) RunAndReturn(run func(context.Context, git.GetAttachmentsArgs) (*[]git.Attachment, error)) *Client_GetAttachments_Call { + _c.Call.Return(run) + return _c +} + // GetBlob provides a mock function with given fields: _a0, _a1 func (_m *Client) GetBlob(_a0 context.Context, _a1 git.GetBlobArgs) (*git.GitBlobRef, error) { ret := _m.Called(_a0, _a1) @@ -968,6 +1991,35 @@ func (_m *Client) GetBlob(_a0 context.Context, _a1 git.GetBlobArgs) (*git.GitBlo return r0, r1 } +// Client_GetBlob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlob' +type Client_GetBlob_Call struct { + *mock.Call +} + +// GetBlob is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetBlobArgs +func (_e *Client_Expecter) GetBlob(_a0 interface{}, _a1 interface{}) *Client_GetBlob_Call { + return &Client_GetBlob_Call{Call: _e.mock.On("GetBlob", _a0, _a1)} +} + +func (_c *Client_GetBlob_Call) Run(run func(_a0 context.Context, _a1 git.GetBlobArgs)) *Client_GetBlob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetBlobArgs)) + }) + return _c +} + +func (_c *Client_GetBlob_Call) Return(_a0 *git.GitBlobRef, _a1 error) *Client_GetBlob_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetBlob_Call) RunAndReturn(run func(context.Context, git.GetBlobArgs) (*git.GitBlobRef, error)) *Client_GetBlob_Call { + _c.Call.Return(run) + return _c +} + // GetBlobContent provides a mock function with given fields: _a0, _a1 func (_m *Client) GetBlobContent(_a0 context.Context, _a1 git.GetBlobContentArgs) (io.ReadCloser, error) { ret := _m.Called(_a0, _a1) @@ -998,6 +2050,35 @@ func (_m *Client) GetBlobContent(_a0 context.Context, _a1 git.GetBlobContentArgs return r0, r1 } +// Client_GetBlobContent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlobContent' +type Client_GetBlobContent_Call struct { + *mock.Call +} + +// GetBlobContent is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetBlobContentArgs +func (_e *Client_Expecter) GetBlobContent(_a0 interface{}, _a1 interface{}) *Client_GetBlobContent_Call { + return &Client_GetBlobContent_Call{Call: _e.mock.On("GetBlobContent", _a0, _a1)} +} + +func (_c *Client_GetBlobContent_Call) Run(run func(_a0 context.Context, _a1 git.GetBlobContentArgs)) *Client_GetBlobContent_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetBlobContentArgs)) + }) + return _c +} + +func (_c *Client_GetBlobContent_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetBlobContent_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetBlobContent_Call) RunAndReturn(run func(context.Context, git.GetBlobContentArgs) (io.ReadCloser, error)) *Client_GetBlobContent_Call { + _c.Call.Return(run) + return _c +} + // GetBlobZip provides a mock function with given fields: _a0, _a1 func (_m *Client) GetBlobZip(_a0 context.Context, _a1 git.GetBlobZipArgs) (io.ReadCloser, error) { ret := _m.Called(_a0, _a1) @@ -1028,6 +2109,35 @@ func (_m *Client) GetBlobZip(_a0 context.Context, _a1 git.GetBlobZipArgs) (io.Re return r0, r1 } +// Client_GetBlobZip_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlobZip' +type Client_GetBlobZip_Call struct { + *mock.Call +} + +// GetBlobZip is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetBlobZipArgs +func (_e *Client_Expecter) GetBlobZip(_a0 interface{}, _a1 interface{}) *Client_GetBlobZip_Call { + return &Client_GetBlobZip_Call{Call: _e.mock.On("GetBlobZip", _a0, _a1)} +} + +func (_c *Client_GetBlobZip_Call) Run(run func(_a0 context.Context, _a1 git.GetBlobZipArgs)) *Client_GetBlobZip_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetBlobZipArgs)) + }) + return _c +} + +func (_c *Client_GetBlobZip_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetBlobZip_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetBlobZip_Call) RunAndReturn(run func(context.Context, git.GetBlobZipArgs) (io.ReadCloser, error)) *Client_GetBlobZip_Call { + _c.Call.Return(run) + return _c +} + // GetBlobsZip provides a mock function with given fields: _a0, _a1 func (_m *Client) GetBlobsZip(_a0 context.Context, _a1 git.GetBlobsZipArgs) (io.ReadCloser, error) { ret := _m.Called(_a0, _a1) @@ -1058,6 +2168,35 @@ func (_m *Client) GetBlobsZip(_a0 context.Context, _a1 git.GetBlobsZipArgs) (io. return r0, r1 } +// Client_GetBlobsZip_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlobsZip' +type Client_GetBlobsZip_Call struct { + *mock.Call +} + +// GetBlobsZip is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetBlobsZipArgs +func (_e *Client_Expecter) GetBlobsZip(_a0 interface{}, _a1 interface{}) *Client_GetBlobsZip_Call { + return &Client_GetBlobsZip_Call{Call: _e.mock.On("GetBlobsZip", _a0, _a1)} +} + +func (_c *Client_GetBlobsZip_Call) Run(run func(_a0 context.Context, _a1 git.GetBlobsZipArgs)) *Client_GetBlobsZip_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetBlobsZipArgs)) + }) + return _c +} + +func (_c *Client_GetBlobsZip_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetBlobsZip_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetBlobsZip_Call) RunAndReturn(run func(context.Context, git.GetBlobsZipArgs) (io.ReadCloser, error)) *Client_GetBlobsZip_Call { + _c.Call.Return(run) + return _c +} + // GetBranch provides a mock function with given fields: _a0, _a1 func (_m *Client) GetBranch(_a0 context.Context, _a1 git.GetBranchArgs) (*git.GitBranchStats, error) { ret := _m.Called(_a0, _a1) @@ -1088,6 +2227,35 @@ func (_m *Client) GetBranch(_a0 context.Context, _a1 git.GetBranchArgs) (*git.Gi return r0, r1 } +// Client_GetBranch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBranch' +type Client_GetBranch_Call struct { + *mock.Call +} + +// GetBranch is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetBranchArgs +func (_e *Client_Expecter) GetBranch(_a0 interface{}, _a1 interface{}) *Client_GetBranch_Call { + return &Client_GetBranch_Call{Call: _e.mock.On("GetBranch", _a0, _a1)} +} + +func (_c *Client_GetBranch_Call) Run(run func(_a0 context.Context, _a1 git.GetBranchArgs)) *Client_GetBranch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetBranchArgs)) + }) + return _c +} + +func (_c *Client_GetBranch_Call) Return(_a0 *git.GitBranchStats, _a1 error) *Client_GetBranch_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetBranch_Call) RunAndReturn(run func(context.Context, git.GetBranchArgs) (*git.GitBranchStats, error)) *Client_GetBranch_Call { + _c.Call.Return(run) + return _c +} + // GetBranches provides a mock function with given fields: _a0, _a1 func (_m *Client) GetBranches(_a0 context.Context, _a1 git.GetBranchesArgs) (*[]git.GitBranchStats, error) { ret := _m.Called(_a0, _a1) @@ -1118,6 +2286,35 @@ func (_m *Client) GetBranches(_a0 context.Context, _a1 git.GetBranchesArgs) (*[] return r0, r1 } +// Client_GetBranches_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBranches' +type Client_GetBranches_Call struct { + *mock.Call +} + +// GetBranches is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetBranchesArgs +func (_e *Client_Expecter) GetBranches(_a0 interface{}, _a1 interface{}) *Client_GetBranches_Call { + return &Client_GetBranches_Call{Call: _e.mock.On("GetBranches", _a0, _a1)} +} + +func (_c *Client_GetBranches_Call) Run(run func(_a0 context.Context, _a1 git.GetBranchesArgs)) *Client_GetBranches_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetBranchesArgs)) + }) + return _c +} + +func (_c *Client_GetBranches_Call) Return(_a0 *[]git.GitBranchStats, _a1 error) *Client_GetBranches_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetBranches_Call) RunAndReturn(run func(context.Context, git.GetBranchesArgs) (*[]git.GitBranchStats, error)) *Client_GetBranches_Call { + _c.Call.Return(run) + return _c +} + // GetChanges provides a mock function with given fields: _a0, _a1 func (_m *Client) GetChanges(_a0 context.Context, _a1 git.GetChangesArgs) (*git.GitCommitChanges, error) { ret := _m.Called(_a0, _a1) @@ -1148,6 +2345,35 @@ func (_m *Client) GetChanges(_a0 context.Context, _a1 git.GetChangesArgs) (*git. return r0, r1 } +// Client_GetChanges_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChanges' +type Client_GetChanges_Call struct { + *mock.Call +} + +// GetChanges is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetChangesArgs +func (_e *Client_Expecter) GetChanges(_a0 interface{}, _a1 interface{}) *Client_GetChanges_Call { + return &Client_GetChanges_Call{Call: _e.mock.On("GetChanges", _a0, _a1)} +} + +func (_c *Client_GetChanges_Call) Run(run func(_a0 context.Context, _a1 git.GetChangesArgs)) *Client_GetChanges_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetChangesArgs)) + }) + return _c +} + +func (_c *Client_GetChanges_Call) Return(_a0 *git.GitCommitChanges, _a1 error) *Client_GetChanges_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetChanges_Call) RunAndReturn(run func(context.Context, git.GetChangesArgs) (*git.GitCommitChanges, error)) *Client_GetChanges_Call { + _c.Call.Return(run) + return _c +} + // GetCherryPick provides a mock function with given fields: _a0, _a1 func (_m *Client) GetCherryPick(_a0 context.Context, _a1 git.GetCherryPickArgs) (*git.GitCherryPick, error) { ret := _m.Called(_a0, _a1) @@ -1178,6 +2404,35 @@ func (_m *Client) GetCherryPick(_a0 context.Context, _a1 git.GetCherryPickArgs) return r0, r1 } +// Client_GetCherryPick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCherryPick' +type Client_GetCherryPick_Call struct { + *mock.Call +} + +// GetCherryPick is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetCherryPickArgs +func (_e *Client_Expecter) GetCherryPick(_a0 interface{}, _a1 interface{}) *Client_GetCherryPick_Call { + return &Client_GetCherryPick_Call{Call: _e.mock.On("GetCherryPick", _a0, _a1)} +} + +func (_c *Client_GetCherryPick_Call) Run(run func(_a0 context.Context, _a1 git.GetCherryPickArgs)) *Client_GetCherryPick_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetCherryPickArgs)) + }) + return _c +} + +func (_c *Client_GetCherryPick_Call) Return(_a0 *git.GitCherryPick, _a1 error) *Client_GetCherryPick_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetCherryPick_Call) RunAndReturn(run func(context.Context, git.GetCherryPickArgs) (*git.GitCherryPick, error)) *Client_GetCherryPick_Call { + _c.Call.Return(run) + return _c +} + // GetCherryPickForRefName provides a mock function with given fields: _a0, _a1 func (_m *Client) GetCherryPickForRefName(_a0 context.Context, _a1 git.GetCherryPickForRefNameArgs) (*git.GitCherryPick, error) { ret := _m.Called(_a0, _a1) @@ -1208,6 +2463,35 @@ func (_m *Client) GetCherryPickForRefName(_a0 context.Context, _a1 git.GetCherry return r0, r1 } +// Client_GetCherryPickForRefName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCherryPickForRefName' +type Client_GetCherryPickForRefName_Call struct { + *mock.Call +} + +// GetCherryPickForRefName is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetCherryPickForRefNameArgs +func (_e *Client_Expecter) GetCherryPickForRefName(_a0 interface{}, _a1 interface{}) *Client_GetCherryPickForRefName_Call { + return &Client_GetCherryPickForRefName_Call{Call: _e.mock.On("GetCherryPickForRefName", _a0, _a1)} +} + +func (_c *Client_GetCherryPickForRefName_Call) Run(run func(_a0 context.Context, _a1 git.GetCherryPickForRefNameArgs)) *Client_GetCherryPickForRefName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetCherryPickForRefNameArgs)) + }) + return _c +} + +func (_c *Client_GetCherryPickForRefName_Call) Return(_a0 *git.GitCherryPick, _a1 error) *Client_GetCherryPickForRefName_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetCherryPickForRefName_Call) RunAndReturn(run func(context.Context, git.GetCherryPickForRefNameArgs) (*git.GitCherryPick, error)) *Client_GetCherryPickForRefName_Call { + _c.Call.Return(run) + return _c +} + // GetComment provides a mock function with given fields: _a0, _a1 func (_m *Client) GetComment(_a0 context.Context, _a1 git.GetCommentArgs) (*git.Comment, error) { ret := _m.Called(_a0, _a1) @@ -1238,6 +2522,35 @@ func (_m *Client) GetComment(_a0 context.Context, _a1 git.GetCommentArgs) (*git. return r0, r1 } +// Client_GetComment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetComment' +type Client_GetComment_Call struct { + *mock.Call +} + +// GetComment is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetCommentArgs +func (_e *Client_Expecter) GetComment(_a0 interface{}, _a1 interface{}) *Client_GetComment_Call { + return &Client_GetComment_Call{Call: _e.mock.On("GetComment", _a0, _a1)} +} + +func (_c *Client_GetComment_Call) Run(run func(_a0 context.Context, _a1 git.GetCommentArgs)) *Client_GetComment_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetCommentArgs)) + }) + return _c +} + +func (_c *Client_GetComment_Call) Return(_a0 *git.Comment, _a1 error) *Client_GetComment_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetComment_Call) RunAndReturn(run func(context.Context, git.GetCommentArgs) (*git.Comment, error)) *Client_GetComment_Call { + _c.Call.Return(run) + return _c +} + // GetComments provides a mock function with given fields: _a0, _a1 func (_m *Client) GetComments(_a0 context.Context, _a1 git.GetCommentsArgs) (*[]git.Comment, error) { ret := _m.Called(_a0, _a1) @@ -1268,6 +2581,35 @@ func (_m *Client) GetComments(_a0 context.Context, _a1 git.GetCommentsArgs) (*[] return r0, r1 } +// Client_GetComments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetComments' +type Client_GetComments_Call struct { + *mock.Call +} + +// GetComments is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetCommentsArgs +func (_e *Client_Expecter) GetComments(_a0 interface{}, _a1 interface{}) *Client_GetComments_Call { + return &Client_GetComments_Call{Call: _e.mock.On("GetComments", _a0, _a1)} +} + +func (_c *Client_GetComments_Call) Run(run func(_a0 context.Context, _a1 git.GetCommentsArgs)) *Client_GetComments_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetCommentsArgs)) + }) + return _c +} + +func (_c *Client_GetComments_Call) Return(_a0 *[]git.Comment, _a1 error) *Client_GetComments_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetComments_Call) RunAndReturn(run func(context.Context, git.GetCommentsArgs) (*[]git.Comment, error)) *Client_GetComments_Call { + _c.Call.Return(run) + return _c +} + // GetCommit provides a mock function with given fields: _a0, _a1 func (_m *Client) GetCommit(_a0 context.Context, _a1 git.GetCommitArgs) (*git.GitCommit, error) { ret := _m.Called(_a0, _a1) @@ -1298,6 +2640,35 @@ func (_m *Client) GetCommit(_a0 context.Context, _a1 git.GetCommitArgs) (*git.Gi return r0, r1 } +// Client_GetCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCommit' +type Client_GetCommit_Call struct { + *mock.Call +} + +// GetCommit is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetCommitArgs +func (_e *Client_Expecter) GetCommit(_a0 interface{}, _a1 interface{}) *Client_GetCommit_Call { + return &Client_GetCommit_Call{Call: _e.mock.On("GetCommit", _a0, _a1)} +} + +func (_c *Client_GetCommit_Call) Run(run func(_a0 context.Context, _a1 git.GetCommitArgs)) *Client_GetCommit_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetCommitArgs)) + }) + return _c +} + +func (_c *Client_GetCommit_Call) Return(_a0 *git.GitCommit, _a1 error) *Client_GetCommit_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetCommit_Call) RunAndReturn(run func(context.Context, git.GetCommitArgs) (*git.GitCommit, error)) *Client_GetCommit_Call { + _c.Call.Return(run) + return _c +} + // GetCommitDiffs provides a mock function with given fields: _a0, _a1 func (_m *Client) GetCommitDiffs(_a0 context.Context, _a1 git.GetCommitDiffsArgs) (*git.GitCommitDiffs, error) { ret := _m.Called(_a0, _a1) @@ -1328,6 +2699,35 @@ func (_m *Client) GetCommitDiffs(_a0 context.Context, _a1 git.GetCommitDiffsArgs return r0, r1 } +// Client_GetCommitDiffs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCommitDiffs' +type Client_GetCommitDiffs_Call struct { + *mock.Call +} + +// GetCommitDiffs is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetCommitDiffsArgs +func (_e *Client_Expecter) GetCommitDiffs(_a0 interface{}, _a1 interface{}) *Client_GetCommitDiffs_Call { + return &Client_GetCommitDiffs_Call{Call: _e.mock.On("GetCommitDiffs", _a0, _a1)} +} + +func (_c *Client_GetCommitDiffs_Call) Run(run func(_a0 context.Context, _a1 git.GetCommitDiffsArgs)) *Client_GetCommitDiffs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetCommitDiffsArgs)) + }) + return _c +} + +func (_c *Client_GetCommitDiffs_Call) Return(_a0 *git.GitCommitDiffs, _a1 error) *Client_GetCommitDiffs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetCommitDiffs_Call) RunAndReturn(run func(context.Context, git.GetCommitDiffsArgs) (*git.GitCommitDiffs, error)) *Client_GetCommitDiffs_Call { + _c.Call.Return(run) + return _c +} + // GetCommits provides a mock function with given fields: _a0, _a1 func (_m *Client) GetCommits(_a0 context.Context, _a1 git.GetCommitsArgs) (*[]git.GitCommitRef, error) { ret := _m.Called(_a0, _a1) @@ -1358,6 +2758,35 @@ func (_m *Client) GetCommits(_a0 context.Context, _a1 git.GetCommitsArgs) (*[]gi return r0, r1 } +// Client_GetCommits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCommits' +type Client_GetCommits_Call struct { + *mock.Call +} + +// GetCommits is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetCommitsArgs +func (_e *Client_Expecter) GetCommits(_a0 interface{}, _a1 interface{}) *Client_GetCommits_Call { + return &Client_GetCommits_Call{Call: _e.mock.On("GetCommits", _a0, _a1)} +} + +func (_c *Client_GetCommits_Call) Run(run func(_a0 context.Context, _a1 git.GetCommitsArgs)) *Client_GetCommits_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetCommitsArgs)) + }) + return _c +} + +func (_c *Client_GetCommits_Call) Return(_a0 *[]git.GitCommitRef, _a1 error) *Client_GetCommits_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetCommits_Call) RunAndReturn(run func(context.Context, git.GetCommitsArgs) (*[]git.GitCommitRef, error)) *Client_GetCommits_Call { + _c.Call.Return(run) + return _c +} + // GetCommitsBatch provides a mock function with given fields: _a0, _a1 func (_m *Client) GetCommitsBatch(_a0 context.Context, _a1 git.GetCommitsBatchArgs) (*[]git.GitCommitRef, error) { ret := _m.Called(_a0, _a1) @@ -1388,6 +2817,35 @@ func (_m *Client) GetCommitsBatch(_a0 context.Context, _a1 git.GetCommitsBatchAr return r0, r1 } +// Client_GetCommitsBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCommitsBatch' +type Client_GetCommitsBatch_Call struct { + *mock.Call +} + +// GetCommitsBatch is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetCommitsBatchArgs +func (_e *Client_Expecter) GetCommitsBatch(_a0 interface{}, _a1 interface{}) *Client_GetCommitsBatch_Call { + return &Client_GetCommitsBatch_Call{Call: _e.mock.On("GetCommitsBatch", _a0, _a1)} +} + +func (_c *Client_GetCommitsBatch_Call) Run(run func(_a0 context.Context, _a1 git.GetCommitsBatchArgs)) *Client_GetCommitsBatch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetCommitsBatchArgs)) + }) + return _c +} + +func (_c *Client_GetCommitsBatch_Call) Return(_a0 *[]git.GitCommitRef, _a1 error) *Client_GetCommitsBatch_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetCommitsBatch_Call) RunAndReturn(run func(context.Context, git.GetCommitsBatchArgs) (*[]git.GitCommitRef, error)) *Client_GetCommitsBatch_Call { + _c.Call.Return(run) + return _c +} + // GetDeletedRepositories provides a mock function with given fields: _a0, _a1 func (_m *Client) GetDeletedRepositories(_a0 context.Context, _a1 git.GetDeletedRepositoriesArgs) (*[]git.GitDeletedRepository, error) { ret := _m.Called(_a0, _a1) @@ -1418,6 +2876,35 @@ func (_m *Client) GetDeletedRepositories(_a0 context.Context, _a1 git.GetDeleted return r0, r1 } +// Client_GetDeletedRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDeletedRepositories' +type Client_GetDeletedRepositories_Call struct { + *mock.Call +} + +// GetDeletedRepositories is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetDeletedRepositoriesArgs +func (_e *Client_Expecter) GetDeletedRepositories(_a0 interface{}, _a1 interface{}) *Client_GetDeletedRepositories_Call { + return &Client_GetDeletedRepositories_Call{Call: _e.mock.On("GetDeletedRepositories", _a0, _a1)} +} + +func (_c *Client_GetDeletedRepositories_Call) Run(run func(_a0 context.Context, _a1 git.GetDeletedRepositoriesArgs)) *Client_GetDeletedRepositories_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetDeletedRepositoriesArgs)) + }) + return _c +} + +func (_c *Client_GetDeletedRepositories_Call) Return(_a0 *[]git.GitDeletedRepository, _a1 error) *Client_GetDeletedRepositories_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetDeletedRepositories_Call) RunAndReturn(run func(context.Context, git.GetDeletedRepositoriesArgs) (*[]git.GitDeletedRepository, error)) *Client_GetDeletedRepositories_Call { + _c.Call.Return(run) + return _c +} + // GetForkSyncRequest provides a mock function with given fields: _a0, _a1 func (_m *Client) GetForkSyncRequest(_a0 context.Context, _a1 git.GetForkSyncRequestArgs) (*git.GitForkSyncRequest, error) { ret := _m.Called(_a0, _a1) @@ -1448,6 +2935,35 @@ func (_m *Client) GetForkSyncRequest(_a0 context.Context, _a1 git.GetForkSyncReq return r0, r1 } +// Client_GetForkSyncRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetForkSyncRequest' +type Client_GetForkSyncRequest_Call struct { + *mock.Call +} + +// GetForkSyncRequest is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetForkSyncRequestArgs +func (_e *Client_Expecter) GetForkSyncRequest(_a0 interface{}, _a1 interface{}) *Client_GetForkSyncRequest_Call { + return &Client_GetForkSyncRequest_Call{Call: _e.mock.On("GetForkSyncRequest", _a0, _a1)} +} + +func (_c *Client_GetForkSyncRequest_Call) Run(run func(_a0 context.Context, _a1 git.GetForkSyncRequestArgs)) *Client_GetForkSyncRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetForkSyncRequestArgs)) + }) + return _c +} + +func (_c *Client_GetForkSyncRequest_Call) Return(_a0 *git.GitForkSyncRequest, _a1 error) *Client_GetForkSyncRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetForkSyncRequest_Call) RunAndReturn(run func(context.Context, git.GetForkSyncRequestArgs) (*git.GitForkSyncRequest, error)) *Client_GetForkSyncRequest_Call { + _c.Call.Return(run) + return _c +} + // GetForkSyncRequests provides a mock function with given fields: _a0, _a1 func (_m *Client) GetForkSyncRequests(_a0 context.Context, _a1 git.GetForkSyncRequestsArgs) (*[]git.GitForkSyncRequest, error) { ret := _m.Called(_a0, _a1) @@ -1478,6 +2994,35 @@ func (_m *Client) GetForkSyncRequests(_a0 context.Context, _a1 git.GetForkSyncRe return r0, r1 } +// Client_GetForkSyncRequests_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetForkSyncRequests' +type Client_GetForkSyncRequests_Call struct { + *mock.Call +} + +// GetForkSyncRequests is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetForkSyncRequestsArgs +func (_e *Client_Expecter) GetForkSyncRequests(_a0 interface{}, _a1 interface{}) *Client_GetForkSyncRequests_Call { + return &Client_GetForkSyncRequests_Call{Call: _e.mock.On("GetForkSyncRequests", _a0, _a1)} +} + +func (_c *Client_GetForkSyncRequests_Call) Run(run func(_a0 context.Context, _a1 git.GetForkSyncRequestsArgs)) *Client_GetForkSyncRequests_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetForkSyncRequestsArgs)) + }) + return _c +} + +func (_c *Client_GetForkSyncRequests_Call) Return(_a0 *[]git.GitForkSyncRequest, _a1 error) *Client_GetForkSyncRequests_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetForkSyncRequests_Call) RunAndReturn(run func(context.Context, git.GetForkSyncRequestsArgs) (*[]git.GitForkSyncRequest, error)) *Client_GetForkSyncRequests_Call { + _c.Call.Return(run) + return _c +} + // GetForks provides a mock function with given fields: _a0, _a1 func (_m *Client) GetForks(_a0 context.Context, _a1 git.GetForksArgs) (*[]git.GitRepositoryRef, error) { ret := _m.Called(_a0, _a1) @@ -1508,6 +3053,35 @@ func (_m *Client) GetForks(_a0 context.Context, _a1 git.GetForksArgs) (*[]git.Gi return r0, r1 } +// Client_GetForks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetForks' +type Client_GetForks_Call struct { + *mock.Call +} + +// GetForks is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetForksArgs +func (_e *Client_Expecter) GetForks(_a0 interface{}, _a1 interface{}) *Client_GetForks_Call { + return &Client_GetForks_Call{Call: _e.mock.On("GetForks", _a0, _a1)} +} + +func (_c *Client_GetForks_Call) Run(run func(_a0 context.Context, _a1 git.GetForksArgs)) *Client_GetForks_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetForksArgs)) + }) + return _c +} + +func (_c *Client_GetForks_Call) Return(_a0 *[]git.GitRepositoryRef, _a1 error) *Client_GetForks_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetForks_Call) RunAndReturn(run func(context.Context, git.GetForksArgs) (*[]git.GitRepositoryRef, error)) *Client_GetForks_Call { + _c.Call.Return(run) + return _c +} + // GetImportRequest provides a mock function with given fields: _a0, _a1 func (_m *Client) GetImportRequest(_a0 context.Context, _a1 git.GetImportRequestArgs) (*git.GitImportRequest, error) { ret := _m.Called(_a0, _a1) @@ -1538,6 +3112,35 @@ func (_m *Client) GetImportRequest(_a0 context.Context, _a1 git.GetImportRequest return r0, r1 } +// Client_GetImportRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetImportRequest' +type Client_GetImportRequest_Call struct { + *mock.Call +} + +// GetImportRequest is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetImportRequestArgs +func (_e *Client_Expecter) GetImportRequest(_a0 interface{}, _a1 interface{}) *Client_GetImportRequest_Call { + return &Client_GetImportRequest_Call{Call: _e.mock.On("GetImportRequest", _a0, _a1)} +} + +func (_c *Client_GetImportRequest_Call) Run(run func(_a0 context.Context, _a1 git.GetImportRequestArgs)) *Client_GetImportRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetImportRequestArgs)) + }) + return _c +} + +func (_c *Client_GetImportRequest_Call) Return(_a0 *git.GitImportRequest, _a1 error) *Client_GetImportRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetImportRequest_Call) RunAndReturn(run func(context.Context, git.GetImportRequestArgs) (*git.GitImportRequest, error)) *Client_GetImportRequest_Call { + _c.Call.Return(run) + return _c +} + // GetItem provides a mock function with given fields: _a0, _a1 func (_m *Client) GetItem(_a0 context.Context, _a1 git.GetItemArgs) (*git.GitItem, error) { ret := _m.Called(_a0, _a1) @@ -1568,6 +3171,35 @@ func (_m *Client) GetItem(_a0 context.Context, _a1 git.GetItemArgs) (*git.GitIte return r0, r1 } +// Client_GetItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetItem' +type Client_GetItem_Call struct { + *mock.Call +} + +// GetItem is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetItemArgs +func (_e *Client_Expecter) GetItem(_a0 interface{}, _a1 interface{}) *Client_GetItem_Call { + return &Client_GetItem_Call{Call: _e.mock.On("GetItem", _a0, _a1)} +} + +func (_c *Client_GetItem_Call) Run(run func(_a0 context.Context, _a1 git.GetItemArgs)) *Client_GetItem_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetItemArgs)) + }) + return _c +} + +func (_c *Client_GetItem_Call) Return(_a0 *git.GitItem, _a1 error) *Client_GetItem_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetItem_Call) RunAndReturn(run func(context.Context, git.GetItemArgs) (*git.GitItem, error)) *Client_GetItem_Call { + _c.Call.Return(run) + return _c +} + // GetItemContent provides a mock function with given fields: _a0, _a1 func (_m *Client) GetItemContent(_a0 context.Context, _a1 git.GetItemContentArgs) (io.ReadCloser, error) { ret := _m.Called(_a0, _a1) @@ -1598,6 +3230,35 @@ func (_m *Client) GetItemContent(_a0 context.Context, _a1 git.GetItemContentArgs return r0, r1 } +// Client_GetItemContent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetItemContent' +type Client_GetItemContent_Call struct { + *mock.Call +} + +// GetItemContent is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetItemContentArgs +func (_e *Client_Expecter) GetItemContent(_a0 interface{}, _a1 interface{}) *Client_GetItemContent_Call { + return &Client_GetItemContent_Call{Call: _e.mock.On("GetItemContent", _a0, _a1)} +} + +func (_c *Client_GetItemContent_Call) Run(run func(_a0 context.Context, _a1 git.GetItemContentArgs)) *Client_GetItemContent_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetItemContentArgs)) + }) + return _c +} + +func (_c *Client_GetItemContent_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetItemContent_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetItemContent_Call) RunAndReturn(run func(context.Context, git.GetItemContentArgs) (io.ReadCloser, error)) *Client_GetItemContent_Call { + _c.Call.Return(run) + return _c +} + // GetItemText provides a mock function with given fields: _a0, _a1 func (_m *Client) GetItemText(_a0 context.Context, _a1 git.GetItemTextArgs) (io.ReadCloser, error) { ret := _m.Called(_a0, _a1) @@ -1628,6 +3289,35 @@ func (_m *Client) GetItemText(_a0 context.Context, _a1 git.GetItemTextArgs) (io. return r0, r1 } +// Client_GetItemText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetItemText' +type Client_GetItemText_Call struct { + *mock.Call +} + +// GetItemText is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetItemTextArgs +func (_e *Client_Expecter) GetItemText(_a0 interface{}, _a1 interface{}) *Client_GetItemText_Call { + return &Client_GetItemText_Call{Call: _e.mock.On("GetItemText", _a0, _a1)} +} + +func (_c *Client_GetItemText_Call) Run(run func(_a0 context.Context, _a1 git.GetItemTextArgs)) *Client_GetItemText_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetItemTextArgs)) + }) + return _c +} + +func (_c *Client_GetItemText_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetItemText_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetItemText_Call) RunAndReturn(run func(context.Context, git.GetItemTextArgs) (io.ReadCloser, error)) *Client_GetItemText_Call { + _c.Call.Return(run) + return _c +} + // GetItemZip provides a mock function with given fields: _a0, _a1 func (_m *Client) GetItemZip(_a0 context.Context, _a1 git.GetItemZipArgs) (io.ReadCloser, error) { ret := _m.Called(_a0, _a1) @@ -1658,6 +3348,35 @@ func (_m *Client) GetItemZip(_a0 context.Context, _a1 git.GetItemZipArgs) (io.Re return r0, r1 } +// Client_GetItemZip_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetItemZip' +type Client_GetItemZip_Call struct { + *mock.Call +} + +// GetItemZip is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetItemZipArgs +func (_e *Client_Expecter) GetItemZip(_a0 interface{}, _a1 interface{}) *Client_GetItemZip_Call { + return &Client_GetItemZip_Call{Call: _e.mock.On("GetItemZip", _a0, _a1)} +} + +func (_c *Client_GetItemZip_Call) Run(run func(_a0 context.Context, _a1 git.GetItemZipArgs)) *Client_GetItemZip_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetItemZipArgs)) + }) + return _c +} + +func (_c *Client_GetItemZip_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetItemZip_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetItemZip_Call) RunAndReturn(run func(context.Context, git.GetItemZipArgs) (io.ReadCloser, error)) *Client_GetItemZip_Call { + _c.Call.Return(run) + return _c +} + // GetItems provides a mock function with given fields: _a0, _a1 func (_m *Client) GetItems(_a0 context.Context, _a1 git.GetItemsArgs) (*[]git.GitItem, error) { ret := _m.Called(_a0, _a1) @@ -1688,6 +3407,35 @@ func (_m *Client) GetItems(_a0 context.Context, _a1 git.GetItemsArgs) (*[]git.Gi return r0, r1 } +// Client_GetItems_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetItems' +type Client_GetItems_Call struct { + *mock.Call +} + +// GetItems is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetItemsArgs +func (_e *Client_Expecter) GetItems(_a0 interface{}, _a1 interface{}) *Client_GetItems_Call { + return &Client_GetItems_Call{Call: _e.mock.On("GetItems", _a0, _a1)} +} + +func (_c *Client_GetItems_Call) Run(run func(_a0 context.Context, _a1 git.GetItemsArgs)) *Client_GetItems_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetItemsArgs)) + }) + return _c +} + +func (_c *Client_GetItems_Call) Return(_a0 *[]git.GitItem, _a1 error) *Client_GetItems_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetItems_Call) RunAndReturn(run func(context.Context, git.GetItemsArgs) (*[]git.GitItem, error)) *Client_GetItems_Call { + _c.Call.Return(run) + return _c +} + // GetItemsBatch provides a mock function with given fields: _a0, _a1 func (_m *Client) GetItemsBatch(_a0 context.Context, _a1 git.GetItemsBatchArgs) (*[][]git.GitItem, error) { ret := _m.Called(_a0, _a1) @@ -1718,6 +3466,35 @@ func (_m *Client) GetItemsBatch(_a0 context.Context, _a1 git.GetItemsBatchArgs) return r0, r1 } +// Client_GetItemsBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetItemsBatch' +type Client_GetItemsBatch_Call struct { + *mock.Call +} + +// GetItemsBatch is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetItemsBatchArgs +func (_e *Client_Expecter) GetItemsBatch(_a0 interface{}, _a1 interface{}) *Client_GetItemsBatch_Call { + return &Client_GetItemsBatch_Call{Call: _e.mock.On("GetItemsBatch", _a0, _a1)} +} + +func (_c *Client_GetItemsBatch_Call) Run(run func(_a0 context.Context, _a1 git.GetItemsBatchArgs)) *Client_GetItemsBatch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetItemsBatchArgs)) + }) + return _c +} + +func (_c *Client_GetItemsBatch_Call) Return(_a0 *[][]git.GitItem, _a1 error) *Client_GetItemsBatch_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetItemsBatch_Call) RunAndReturn(run func(context.Context, git.GetItemsBatchArgs) (*[][]git.GitItem, error)) *Client_GetItemsBatch_Call { + _c.Call.Return(run) + return _c +} + // GetLikes provides a mock function with given fields: _a0, _a1 func (_m *Client) GetLikes(_a0 context.Context, _a1 git.GetLikesArgs) (*[]webapi.IdentityRef, error) { ret := _m.Called(_a0, _a1) @@ -1748,6 +3525,35 @@ func (_m *Client) GetLikes(_a0 context.Context, _a1 git.GetLikesArgs) (*[]webapi return r0, r1 } +// Client_GetLikes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLikes' +type Client_GetLikes_Call struct { + *mock.Call +} + +// GetLikes is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetLikesArgs +func (_e *Client_Expecter) GetLikes(_a0 interface{}, _a1 interface{}) *Client_GetLikes_Call { + return &Client_GetLikes_Call{Call: _e.mock.On("GetLikes", _a0, _a1)} +} + +func (_c *Client_GetLikes_Call) Run(run func(_a0 context.Context, _a1 git.GetLikesArgs)) *Client_GetLikes_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetLikesArgs)) + }) + return _c +} + +func (_c *Client_GetLikes_Call) Return(_a0 *[]webapi.IdentityRef, _a1 error) *Client_GetLikes_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetLikes_Call) RunAndReturn(run func(context.Context, git.GetLikesArgs) (*[]webapi.IdentityRef, error)) *Client_GetLikes_Call { + _c.Call.Return(run) + return _c +} + // GetMergeBases provides a mock function with given fields: _a0, _a1 func (_m *Client) GetMergeBases(_a0 context.Context, _a1 git.GetMergeBasesArgs) (*[]git.GitCommitRef, error) { ret := _m.Called(_a0, _a1) @@ -1778,6 +3584,35 @@ func (_m *Client) GetMergeBases(_a0 context.Context, _a1 git.GetMergeBasesArgs) return r0, r1 } +// Client_GetMergeBases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMergeBases' +type Client_GetMergeBases_Call struct { + *mock.Call +} + +// GetMergeBases is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetMergeBasesArgs +func (_e *Client_Expecter) GetMergeBases(_a0 interface{}, _a1 interface{}) *Client_GetMergeBases_Call { + return &Client_GetMergeBases_Call{Call: _e.mock.On("GetMergeBases", _a0, _a1)} +} + +func (_c *Client_GetMergeBases_Call) Run(run func(_a0 context.Context, _a1 git.GetMergeBasesArgs)) *Client_GetMergeBases_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetMergeBasesArgs)) + }) + return _c +} + +func (_c *Client_GetMergeBases_Call) Return(_a0 *[]git.GitCommitRef, _a1 error) *Client_GetMergeBases_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetMergeBases_Call) RunAndReturn(run func(context.Context, git.GetMergeBasesArgs) (*[]git.GitCommitRef, error)) *Client_GetMergeBases_Call { + _c.Call.Return(run) + return _c +} + // GetMergeRequest provides a mock function with given fields: _a0, _a1 func (_m *Client) GetMergeRequest(_a0 context.Context, _a1 git.GetMergeRequestArgs) (*git.GitMerge, error) { ret := _m.Called(_a0, _a1) @@ -1808,6 +3643,35 @@ func (_m *Client) GetMergeRequest(_a0 context.Context, _a1 git.GetMergeRequestAr return r0, r1 } +// Client_GetMergeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMergeRequest' +type Client_GetMergeRequest_Call struct { + *mock.Call +} + +// GetMergeRequest is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetMergeRequestArgs +func (_e *Client_Expecter) GetMergeRequest(_a0 interface{}, _a1 interface{}) *Client_GetMergeRequest_Call { + return &Client_GetMergeRequest_Call{Call: _e.mock.On("GetMergeRequest", _a0, _a1)} +} + +func (_c *Client_GetMergeRequest_Call) Run(run func(_a0 context.Context, _a1 git.GetMergeRequestArgs)) *Client_GetMergeRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetMergeRequestArgs)) + }) + return _c +} + +func (_c *Client_GetMergeRequest_Call) Return(_a0 *git.GitMerge, _a1 error) *Client_GetMergeRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetMergeRequest_Call) RunAndReturn(run func(context.Context, git.GetMergeRequestArgs) (*git.GitMerge, error)) *Client_GetMergeRequest_Call { + _c.Call.Return(run) + return _c +} + // GetPermission provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPermission(_a0 context.Context, _a1 git.GetPermissionArgs) (*bool, error) { ret := _m.Called(_a0, _a1) @@ -1838,6 +3702,35 @@ func (_m *Client) GetPermission(_a0 context.Context, _a1 git.GetPermissionArgs) return r0, r1 } +// Client_GetPermission_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermission' +type Client_GetPermission_Call struct { + *mock.Call +} + +// GetPermission is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPermissionArgs +func (_e *Client_Expecter) GetPermission(_a0 interface{}, _a1 interface{}) *Client_GetPermission_Call { + return &Client_GetPermission_Call{Call: _e.mock.On("GetPermission", _a0, _a1)} +} + +func (_c *Client_GetPermission_Call) Run(run func(_a0 context.Context, _a1 git.GetPermissionArgs)) *Client_GetPermission_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPermissionArgs)) + }) + return _c +} + +func (_c *Client_GetPermission_Call) Return(_a0 *bool, _a1 error) *Client_GetPermission_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPermission_Call) RunAndReturn(run func(context.Context, git.GetPermissionArgs) (*bool, error)) *Client_GetPermission_Call { + _c.Call.Return(run) + return _c +} + // GetPolicyConfigurations provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPolicyConfigurations(_a0 context.Context, _a1 git.GetPolicyConfigurationsArgs) (*git.GitPolicyConfigurationResponse, error) { ret := _m.Called(_a0, _a1) @@ -1868,6 +3761,35 @@ func (_m *Client) GetPolicyConfigurations(_a0 context.Context, _a1 git.GetPolicy return r0, r1 } +// Client_GetPolicyConfigurations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPolicyConfigurations' +type Client_GetPolicyConfigurations_Call struct { + *mock.Call +} + +// GetPolicyConfigurations is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPolicyConfigurationsArgs +func (_e *Client_Expecter) GetPolicyConfigurations(_a0 interface{}, _a1 interface{}) *Client_GetPolicyConfigurations_Call { + return &Client_GetPolicyConfigurations_Call{Call: _e.mock.On("GetPolicyConfigurations", _a0, _a1)} +} + +func (_c *Client_GetPolicyConfigurations_Call) Run(run func(_a0 context.Context, _a1 git.GetPolicyConfigurationsArgs)) *Client_GetPolicyConfigurations_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPolicyConfigurationsArgs)) + }) + return _c +} + +func (_c *Client_GetPolicyConfigurations_Call) Return(_a0 *git.GitPolicyConfigurationResponse, _a1 error) *Client_GetPolicyConfigurations_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPolicyConfigurations_Call) RunAndReturn(run func(context.Context, git.GetPolicyConfigurationsArgs) (*git.GitPolicyConfigurationResponse, error)) *Client_GetPolicyConfigurations_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequest provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequest(_a0 context.Context, _a1 git.GetPullRequestArgs) (*git.GitPullRequest, error) { ret := _m.Called(_a0, _a1) @@ -1898,6 +3820,35 @@ func (_m *Client) GetPullRequest(_a0 context.Context, _a1 git.GetPullRequestArgs return r0, r1 } +// Client_GetPullRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequest' +type Client_GetPullRequest_Call struct { + *mock.Call +} + +// GetPullRequest is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestArgs +func (_e *Client_Expecter) GetPullRequest(_a0 interface{}, _a1 interface{}) *Client_GetPullRequest_Call { + return &Client_GetPullRequest_Call{Call: _e.mock.On("GetPullRequest", _a0, _a1)} +} + +func (_c *Client_GetPullRequest_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestArgs)) *Client_GetPullRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequest_Call) Return(_a0 *git.GitPullRequest, _a1 error) *Client_GetPullRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequest_Call) RunAndReturn(run func(context.Context, git.GetPullRequestArgs) (*git.GitPullRequest, error)) *Client_GetPullRequest_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestById provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestById(_a0 context.Context, _a1 git.GetPullRequestByIdArgs) (*git.GitPullRequest, error) { ret := _m.Called(_a0, _a1) @@ -1928,6 +3879,35 @@ func (_m *Client) GetPullRequestById(_a0 context.Context, _a1 git.GetPullRequest return r0, r1 } +// Client_GetPullRequestById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestById' +type Client_GetPullRequestById_Call struct { + *mock.Call +} + +// GetPullRequestById is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestByIdArgs +func (_e *Client_Expecter) GetPullRequestById(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestById_Call { + return &Client_GetPullRequestById_Call{Call: _e.mock.On("GetPullRequestById", _a0, _a1)} +} + +func (_c *Client_GetPullRequestById_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestByIdArgs)) *Client_GetPullRequestById_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestByIdArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestById_Call) Return(_a0 *git.GitPullRequest, _a1 error) *Client_GetPullRequestById_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestById_Call) RunAndReturn(run func(context.Context, git.GetPullRequestByIdArgs) (*git.GitPullRequest, error)) *Client_GetPullRequestById_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestCommits provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestCommits(_a0 context.Context, _a1 git.GetPullRequestCommitsArgs) (*git.GetPullRequestCommitsResponseValue, error) { ret := _m.Called(_a0, _a1) @@ -1958,6 +3938,35 @@ func (_m *Client) GetPullRequestCommits(_a0 context.Context, _a1 git.GetPullRequ return r0, r1 } +// Client_GetPullRequestCommits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestCommits' +type Client_GetPullRequestCommits_Call struct { + *mock.Call +} + +// GetPullRequestCommits is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestCommitsArgs +func (_e *Client_Expecter) GetPullRequestCommits(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestCommits_Call { + return &Client_GetPullRequestCommits_Call{Call: _e.mock.On("GetPullRequestCommits", _a0, _a1)} +} + +func (_c *Client_GetPullRequestCommits_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestCommitsArgs)) *Client_GetPullRequestCommits_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestCommitsArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestCommits_Call) Return(_a0 *git.GetPullRequestCommitsResponseValue, _a1 error) *Client_GetPullRequestCommits_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestCommits_Call) RunAndReturn(run func(context.Context, git.GetPullRequestCommitsArgs) (*git.GetPullRequestCommitsResponseValue, error)) *Client_GetPullRequestCommits_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestIteration provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestIteration(_a0 context.Context, _a1 git.GetPullRequestIterationArgs) (*git.GitPullRequestIteration, error) { ret := _m.Called(_a0, _a1) @@ -1988,6 +3997,35 @@ func (_m *Client) GetPullRequestIteration(_a0 context.Context, _a1 git.GetPullRe return r0, r1 } +// Client_GetPullRequestIteration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestIteration' +type Client_GetPullRequestIteration_Call struct { + *mock.Call +} + +// GetPullRequestIteration is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestIterationArgs +func (_e *Client_Expecter) GetPullRequestIteration(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestIteration_Call { + return &Client_GetPullRequestIteration_Call{Call: _e.mock.On("GetPullRequestIteration", _a0, _a1)} +} + +func (_c *Client_GetPullRequestIteration_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestIterationArgs)) *Client_GetPullRequestIteration_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestIterationArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestIteration_Call) Return(_a0 *git.GitPullRequestIteration, _a1 error) *Client_GetPullRequestIteration_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestIteration_Call) RunAndReturn(run func(context.Context, git.GetPullRequestIterationArgs) (*git.GitPullRequestIteration, error)) *Client_GetPullRequestIteration_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestIterationChanges provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestIterationChanges(_a0 context.Context, _a1 git.GetPullRequestIterationChangesArgs) (*git.GitPullRequestIterationChanges, error) { ret := _m.Called(_a0, _a1) @@ -2018,6 +4056,35 @@ func (_m *Client) GetPullRequestIterationChanges(_a0 context.Context, _a1 git.Ge return r0, r1 } +// Client_GetPullRequestIterationChanges_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestIterationChanges' +type Client_GetPullRequestIterationChanges_Call struct { + *mock.Call +} + +// GetPullRequestIterationChanges is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestIterationChangesArgs +func (_e *Client_Expecter) GetPullRequestIterationChanges(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestIterationChanges_Call { + return &Client_GetPullRequestIterationChanges_Call{Call: _e.mock.On("GetPullRequestIterationChanges", _a0, _a1)} +} + +func (_c *Client_GetPullRequestIterationChanges_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestIterationChangesArgs)) *Client_GetPullRequestIterationChanges_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestIterationChangesArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestIterationChanges_Call) Return(_a0 *git.GitPullRequestIterationChanges, _a1 error) *Client_GetPullRequestIterationChanges_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestIterationChanges_Call) RunAndReturn(run func(context.Context, git.GetPullRequestIterationChangesArgs) (*git.GitPullRequestIterationChanges, error)) *Client_GetPullRequestIterationChanges_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestIterationCommits provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestIterationCommits(_a0 context.Context, _a1 git.GetPullRequestIterationCommitsArgs) (*[]git.GitCommitRef, error) { ret := _m.Called(_a0, _a1) @@ -2048,6 +4115,35 @@ func (_m *Client) GetPullRequestIterationCommits(_a0 context.Context, _a1 git.Ge return r0, r1 } +// Client_GetPullRequestIterationCommits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestIterationCommits' +type Client_GetPullRequestIterationCommits_Call struct { + *mock.Call +} + +// GetPullRequestIterationCommits is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestIterationCommitsArgs +func (_e *Client_Expecter) GetPullRequestIterationCommits(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestIterationCommits_Call { + return &Client_GetPullRequestIterationCommits_Call{Call: _e.mock.On("GetPullRequestIterationCommits", _a0, _a1)} +} + +func (_c *Client_GetPullRequestIterationCommits_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestIterationCommitsArgs)) *Client_GetPullRequestIterationCommits_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestIterationCommitsArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestIterationCommits_Call) Return(_a0 *[]git.GitCommitRef, _a1 error) *Client_GetPullRequestIterationCommits_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestIterationCommits_Call) RunAndReturn(run func(context.Context, git.GetPullRequestIterationCommitsArgs) (*[]git.GitCommitRef, error)) *Client_GetPullRequestIterationCommits_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestIterationStatus provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestIterationStatus(_a0 context.Context, _a1 git.GetPullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error) { ret := _m.Called(_a0, _a1) @@ -2078,6 +4174,35 @@ func (_m *Client) GetPullRequestIterationStatus(_a0 context.Context, _a1 git.Get return r0, r1 } +// Client_GetPullRequestIterationStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestIterationStatus' +type Client_GetPullRequestIterationStatus_Call struct { + *mock.Call +} + +// GetPullRequestIterationStatus is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestIterationStatusArgs +func (_e *Client_Expecter) GetPullRequestIterationStatus(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestIterationStatus_Call { + return &Client_GetPullRequestIterationStatus_Call{Call: _e.mock.On("GetPullRequestIterationStatus", _a0, _a1)} +} + +func (_c *Client_GetPullRequestIterationStatus_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestIterationStatusArgs)) *Client_GetPullRequestIterationStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestIterationStatusArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestIterationStatus_Call) Return(_a0 *git.GitPullRequestStatus, _a1 error) *Client_GetPullRequestIterationStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestIterationStatus_Call) RunAndReturn(run func(context.Context, git.GetPullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error)) *Client_GetPullRequestIterationStatus_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestIterationStatuses provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestIterationStatuses(_a0 context.Context, _a1 git.GetPullRequestIterationStatusesArgs) (*[]git.GitPullRequestStatus, error) { ret := _m.Called(_a0, _a1) @@ -2108,6 +4233,35 @@ func (_m *Client) GetPullRequestIterationStatuses(_a0 context.Context, _a1 git.G return r0, r1 } +// Client_GetPullRequestIterationStatuses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestIterationStatuses' +type Client_GetPullRequestIterationStatuses_Call struct { + *mock.Call +} + +// GetPullRequestIterationStatuses is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestIterationStatusesArgs +func (_e *Client_Expecter) GetPullRequestIterationStatuses(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestIterationStatuses_Call { + return &Client_GetPullRequestIterationStatuses_Call{Call: _e.mock.On("GetPullRequestIterationStatuses", _a0, _a1)} +} + +func (_c *Client_GetPullRequestIterationStatuses_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestIterationStatusesArgs)) *Client_GetPullRequestIterationStatuses_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestIterationStatusesArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestIterationStatuses_Call) Return(_a0 *[]git.GitPullRequestStatus, _a1 error) *Client_GetPullRequestIterationStatuses_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestIterationStatuses_Call) RunAndReturn(run func(context.Context, git.GetPullRequestIterationStatusesArgs) (*[]git.GitPullRequestStatus, error)) *Client_GetPullRequestIterationStatuses_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestIterations provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestIterations(_a0 context.Context, _a1 git.GetPullRequestIterationsArgs) (*[]git.GitPullRequestIteration, error) { ret := _m.Called(_a0, _a1) @@ -2138,6 +4292,35 @@ func (_m *Client) GetPullRequestIterations(_a0 context.Context, _a1 git.GetPullR return r0, r1 } +// Client_GetPullRequestIterations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestIterations' +type Client_GetPullRequestIterations_Call struct { + *mock.Call +} + +// GetPullRequestIterations is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestIterationsArgs +func (_e *Client_Expecter) GetPullRequestIterations(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestIterations_Call { + return &Client_GetPullRequestIterations_Call{Call: _e.mock.On("GetPullRequestIterations", _a0, _a1)} +} + +func (_c *Client_GetPullRequestIterations_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestIterationsArgs)) *Client_GetPullRequestIterations_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestIterationsArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestIterations_Call) Return(_a0 *[]git.GitPullRequestIteration, _a1 error) *Client_GetPullRequestIterations_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestIterations_Call) RunAndReturn(run func(context.Context, git.GetPullRequestIterationsArgs) (*[]git.GitPullRequestIteration, error)) *Client_GetPullRequestIterations_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestLabel provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestLabel(_a0 context.Context, _a1 git.GetPullRequestLabelArgs) (*core.WebApiTagDefinition, error) { ret := _m.Called(_a0, _a1) @@ -2168,6 +4351,35 @@ func (_m *Client) GetPullRequestLabel(_a0 context.Context, _a1 git.GetPullReques return r0, r1 } +// Client_GetPullRequestLabel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestLabel' +type Client_GetPullRequestLabel_Call struct { + *mock.Call +} + +// GetPullRequestLabel is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestLabelArgs +func (_e *Client_Expecter) GetPullRequestLabel(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestLabel_Call { + return &Client_GetPullRequestLabel_Call{Call: _e.mock.On("GetPullRequestLabel", _a0, _a1)} +} + +func (_c *Client_GetPullRequestLabel_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestLabelArgs)) *Client_GetPullRequestLabel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestLabelArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestLabel_Call) Return(_a0 *core.WebApiTagDefinition, _a1 error) *Client_GetPullRequestLabel_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestLabel_Call) RunAndReturn(run func(context.Context, git.GetPullRequestLabelArgs) (*core.WebApiTagDefinition, error)) *Client_GetPullRequestLabel_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestLabels provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestLabels(_a0 context.Context, _a1 git.GetPullRequestLabelsArgs) (*[]core.WebApiTagDefinition, error) { ret := _m.Called(_a0, _a1) @@ -2198,6 +4410,35 @@ func (_m *Client) GetPullRequestLabels(_a0 context.Context, _a1 git.GetPullReque return r0, r1 } +// Client_GetPullRequestLabels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestLabels' +type Client_GetPullRequestLabels_Call struct { + *mock.Call +} + +// GetPullRequestLabels is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestLabelsArgs +func (_e *Client_Expecter) GetPullRequestLabels(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestLabels_Call { + return &Client_GetPullRequestLabels_Call{Call: _e.mock.On("GetPullRequestLabels", _a0, _a1)} +} + +func (_c *Client_GetPullRequestLabels_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestLabelsArgs)) *Client_GetPullRequestLabels_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestLabelsArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestLabels_Call) Return(_a0 *[]core.WebApiTagDefinition, _a1 error) *Client_GetPullRequestLabels_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestLabels_Call) RunAndReturn(run func(context.Context, git.GetPullRequestLabelsArgs) (*[]core.WebApiTagDefinition, error)) *Client_GetPullRequestLabels_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestProperties provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestProperties(_a0 context.Context, _a1 git.GetPullRequestPropertiesArgs) (interface{}, error) { ret := _m.Called(_a0, _a1) @@ -2228,6 +4469,35 @@ func (_m *Client) GetPullRequestProperties(_a0 context.Context, _a1 git.GetPullR return r0, r1 } +// Client_GetPullRequestProperties_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestProperties' +type Client_GetPullRequestProperties_Call struct { + *mock.Call +} + +// GetPullRequestProperties is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestPropertiesArgs +func (_e *Client_Expecter) GetPullRequestProperties(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestProperties_Call { + return &Client_GetPullRequestProperties_Call{Call: _e.mock.On("GetPullRequestProperties", _a0, _a1)} +} + +func (_c *Client_GetPullRequestProperties_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestPropertiesArgs)) *Client_GetPullRequestProperties_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestPropertiesArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestProperties_Call) Return(_a0 interface{}, _a1 error) *Client_GetPullRequestProperties_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestProperties_Call) RunAndReturn(run func(context.Context, git.GetPullRequestPropertiesArgs) (interface{}, error)) *Client_GetPullRequestProperties_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestQuery provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestQuery(_a0 context.Context, _a1 git.GetPullRequestQueryArgs) (*git.GitPullRequestQuery, error) { ret := _m.Called(_a0, _a1) @@ -2258,6 +4528,35 @@ func (_m *Client) GetPullRequestQuery(_a0 context.Context, _a1 git.GetPullReques return r0, r1 } +// Client_GetPullRequestQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestQuery' +type Client_GetPullRequestQuery_Call struct { + *mock.Call +} + +// GetPullRequestQuery is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestQueryArgs +func (_e *Client_Expecter) GetPullRequestQuery(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestQuery_Call { + return &Client_GetPullRequestQuery_Call{Call: _e.mock.On("GetPullRequestQuery", _a0, _a1)} +} + +func (_c *Client_GetPullRequestQuery_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestQueryArgs)) *Client_GetPullRequestQuery_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestQueryArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestQuery_Call) Return(_a0 *git.GitPullRequestQuery, _a1 error) *Client_GetPullRequestQuery_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestQuery_Call) RunAndReturn(run func(context.Context, git.GetPullRequestQueryArgs) (*git.GitPullRequestQuery, error)) *Client_GetPullRequestQuery_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestReviewer provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestReviewer(_a0 context.Context, _a1 git.GetPullRequestReviewerArgs) (*git.IdentityRefWithVote, error) { ret := _m.Called(_a0, _a1) @@ -2288,6 +4587,35 @@ func (_m *Client) GetPullRequestReviewer(_a0 context.Context, _a1 git.GetPullReq return r0, r1 } +// Client_GetPullRequestReviewer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestReviewer' +type Client_GetPullRequestReviewer_Call struct { + *mock.Call +} + +// GetPullRequestReviewer is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestReviewerArgs +func (_e *Client_Expecter) GetPullRequestReviewer(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestReviewer_Call { + return &Client_GetPullRequestReviewer_Call{Call: _e.mock.On("GetPullRequestReviewer", _a0, _a1)} +} + +func (_c *Client_GetPullRequestReviewer_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestReviewerArgs)) *Client_GetPullRequestReviewer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestReviewerArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestReviewer_Call) Return(_a0 *git.IdentityRefWithVote, _a1 error) *Client_GetPullRequestReviewer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestReviewer_Call) RunAndReturn(run func(context.Context, git.GetPullRequestReviewerArgs) (*git.IdentityRefWithVote, error)) *Client_GetPullRequestReviewer_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestReviewers provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestReviewers(_a0 context.Context, _a1 git.GetPullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error) { ret := _m.Called(_a0, _a1) @@ -2318,6 +4646,35 @@ func (_m *Client) GetPullRequestReviewers(_a0 context.Context, _a1 git.GetPullRe return r0, r1 } +// Client_GetPullRequestReviewers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestReviewers' +type Client_GetPullRequestReviewers_Call struct { + *mock.Call +} + +// GetPullRequestReviewers is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestReviewersArgs +func (_e *Client_Expecter) GetPullRequestReviewers(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestReviewers_Call { + return &Client_GetPullRequestReviewers_Call{Call: _e.mock.On("GetPullRequestReviewers", _a0, _a1)} +} + +func (_c *Client_GetPullRequestReviewers_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestReviewersArgs)) *Client_GetPullRequestReviewers_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestReviewersArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestReviewers_Call) Return(_a0 *[]git.IdentityRefWithVote, _a1 error) *Client_GetPullRequestReviewers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestReviewers_Call) RunAndReturn(run func(context.Context, git.GetPullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error)) *Client_GetPullRequestReviewers_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestStatus provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestStatus(_a0 context.Context, _a1 git.GetPullRequestStatusArgs) (*git.GitPullRequestStatus, error) { ret := _m.Called(_a0, _a1) @@ -2348,6 +4705,35 @@ func (_m *Client) GetPullRequestStatus(_a0 context.Context, _a1 git.GetPullReque return r0, r1 } +// Client_GetPullRequestStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestStatus' +type Client_GetPullRequestStatus_Call struct { + *mock.Call +} + +// GetPullRequestStatus is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestStatusArgs +func (_e *Client_Expecter) GetPullRequestStatus(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestStatus_Call { + return &Client_GetPullRequestStatus_Call{Call: _e.mock.On("GetPullRequestStatus", _a0, _a1)} +} + +func (_c *Client_GetPullRequestStatus_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestStatusArgs)) *Client_GetPullRequestStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestStatusArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestStatus_Call) Return(_a0 *git.GitPullRequestStatus, _a1 error) *Client_GetPullRequestStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestStatus_Call) RunAndReturn(run func(context.Context, git.GetPullRequestStatusArgs) (*git.GitPullRequestStatus, error)) *Client_GetPullRequestStatus_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestStatuses provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestStatuses(_a0 context.Context, _a1 git.GetPullRequestStatusesArgs) (*[]git.GitPullRequestStatus, error) { ret := _m.Called(_a0, _a1) @@ -2378,6 +4764,35 @@ func (_m *Client) GetPullRequestStatuses(_a0 context.Context, _a1 git.GetPullReq return r0, r1 } +// Client_GetPullRequestStatuses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestStatuses' +type Client_GetPullRequestStatuses_Call struct { + *mock.Call +} + +// GetPullRequestStatuses is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestStatusesArgs +func (_e *Client_Expecter) GetPullRequestStatuses(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestStatuses_Call { + return &Client_GetPullRequestStatuses_Call{Call: _e.mock.On("GetPullRequestStatuses", _a0, _a1)} +} + +func (_c *Client_GetPullRequestStatuses_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestStatusesArgs)) *Client_GetPullRequestStatuses_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestStatusesArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestStatuses_Call) Return(_a0 *[]git.GitPullRequestStatus, _a1 error) *Client_GetPullRequestStatuses_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestStatuses_Call) RunAndReturn(run func(context.Context, git.GetPullRequestStatusesArgs) (*[]git.GitPullRequestStatus, error)) *Client_GetPullRequestStatuses_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestThread provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestThread(_a0 context.Context, _a1 git.GetPullRequestThreadArgs) (*git.GitPullRequestCommentThread, error) { ret := _m.Called(_a0, _a1) @@ -2408,6 +4823,35 @@ func (_m *Client) GetPullRequestThread(_a0 context.Context, _a1 git.GetPullReque return r0, r1 } +// Client_GetPullRequestThread_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestThread' +type Client_GetPullRequestThread_Call struct { + *mock.Call +} + +// GetPullRequestThread is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestThreadArgs +func (_e *Client_Expecter) GetPullRequestThread(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestThread_Call { + return &Client_GetPullRequestThread_Call{Call: _e.mock.On("GetPullRequestThread", _a0, _a1)} +} + +func (_c *Client_GetPullRequestThread_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestThreadArgs)) *Client_GetPullRequestThread_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestThreadArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestThread_Call) Return(_a0 *git.GitPullRequestCommentThread, _a1 error) *Client_GetPullRequestThread_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestThread_Call) RunAndReturn(run func(context.Context, git.GetPullRequestThreadArgs) (*git.GitPullRequestCommentThread, error)) *Client_GetPullRequestThread_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestWorkItemRefs provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestWorkItemRefs(_a0 context.Context, _a1 git.GetPullRequestWorkItemRefsArgs) (*[]webapi.ResourceRef, error) { ret := _m.Called(_a0, _a1) @@ -2438,6 +4882,35 @@ func (_m *Client) GetPullRequestWorkItemRefs(_a0 context.Context, _a1 git.GetPul return r0, r1 } +// Client_GetPullRequestWorkItemRefs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestWorkItemRefs' +type Client_GetPullRequestWorkItemRefs_Call struct { + *mock.Call +} + +// GetPullRequestWorkItemRefs is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestWorkItemRefsArgs +func (_e *Client_Expecter) GetPullRequestWorkItemRefs(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestWorkItemRefs_Call { + return &Client_GetPullRequestWorkItemRefs_Call{Call: _e.mock.On("GetPullRequestWorkItemRefs", _a0, _a1)} +} + +func (_c *Client_GetPullRequestWorkItemRefs_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestWorkItemRefsArgs)) *Client_GetPullRequestWorkItemRefs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestWorkItemRefsArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestWorkItemRefs_Call) Return(_a0 *[]webapi.ResourceRef, _a1 error) *Client_GetPullRequestWorkItemRefs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestWorkItemRefs_Call) RunAndReturn(run func(context.Context, git.GetPullRequestWorkItemRefsArgs) (*[]webapi.ResourceRef, error)) *Client_GetPullRequestWorkItemRefs_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequests provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequests(_a0 context.Context, _a1 git.GetPullRequestsArgs) (*[]git.GitPullRequest, error) { ret := _m.Called(_a0, _a1) @@ -2468,6 +4941,35 @@ func (_m *Client) GetPullRequests(_a0 context.Context, _a1 git.GetPullRequestsAr return r0, r1 } +// Client_GetPullRequests_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequests' +type Client_GetPullRequests_Call struct { + *mock.Call +} + +// GetPullRequests is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestsArgs +func (_e *Client_Expecter) GetPullRequests(_a0 interface{}, _a1 interface{}) *Client_GetPullRequests_Call { + return &Client_GetPullRequests_Call{Call: _e.mock.On("GetPullRequests", _a0, _a1)} +} + +func (_c *Client_GetPullRequests_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestsArgs)) *Client_GetPullRequests_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestsArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequests_Call) Return(_a0 *[]git.GitPullRequest, _a1 error) *Client_GetPullRequests_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequests_Call) RunAndReturn(run func(context.Context, git.GetPullRequestsArgs) (*[]git.GitPullRequest, error)) *Client_GetPullRequests_Call { + _c.Call.Return(run) + return _c +} + // GetPullRequestsByProject provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPullRequestsByProject(_a0 context.Context, _a1 git.GetPullRequestsByProjectArgs) (*[]git.GitPullRequest, error) { ret := _m.Called(_a0, _a1) @@ -2498,6 +5000,35 @@ func (_m *Client) GetPullRequestsByProject(_a0 context.Context, _a1 git.GetPullR return r0, r1 } +// Client_GetPullRequestsByProject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPullRequestsByProject' +type Client_GetPullRequestsByProject_Call struct { + *mock.Call +} + +// GetPullRequestsByProject is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPullRequestsByProjectArgs +func (_e *Client_Expecter) GetPullRequestsByProject(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestsByProject_Call { + return &Client_GetPullRequestsByProject_Call{Call: _e.mock.On("GetPullRequestsByProject", _a0, _a1)} +} + +func (_c *Client_GetPullRequestsByProject_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestsByProjectArgs)) *Client_GetPullRequestsByProject_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPullRequestsByProjectArgs)) + }) + return _c +} + +func (_c *Client_GetPullRequestsByProject_Call) Return(_a0 *[]git.GitPullRequest, _a1 error) *Client_GetPullRequestsByProject_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPullRequestsByProject_Call) RunAndReturn(run func(context.Context, git.GetPullRequestsByProjectArgs) (*[]git.GitPullRequest, error)) *Client_GetPullRequestsByProject_Call { + _c.Call.Return(run) + return _c +} + // GetPush provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPush(_a0 context.Context, _a1 git.GetPushArgs) (*git.GitPush, error) { ret := _m.Called(_a0, _a1) @@ -2528,6 +5059,35 @@ func (_m *Client) GetPush(_a0 context.Context, _a1 git.GetPushArgs) (*git.GitPus return r0, r1 } +// Client_GetPush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPush' +type Client_GetPush_Call struct { + *mock.Call +} + +// GetPush is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPushArgs +func (_e *Client_Expecter) GetPush(_a0 interface{}, _a1 interface{}) *Client_GetPush_Call { + return &Client_GetPush_Call{Call: _e.mock.On("GetPush", _a0, _a1)} +} + +func (_c *Client_GetPush_Call) Run(run func(_a0 context.Context, _a1 git.GetPushArgs)) *Client_GetPush_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPushArgs)) + }) + return _c +} + +func (_c *Client_GetPush_Call) Return(_a0 *git.GitPush, _a1 error) *Client_GetPush_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPush_Call) RunAndReturn(run func(context.Context, git.GetPushArgs) (*git.GitPush, error)) *Client_GetPush_Call { + _c.Call.Return(run) + return _c +} + // GetPushCommits provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPushCommits(_a0 context.Context, _a1 git.GetPushCommitsArgs) (*[]git.GitCommitRef, error) { ret := _m.Called(_a0, _a1) @@ -2558,6 +5118,35 @@ func (_m *Client) GetPushCommits(_a0 context.Context, _a1 git.GetPushCommitsArgs return r0, r1 } +// Client_GetPushCommits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPushCommits' +type Client_GetPushCommits_Call struct { + *mock.Call +} + +// GetPushCommits is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPushCommitsArgs +func (_e *Client_Expecter) GetPushCommits(_a0 interface{}, _a1 interface{}) *Client_GetPushCommits_Call { + return &Client_GetPushCommits_Call{Call: _e.mock.On("GetPushCommits", _a0, _a1)} +} + +func (_c *Client_GetPushCommits_Call) Run(run func(_a0 context.Context, _a1 git.GetPushCommitsArgs)) *Client_GetPushCommits_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPushCommitsArgs)) + }) + return _c +} + +func (_c *Client_GetPushCommits_Call) Return(_a0 *[]git.GitCommitRef, _a1 error) *Client_GetPushCommits_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPushCommits_Call) RunAndReturn(run func(context.Context, git.GetPushCommitsArgs) (*[]git.GitCommitRef, error)) *Client_GetPushCommits_Call { + _c.Call.Return(run) + return _c +} + // GetPushes provides a mock function with given fields: _a0, _a1 func (_m *Client) GetPushes(_a0 context.Context, _a1 git.GetPushesArgs) (*[]git.GitPush, error) { ret := _m.Called(_a0, _a1) @@ -2588,6 +5177,35 @@ func (_m *Client) GetPushes(_a0 context.Context, _a1 git.GetPushesArgs) (*[]git. return r0, r1 } +// Client_GetPushes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPushes' +type Client_GetPushes_Call struct { + *mock.Call +} + +// GetPushes is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetPushesArgs +func (_e *Client_Expecter) GetPushes(_a0 interface{}, _a1 interface{}) *Client_GetPushes_Call { + return &Client_GetPushes_Call{Call: _e.mock.On("GetPushes", _a0, _a1)} +} + +func (_c *Client_GetPushes_Call) Run(run func(_a0 context.Context, _a1 git.GetPushesArgs)) *Client_GetPushes_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetPushesArgs)) + }) + return _c +} + +func (_c *Client_GetPushes_Call) Return(_a0 *[]git.GitPush, _a1 error) *Client_GetPushes_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetPushes_Call) RunAndReturn(run func(context.Context, git.GetPushesArgs) (*[]git.GitPush, error)) *Client_GetPushes_Call { + _c.Call.Return(run) + return _c +} + // GetRecycleBinRepositories provides a mock function with given fields: _a0, _a1 func (_m *Client) GetRecycleBinRepositories(_a0 context.Context, _a1 git.GetRecycleBinRepositoriesArgs) (*[]git.GitDeletedRepository, error) { ret := _m.Called(_a0, _a1) @@ -2618,6 +5236,35 @@ func (_m *Client) GetRecycleBinRepositories(_a0 context.Context, _a1 git.GetRecy return r0, r1 } +// Client_GetRecycleBinRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecycleBinRepositories' +type Client_GetRecycleBinRepositories_Call struct { + *mock.Call +} + +// GetRecycleBinRepositories is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetRecycleBinRepositoriesArgs +func (_e *Client_Expecter) GetRecycleBinRepositories(_a0 interface{}, _a1 interface{}) *Client_GetRecycleBinRepositories_Call { + return &Client_GetRecycleBinRepositories_Call{Call: _e.mock.On("GetRecycleBinRepositories", _a0, _a1)} +} + +func (_c *Client_GetRecycleBinRepositories_Call) Run(run func(_a0 context.Context, _a1 git.GetRecycleBinRepositoriesArgs)) *Client_GetRecycleBinRepositories_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetRecycleBinRepositoriesArgs)) + }) + return _c +} + +func (_c *Client_GetRecycleBinRepositories_Call) Return(_a0 *[]git.GitDeletedRepository, _a1 error) *Client_GetRecycleBinRepositories_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetRecycleBinRepositories_Call) RunAndReturn(run func(context.Context, git.GetRecycleBinRepositoriesArgs) (*[]git.GitDeletedRepository, error)) *Client_GetRecycleBinRepositories_Call { + _c.Call.Return(run) + return _c +} + // GetRefFavorite provides a mock function with given fields: _a0, _a1 func (_m *Client) GetRefFavorite(_a0 context.Context, _a1 git.GetRefFavoriteArgs) (*git.GitRefFavorite, error) { ret := _m.Called(_a0, _a1) @@ -2648,6 +5295,35 @@ func (_m *Client) GetRefFavorite(_a0 context.Context, _a1 git.GetRefFavoriteArgs return r0, r1 } +// Client_GetRefFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRefFavorite' +type Client_GetRefFavorite_Call struct { + *mock.Call +} + +// GetRefFavorite is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetRefFavoriteArgs +func (_e *Client_Expecter) GetRefFavorite(_a0 interface{}, _a1 interface{}) *Client_GetRefFavorite_Call { + return &Client_GetRefFavorite_Call{Call: _e.mock.On("GetRefFavorite", _a0, _a1)} +} + +func (_c *Client_GetRefFavorite_Call) Run(run func(_a0 context.Context, _a1 git.GetRefFavoriteArgs)) *Client_GetRefFavorite_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetRefFavoriteArgs)) + }) + return _c +} + +func (_c *Client_GetRefFavorite_Call) Return(_a0 *git.GitRefFavorite, _a1 error) *Client_GetRefFavorite_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetRefFavorite_Call) RunAndReturn(run func(context.Context, git.GetRefFavoriteArgs) (*git.GitRefFavorite, error)) *Client_GetRefFavorite_Call { + _c.Call.Return(run) + return _c +} + // GetRefFavorites provides a mock function with given fields: _a0, _a1 func (_m *Client) GetRefFavorites(_a0 context.Context, _a1 git.GetRefFavoritesArgs) (*[]git.GitRefFavorite, error) { ret := _m.Called(_a0, _a1) @@ -2678,6 +5354,35 @@ func (_m *Client) GetRefFavorites(_a0 context.Context, _a1 git.GetRefFavoritesAr return r0, r1 } +// Client_GetRefFavorites_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRefFavorites' +type Client_GetRefFavorites_Call struct { + *mock.Call +} + +// GetRefFavorites is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetRefFavoritesArgs +func (_e *Client_Expecter) GetRefFavorites(_a0 interface{}, _a1 interface{}) *Client_GetRefFavorites_Call { + return &Client_GetRefFavorites_Call{Call: _e.mock.On("GetRefFavorites", _a0, _a1)} +} + +func (_c *Client_GetRefFavorites_Call) Run(run func(_a0 context.Context, _a1 git.GetRefFavoritesArgs)) *Client_GetRefFavorites_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetRefFavoritesArgs)) + }) + return _c +} + +func (_c *Client_GetRefFavorites_Call) Return(_a0 *[]git.GitRefFavorite, _a1 error) *Client_GetRefFavorites_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetRefFavorites_Call) RunAndReturn(run func(context.Context, git.GetRefFavoritesArgs) (*[]git.GitRefFavorite, error)) *Client_GetRefFavorites_Call { + _c.Call.Return(run) + return _c +} + // GetRefs provides a mock function with given fields: _a0, _a1 func (_m *Client) GetRefs(_a0 context.Context, _a1 git.GetRefsArgs) (*git.GetRefsResponseValue, error) { ret := _m.Called(_a0, _a1) @@ -2705,7 +5410,36 @@ func (_m *Client) GetRefs(_a0 context.Context, _a1 git.GetRefsArgs) (*git.GetRef r1 = ret.Error(1) } - return r0, r1 + return r0, r1 +} + +// Client_GetRefs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRefs' +type Client_GetRefs_Call struct { + *mock.Call +} + +// GetRefs is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetRefsArgs +func (_e *Client_Expecter) GetRefs(_a0 interface{}, _a1 interface{}) *Client_GetRefs_Call { + return &Client_GetRefs_Call{Call: _e.mock.On("GetRefs", _a0, _a1)} +} + +func (_c *Client_GetRefs_Call) Run(run func(_a0 context.Context, _a1 git.GetRefsArgs)) *Client_GetRefs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetRefsArgs)) + }) + return _c +} + +func (_c *Client_GetRefs_Call) Return(_a0 *git.GetRefsResponseValue, _a1 error) *Client_GetRefs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetRefs_Call) RunAndReturn(run func(context.Context, git.GetRefsArgs) (*git.GetRefsResponseValue, error)) *Client_GetRefs_Call { + _c.Call.Return(run) + return _c } // GetRepositories provides a mock function with given fields: _a0, _a1 @@ -2738,6 +5472,35 @@ func (_m *Client) GetRepositories(_a0 context.Context, _a1 git.GetRepositoriesAr return r0, r1 } +// Client_GetRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepositories' +type Client_GetRepositories_Call struct { + *mock.Call +} + +// GetRepositories is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetRepositoriesArgs +func (_e *Client_Expecter) GetRepositories(_a0 interface{}, _a1 interface{}) *Client_GetRepositories_Call { + return &Client_GetRepositories_Call{Call: _e.mock.On("GetRepositories", _a0, _a1)} +} + +func (_c *Client_GetRepositories_Call) Run(run func(_a0 context.Context, _a1 git.GetRepositoriesArgs)) *Client_GetRepositories_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetRepositoriesArgs)) + }) + return _c +} + +func (_c *Client_GetRepositories_Call) Return(_a0 *[]git.GitRepository, _a1 error) *Client_GetRepositories_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetRepositories_Call) RunAndReturn(run func(context.Context, git.GetRepositoriesArgs) (*[]git.GitRepository, error)) *Client_GetRepositories_Call { + _c.Call.Return(run) + return _c +} + // GetRepository provides a mock function with given fields: _a0, _a1 func (_m *Client) GetRepository(_a0 context.Context, _a1 git.GetRepositoryArgs) (*git.GitRepository, error) { ret := _m.Called(_a0, _a1) @@ -2768,6 +5531,35 @@ func (_m *Client) GetRepository(_a0 context.Context, _a1 git.GetRepositoryArgs) return r0, r1 } +// Client_GetRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepository' +type Client_GetRepository_Call struct { + *mock.Call +} + +// GetRepository is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetRepositoryArgs +func (_e *Client_Expecter) GetRepository(_a0 interface{}, _a1 interface{}) *Client_GetRepository_Call { + return &Client_GetRepository_Call{Call: _e.mock.On("GetRepository", _a0, _a1)} +} + +func (_c *Client_GetRepository_Call) Run(run func(_a0 context.Context, _a1 git.GetRepositoryArgs)) *Client_GetRepository_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetRepositoryArgs)) + }) + return _c +} + +func (_c *Client_GetRepository_Call) Return(_a0 *git.GitRepository, _a1 error) *Client_GetRepository_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetRepository_Call) RunAndReturn(run func(context.Context, git.GetRepositoryArgs) (*git.GitRepository, error)) *Client_GetRepository_Call { + _c.Call.Return(run) + return _c +} + // GetRepositoryWithParent provides a mock function with given fields: _a0, _a1 func (_m *Client) GetRepositoryWithParent(_a0 context.Context, _a1 git.GetRepositoryWithParentArgs) (*git.GitRepository, error) { ret := _m.Called(_a0, _a1) @@ -2798,6 +5590,35 @@ func (_m *Client) GetRepositoryWithParent(_a0 context.Context, _a1 git.GetReposi return r0, r1 } +// Client_GetRepositoryWithParent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepositoryWithParent' +type Client_GetRepositoryWithParent_Call struct { + *mock.Call +} + +// GetRepositoryWithParent is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetRepositoryWithParentArgs +func (_e *Client_Expecter) GetRepositoryWithParent(_a0 interface{}, _a1 interface{}) *Client_GetRepositoryWithParent_Call { + return &Client_GetRepositoryWithParent_Call{Call: _e.mock.On("GetRepositoryWithParent", _a0, _a1)} +} + +func (_c *Client_GetRepositoryWithParent_Call) Run(run func(_a0 context.Context, _a1 git.GetRepositoryWithParentArgs)) *Client_GetRepositoryWithParent_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetRepositoryWithParentArgs)) + }) + return _c +} + +func (_c *Client_GetRepositoryWithParent_Call) Return(_a0 *git.GitRepository, _a1 error) *Client_GetRepositoryWithParent_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetRepositoryWithParent_Call) RunAndReturn(run func(context.Context, git.GetRepositoryWithParentArgs) (*git.GitRepository, error)) *Client_GetRepositoryWithParent_Call { + _c.Call.Return(run) + return _c +} + // GetRevert provides a mock function with given fields: _a0, _a1 func (_m *Client) GetRevert(_a0 context.Context, _a1 git.GetRevertArgs) (*git.GitRevert, error) { ret := _m.Called(_a0, _a1) @@ -2828,6 +5649,35 @@ func (_m *Client) GetRevert(_a0 context.Context, _a1 git.GetRevertArgs) (*git.Gi return r0, r1 } +// Client_GetRevert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRevert' +type Client_GetRevert_Call struct { + *mock.Call +} + +// GetRevert is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetRevertArgs +func (_e *Client_Expecter) GetRevert(_a0 interface{}, _a1 interface{}) *Client_GetRevert_Call { + return &Client_GetRevert_Call{Call: _e.mock.On("GetRevert", _a0, _a1)} +} + +func (_c *Client_GetRevert_Call) Run(run func(_a0 context.Context, _a1 git.GetRevertArgs)) *Client_GetRevert_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetRevertArgs)) + }) + return _c +} + +func (_c *Client_GetRevert_Call) Return(_a0 *git.GitRevert, _a1 error) *Client_GetRevert_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetRevert_Call) RunAndReturn(run func(context.Context, git.GetRevertArgs) (*git.GitRevert, error)) *Client_GetRevert_Call { + _c.Call.Return(run) + return _c +} + // GetRevertForRefName provides a mock function with given fields: _a0, _a1 func (_m *Client) GetRevertForRefName(_a0 context.Context, _a1 git.GetRevertForRefNameArgs) (*git.GitRevert, error) { ret := _m.Called(_a0, _a1) @@ -2858,6 +5708,35 @@ func (_m *Client) GetRevertForRefName(_a0 context.Context, _a1 git.GetRevertForR return r0, r1 } +// Client_GetRevertForRefName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRevertForRefName' +type Client_GetRevertForRefName_Call struct { + *mock.Call +} + +// GetRevertForRefName is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetRevertForRefNameArgs +func (_e *Client_Expecter) GetRevertForRefName(_a0 interface{}, _a1 interface{}) *Client_GetRevertForRefName_Call { + return &Client_GetRevertForRefName_Call{Call: _e.mock.On("GetRevertForRefName", _a0, _a1)} +} + +func (_c *Client_GetRevertForRefName_Call) Run(run func(_a0 context.Context, _a1 git.GetRevertForRefNameArgs)) *Client_GetRevertForRefName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetRevertForRefNameArgs)) + }) + return _c +} + +func (_c *Client_GetRevertForRefName_Call) Return(_a0 *git.GitRevert, _a1 error) *Client_GetRevertForRefName_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetRevertForRefName_Call) RunAndReturn(run func(context.Context, git.GetRevertForRefNameArgs) (*git.GitRevert, error)) *Client_GetRevertForRefName_Call { + _c.Call.Return(run) + return _c +} + // GetStatuses provides a mock function with given fields: _a0, _a1 func (_m *Client) GetStatuses(_a0 context.Context, _a1 git.GetStatusesArgs) (*[]git.GitStatus, error) { ret := _m.Called(_a0, _a1) @@ -2888,6 +5767,35 @@ func (_m *Client) GetStatuses(_a0 context.Context, _a1 git.GetStatusesArgs) (*[] return r0, r1 } +// Client_GetStatuses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatuses' +type Client_GetStatuses_Call struct { + *mock.Call +} + +// GetStatuses is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetStatusesArgs +func (_e *Client_Expecter) GetStatuses(_a0 interface{}, _a1 interface{}) *Client_GetStatuses_Call { + return &Client_GetStatuses_Call{Call: _e.mock.On("GetStatuses", _a0, _a1)} +} + +func (_c *Client_GetStatuses_Call) Run(run func(_a0 context.Context, _a1 git.GetStatusesArgs)) *Client_GetStatuses_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetStatusesArgs)) + }) + return _c +} + +func (_c *Client_GetStatuses_Call) Return(_a0 *[]git.GitStatus, _a1 error) *Client_GetStatuses_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetStatuses_Call) RunAndReturn(run func(context.Context, git.GetStatusesArgs) (*[]git.GitStatus, error)) *Client_GetStatuses_Call { + _c.Call.Return(run) + return _c +} + // GetSuggestions provides a mock function with given fields: _a0, _a1 func (_m *Client) GetSuggestions(_a0 context.Context, _a1 git.GetSuggestionsArgs) (*[]git.GitSuggestion, error) { ret := _m.Called(_a0, _a1) @@ -2918,6 +5826,35 @@ func (_m *Client) GetSuggestions(_a0 context.Context, _a1 git.GetSuggestionsArgs return r0, r1 } +// Client_GetSuggestions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSuggestions' +type Client_GetSuggestions_Call struct { + *mock.Call +} + +// GetSuggestions is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetSuggestionsArgs +func (_e *Client_Expecter) GetSuggestions(_a0 interface{}, _a1 interface{}) *Client_GetSuggestions_Call { + return &Client_GetSuggestions_Call{Call: _e.mock.On("GetSuggestions", _a0, _a1)} +} + +func (_c *Client_GetSuggestions_Call) Run(run func(_a0 context.Context, _a1 git.GetSuggestionsArgs)) *Client_GetSuggestions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetSuggestionsArgs)) + }) + return _c +} + +func (_c *Client_GetSuggestions_Call) Return(_a0 *[]git.GitSuggestion, _a1 error) *Client_GetSuggestions_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetSuggestions_Call) RunAndReturn(run func(context.Context, git.GetSuggestionsArgs) (*[]git.GitSuggestion, error)) *Client_GetSuggestions_Call { + _c.Call.Return(run) + return _c +} + // GetThreads provides a mock function with given fields: _a0, _a1 func (_m *Client) GetThreads(_a0 context.Context, _a1 git.GetThreadsArgs) (*[]git.GitPullRequestCommentThread, error) { ret := _m.Called(_a0, _a1) @@ -2948,6 +5885,35 @@ func (_m *Client) GetThreads(_a0 context.Context, _a1 git.GetThreadsArgs) (*[]gi return r0, r1 } +// Client_GetThreads_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetThreads' +type Client_GetThreads_Call struct { + *mock.Call +} + +// GetThreads is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetThreadsArgs +func (_e *Client_Expecter) GetThreads(_a0 interface{}, _a1 interface{}) *Client_GetThreads_Call { + return &Client_GetThreads_Call{Call: _e.mock.On("GetThreads", _a0, _a1)} +} + +func (_c *Client_GetThreads_Call) Run(run func(_a0 context.Context, _a1 git.GetThreadsArgs)) *Client_GetThreads_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetThreadsArgs)) + }) + return _c +} + +func (_c *Client_GetThreads_Call) Return(_a0 *[]git.GitPullRequestCommentThread, _a1 error) *Client_GetThreads_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetThreads_Call) RunAndReturn(run func(context.Context, git.GetThreadsArgs) (*[]git.GitPullRequestCommentThread, error)) *Client_GetThreads_Call { + _c.Call.Return(run) + return _c +} + // GetTree provides a mock function with given fields: _a0, _a1 func (_m *Client) GetTree(_a0 context.Context, _a1 git.GetTreeArgs) (*git.GitTreeRef, error) { ret := _m.Called(_a0, _a1) @@ -2978,6 +5944,35 @@ func (_m *Client) GetTree(_a0 context.Context, _a1 git.GetTreeArgs) (*git.GitTre return r0, r1 } +// Client_GetTree_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTree' +type Client_GetTree_Call struct { + *mock.Call +} + +// GetTree is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetTreeArgs +func (_e *Client_Expecter) GetTree(_a0 interface{}, _a1 interface{}) *Client_GetTree_Call { + return &Client_GetTree_Call{Call: _e.mock.On("GetTree", _a0, _a1)} +} + +func (_c *Client_GetTree_Call) Run(run func(_a0 context.Context, _a1 git.GetTreeArgs)) *Client_GetTree_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetTreeArgs)) + }) + return _c +} + +func (_c *Client_GetTree_Call) Return(_a0 *git.GitTreeRef, _a1 error) *Client_GetTree_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetTree_Call) RunAndReturn(run func(context.Context, git.GetTreeArgs) (*git.GitTreeRef, error)) *Client_GetTree_Call { + _c.Call.Return(run) + return _c +} + // GetTreeZip provides a mock function with given fields: _a0, _a1 func (_m *Client) GetTreeZip(_a0 context.Context, _a1 git.GetTreeZipArgs) (io.ReadCloser, error) { ret := _m.Called(_a0, _a1) @@ -3008,6 +6003,35 @@ func (_m *Client) GetTreeZip(_a0 context.Context, _a1 git.GetTreeZipArgs) (io.Re return r0, r1 } +// Client_GetTreeZip_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTreeZip' +type Client_GetTreeZip_Call struct { + *mock.Call +} + +// GetTreeZip is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.GetTreeZipArgs +func (_e *Client_Expecter) GetTreeZip(_a0 interface{}, _a1 interface{}) *Client_GetTreeZip_Call { + return &Client_GetTreeZip_Call{Call: _e.mock.On("GetTreeZip", _a0, _a1)} +} + +func (_c *Client_GetTreeZip_Call) Run(run func(_a0 context.Context, _a1 git.GetTreeZipArgs)) *Client_GetTreeZip_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.GetTreeZipArgs)) + }) + return _c +} + +func (_c *Client_GetTreeZip_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetTreeZip_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetTreeZip_Call) RunAndReturn(run func(context.Context, git.GetTreeZipArgs) (io.ReadCloser, error)) *Client_GetTreeZip_Call { + _c.Call.Return(run) + return _c +} + // QueryImportRequests provides a mock function with given fields: _a0, _a1 func (_m *Client) QueryImportRequests(_a0 context.Context, _a1 git.QueryImportRequestsArgs) (*[]git.GitImportRequest, error) { ret := _m.Called(_a0, _a1) @@ -3038,6 +6062,35 @@ func (_m *Client) QueryImportRequests(_a0 context.Context, _a1 git.QueryImportRe return r0, r1 } +// Client_QueryImportRequests_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryImportRequests' +type Client_QueryImportRequests_Call struct { + *mock.Call +} + +// QueryImportRequests is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.QueryImportRequestsArgs +func (_e *Client_Expecter) QueryImportRequests(_a0 interface{}, _a1 interface{}) *Client_QueryImportRequests_Call { + return &Client_QueryImportRequests_Call{Call: _e.mock.On("QueryImportRequests", _a0, _a1)} +} + +func (_c *Client_QueryImportRequests_Call) Run(run func(_a0 context.Context, _a1 git.QueryImportRequestsArgs)) *Client_QueryImportRequests_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.QueryImportRequestsArgs)) + }) + return _c +} + +func (_c *Client_QueryImportRequests_Call) Return(_a0 *[]git.GitImportRequest, _a1 error) *Client_QueryImportRequests_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_QueryImportRequests_Call) RunAndReturn(run func(context.Context, git.QueryImportRequestsArgs) (*[]git.GitImportRequest, error)) *Client_QueryImportRequests_Call { + _c.Call.Return(run) + return _c +} + // RestoreRepositoryFromRecycleBin provides a mock function with given fields: _a0, _a1 func (_m *Client) RestoreRepositoryFromRecycleBin(_a0 context.Context, _a1 git.RestoreRepositoryFromRecycleBinArgs) (*git.GitRepository, error) { ret := _m.Called(_a0, _a1) @@ -3068,6 +6121,35 @@ func (_m *Client) RestoreRepositoryFromRecycleBin(_a0 context.Context, _a1 git.R return r0, r1 } +// Client_RestoreRepositoryFromRecycleBin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestoreRepositoryFromRecycleBin' +type Client_RestoreRepositoryFromRecycleBin_Call struct { + *mock.Call +} + +// RestoreRepositoryFromRecycleBin is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.RestoreRepositoryFromRecycleBinArgs +func (_e *Client_Expecter) RestoreRepositoryFromRecycleBin(_a0 interface{}, _a1 interface{}) *Client_RestoreRepositoryFromRecycleBin_Call { + return &Client_RestoreRepositoryFromRecycleBin_Call{Call: _e.mock.On("RestoreRepositoryFromRecycleBin", _a0, _a1)} +} + +func (_c *Client_RestoreRepositoryFromRecycleBin_Call) Run(run func(_a0 context.Context, _a1 git.RestoreRepositoryFromRecycleBinArgs)) *Client_RestoreRepositoryFromRecycleBin_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.RestoreRepositoryFromRecycleBinArgs)) + }) + return _c +} + +func (_c *Client_RestoreRepositoryFromRecycleBin_Call) Return(_a0 *git.GitRepository, _a1 error) *Client_RestoreRepositoryFromRecycleBin_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_RestoreRepositoryFromRecycleBin_Call) RunAndReturn(run func(context.Context, git.RestoreRepositoryFromRecycleBinArgs) (*git.GitRepository, error)) *Client_RestoreRepositoryFromRecycleBin_Call { + _c.Call.Return(run) + return _c +} + // SharePullRequest provides a mock function with given fields: _a0, _a1 func (_m *Client) SharePullRequest(_a0 context.Context, _a1 git.SharePullRequestArgs) error { ret := _m.Called(_a0, _a1) @@ -3086,6 +6168,35 @@ func (_m *Client) SharePullRequest(_a0 context.Context, _a1 git.SharePullRequest return r0 } +// Client_SharePullRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SharePullRequest' +type Client_SharePullRequest_Call struct { + *mock.Call +} + +// SharePullRequest is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.SharePullRequestArgs +func (_e *Client_Expecter) SharePullRequest(_a0 interface{}, _a1 interface{}) *Client_SharePullRequest_Call { + return &Client_SharePullRequest_Call{Call: _e.mock.On("SharePullRequest", _a0, _a1)} +} + +func (_c *Client_SharePullRequest_Call) Run(run func(_a0 context.Context, _a1 git.SharePullRequestArgs)) *Client_SharePullRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.SharePullRequestArgs)) + }) + return _c +} + +func (_c *Client_SharePullRequest_Call) Return(_a0 error) *Client_SharePullRequest_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_SharePullRequest_Call) RunAndReturn(run func(context.Context, git.SharePullRequestArgs) error) *Client_SharePullRequest_Call { + _c.Call.Return(run) + return _c +} + // UpdateComment provides a mock function with given fields: _a0, _a1 func (_m *Client) UpdateComment(_a0 context.Context, _a1 git.UpdateCommentArgs) (*git.Comment, error) { ret := _m.Called(_a0, _a1) @@ -3116,6 +6227,35 @@ func (_m *Client) UpdateComment(_a0 context.Context, _a1 git.UpdateCommentArgs) return r0, r1 } +// Client_UpdateComment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateComment' +type Client_UpdateComment_Call struct { + *mock.Call +} + +// UpdateComment is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.UpdateCommentArgs +func (_e *Client_Expecter) UpdateComment(_a0 interface{}, _a1 interface{}) *Client_UpdateComment_Call { + return &Client_UpdateComment_Call{Call: _e.mock.On("UpdateComment", _a0, _a1)} +} + +func (_c *Client_UpdateComment_Call) Run(run func(_a0 context.Context, _a1 git.UpdateCommentArgs)) *Client_UpdateComment_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.UpdateCommentArgs)) + }) + return _c +} + +func (_c *Client_UpdateComment_Call) Return(_a0 *git.Comment, _a1 error) *Client_UpdateComment_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_UpdateComment_Call) RunAndReturn(run func(context.Context, git.UpdateCommentArgs) (*git.Comment, error)) *Client_UpdateComment_Call { + _c.Call.Return(run) + return _c +} + // UpdateImportRequest provides a mock function with given fields: _a0, _a1 func (_m *Client) UpdateImportRequest(_a0 context.Context, _a1 git.UpdateImportRequestArgs) (*git.GitImportRequest, error) { ret := _m.Called(_a0, _a1) @@ -3146,6 +6286,35 @@ func (_m *Client) UpdateImportRequest(_a0 context.Context, _a1 git.UpdateImportR return r0, r1 } +// Client_UpdateImportRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateImportRequest' +type Client_UpdateImportRequest_Call struct { + *mock.Call +} + +// UpdateImportRequest is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.UpdateImportRequestArgs +func (_e *Client_Expecter) UpdateImportRequest(_a0 interface{}, _a1 interface{}) *Client_UpdateImportRequest_Call { + return &Client_UpdateImportRequest_Call{Call: _e.mock.On("UpdateImportRequest", _a0, _a1)} +} + +func (_c *Client_UpdateImportRequest_Call) Run(run func(_a0 context.Context, _a1 git.UpdateImportRequestArgs)) *Client_UpdateImportRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.UpdateImportRequestArgs)) + }) + return _c +} + +func (_c *Client_UpdateImportRequest_Call) Return(_a0 *git.GitImportRequest, _a1 error) *Client_UpdateImportRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_UpdateImportRequest_Call) RunAndReturn(run func(context.Context, git.UpdateImportRequestArgs) (*git.GitImportRequest, error)) *Client_UpdateImportRequest_Call { + _c.Call.Return(run) + return _c +} + // UpdatePullRequest provides a mock function with given fields: _a0, _a1 func (_m *Client) UpdatePullRequest(_a0 context.Context, _a1 git.UpdatePullRequestArgs) (*git.GitPullRequest, error) { ret := _m.Called(_a0, _a1) @@ -3176,6 +6345,35 @@ func (_m *Client) UpdatePullRequest(_a0 context.Context, _a1 git.UpdatePullReque return r0, r1 } +// Client_UpdatePullRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePullRequest' +type Client_UpdatePullRequest_Call struct { + *mock.Call +} + +// UpdatePullRequest is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.UpdatePullRequestArgs +func (_e *Client_Expecter) UpdatePullRequest(_a0 interface{}, _a1 interface{}) *Client_UpdatePullRequest_Call { + return &Client_UpdatePullRequest_Call{Call: _e.mock.On("UpdatePullRequest", _a0, _a1)} +} + +func (_c *Client_UpdatePullRequest_Call) Run(run func(_a0 context.Context, _a1 git.UpdatePullRequestArgs)) *Client_UpdatePullRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.UpdatePullRequestArgs)) + }) + return _c +} + +func (_c *Client_UpdatePullRequest_Call) Return(_a0 *git.GitPullRequest, _a1 error) *Client_UpdatePullRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_UpdatePullRequest_Call) RunAndReturn(run func(context.Context, git.UpdatePullRequestArgs) (*git.GitPullRequest, error)) *Client_UpdatePullRequest_Call { + _c.Call.Return(run) + return _c +} + // UpdatePullRequestIterationStatuses provides a mock function with given fields: _a0, _a1 func (_m *Client) UpdatePullRequestIterationStatuses(_a0 context.Context, _a1 git.UpdatePullRequestIterationStatusesArgs) error { ret := _m.Called(_a0, _a1) @@ -3194,6 +6392,35 @@ func (_m *Client) UpdatePullRequestIterationStatuses(_a0 context.Context, _a1 gi return r0 } +// Client_UpdatePullRequestIterationStatuses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePullRequestIterationStatuses' +type Client_UpdatePullRequestIterationStatuses_Call struct { + *mock.Call +} + +// UpdatePullRequestIterationStatuses is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.UpdatePullRequestIterationStatusesArgs +func (_e *Client_Expecter) UpdatePullRequestIterationStatuses(_a0 interface{}, _a1 interface{}) *Client_UpdatePullRequestIterationStatuses_Call { + return &Client_UpdatePullRequestIterationStatuses_Call{Call: _e.mock.On("UpdatePullRequestIterationStatuses", _a0, _a1)} +} + +func (_c *Client_UpdatePullRequestIterationStatuses_Call) Run(run func(_a0 context.Context, _a1 git.UpdatePullRequestIterationStatusesArgs)) *Client_UpdatePullRequestIterationStatuses_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.UpdatePullRequestIterationStatusesArgs)) + }) + return _c +} + +func (_c *Client_UpdatePullRequestIterationStatuses_Call) Return(_a0 error) *Client_UpdatePullRequestIterationStatuses_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_UpdatePullRequestIterationStatuses_Call) RunAndReturn(run func(context.Context, git.UpdatePullRequestIterationStatusesArgs) error) *Client_UpdatePullRequestIterationStatuses_Call { + _c.Call.Return(run) + return _c +} + // UpdatePullRequestProperties provides a mock function with given fields: _a0, _a1 func (_m *Client) UpdatePullRequestProperties(_a0 context.Context, _a1 git.UpdatePullRequestPropertiesArgs) (interface{}, error) { ret := _m.Called(_a0, _a1) @@ -3224,6 +6451,35 @@ func (_m *Client) UpdatePullRequestProperties(_a0 context.Context, _a1 git.Updat return r0, r1 } +// Client_UpdatePullRequestProperties_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePullRequestProperties' +type Client_UpdatePullRequestProperties_Call struct { + *mock.Call +} + +// UpdatePullRequestProperties is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.UpdatePullRequestPropertiesArgs +func (_e *Client_Expecter) UpdatePullRequestProperties(_a0 interface{}, _a1 interface{}) *Client_UpdatePullRequestProperties_Call { + return &Client_UpdatePullRequestProperties_Call{Call: _e.mock.On("UpdatePullRequestProperties", _a0, _a1)} +} + +func (_c *Client_UpdatePullRequestProperties_Call) Run(run func(_a0 context.Context, _a1 git.UpdatePullRequestPropertiesArgs)) *Client_UpdatePullRequestProperties_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.UpdatePullRequestPropertiesArgs)) + }) + return _c +} + +func (_c *Client_UpdatePullRequestProperties_Call) Return(_a0 interface{}, _a1 error) *Client_UpdatePullRequestProperties_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_UpdatePullRequestProperties_Call) RunAndReturn(run func(context.Context, git.UpdatePullRequestPropertiesArgs) (interface{}, error)) *Client_UpdatePullRequestProperties_Call { + _c.Call.Return(run) + return _c +} + // UpdatePullRequestReviewer provides a mock function with given fields: _a0, _a1 func (_m *Client) UpdatePullRequestReviewer(_a0 context.Context, _a1 git.UpdatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error) { ret := _m.Called(_a0, _a1) @@ -3254,6 +6510,35 @@ func (_m *Client) UpdatePullRequestReviewer(_a0 context.Context, _a1 git.UpdateP return r0, r1 } +// Client_UpdatePullRequestReviewer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePullRequestReviewer' +type Client_UpdatePullRequestReviewer_Call struct { + *mock.Call +} + +// UpdatePullRequestReviewer is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.UpdatePullRequestReviewerArgs +func (_e *Client_Expecter) UpdatePullRequestReviewer(_a0 interface{}, _a1 interface{}) *Client_UpdatePullRequestReviewer_Call { + return &Client_UpdatePullRequestReviewer_Call{Call: _e.mock.On("UpdatePullRequestReviewer", _a0, _a1)} +} + +func (_c *Client_UpdatePullRequestReviewer_Call) Run(run func(_a0 context.Context, _a1 git.UpdatePullRequestReviewerArgs)) *Client_UpdatePullRequestReviewer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.UpdatePullRequestReviewerArgs)) + }) + return _c +} + +func (_c *Client_UpdatePullRequestReviewer_Call) Return(_a0 *git.IdentityRefWithVote, _a1 error) *Client_UpdatePullRequestReviewer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_UpdatePullRequestReviewer_Call) RunAndReturn(run func(context.Context, git.UpdatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error)) *Client_UpdatePullRequestReviewer_Call { + _c.Call.Return(run) + return _c +} + // UpdatePullRequestReviewers provides a mock function with given fields: _a0, _a1 func (_m *Client) UpdatePullRequestReviewers(_a0 context.Context, _a1 git.UpdatePullRequestReviewersArgs) error { ret := _m.Called(_a0, _a1) @@ -3272,6 +6557,35 @@ func (_m *Client) UpdatePullRequestReviewers(_a0 context.Context, _a1 git.Update return r0 } +// Client_UpdatePullRequestReviewers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePullRequestReviewers' +type Client_UpdatePullRequestReviewers_Call struct { + *mock.Call +} + +// UpdatePullRequestReviewers is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.UpdatePullRequestReviewersArgs +func (_e *Client_Expecter) UpdatePullRequestReviewers(_a0 interface{}, _a1 interface{}) *Client_UpdatePullRequestReviewers_Call { + return &Client_UpdatePullRequestReviewers_Call{Call: _e.mock.On("UpdatePullRequestReviewers", _a0, _a1)} +} + +func (_c *Client_UpdatePullRequestReviewers_Call) Run(run func(_a0 context.Context, _a1 git.UpdatePullRequestReviewersArgs)) *Client_UpdatePullRequestReviewers_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.UpdatePullRequestReviewersArgs)) + }) + return _c +} + +func (_c *Client_UpdatePullRequestReviewers_Call) Return(_a0 error) *Client_UpdatePullRequestReviewers_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_UpdatePullRequestReviewers_Call) RunAndReturn(run func(context.Context, git.UpdatePullRequestReviewersArgs) error) *Client_UpdatePullRequestReviewers_Call { + _c.Call.Return(run) + return _c +} + // UpdatePullRequestStatuses provides a mock function with given fields: _a0, _a1 func (_m *Client) UpdatePullRequestStatuses(_a0 context.Context, _a1 git.UpdatePullRequestStatusesArgs) error { ret := _m.Called(_a0, _a1) @@ -3290,6 +6604,35 @@ func (_m *Client) UpdatePullRequestStatuses(_a0 context.Context, _a1 git.UpdateP return r0 } +// Client_UpdatePullRequestStatuses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePullRequestStatuses' +type Client_UpdatePullRequestStatuses_Call struct { + *mock.Call +} + +// UpdatePullRequestStatuses is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.UpdatePullRequestStatusesArgs +func (_e *Client_Expecter) UpdatePullRequestStatuses(_a0 interface{}, _a1 interface{}) *Client_UpdatePullRequestStatuses_Call { + return &Client_UpdatePullRequestStatuses_Call{Call: _e.mock.On("UpdatePullRequestStatuses", _a0, _a1)} +} + +func (_c *Client_UpdatePullRequestStatuses_Call) Run(run func(_a0 context.Context, _a1 git.UpdatePullRequestStatusesArgs)) *Client_UpdatePullRequestStatuses_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.UpdatePullRequestStatusesArgs)) + }) + return _c +} + +func (_c *Client_UpdatePullRequestStatuses_Call) Return(_a0 error) *Client_UpdatePullRequestStatuses_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_UpdatePullRequestStatuses_Call) RunAndReturn(run func(context.Context, git.UpdatePullRequestStatusesArgs) error) *Client_UpdatePullRequestStatuses_Call { + _c.Call.Return(run) + return _c +} + // UpdateRef provides a mock function with given fields: _a0, _a1 func (_m *Client) UpdateRef(_a0 context.Context, _a1 git.UpdateRefArgs) (*git.GitRef, error) { ret := _m.Called(_a0, _a1) @@ -3320,6 +6663,35 @@ func (_m *Client) UpdateRef(_a0 context.Context, _a1 git.UpdateRefArgs) (*git.Gi return r0, r1 } +// Client_UpdateRef_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRef' +type Client_UpdateRef_Call struct { + *mock.Call +} + +// UpdateRef is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.UpdateRefArgs +func (_e *Client_Expecter) UpdateRef(_a0 interface{}, _a1 interface{}) *Client_UpdateRef_Call { + return &Client_UpdateRef_Call{Call: _e.mock.On("UpdateRef", _a0, _a1)} +} + +func (_c *Client_UpdateRef_Call) Run(run func(_a0 context.Context, _a1 git.UpdateRefArgs)) *Client_UpdateRef_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.UpdateRefArgs)) + }) + return _c +} + +func (_c *Client_UpdateRef_Call) Return(_a0 *git.GitRef, _a1 error) *Client_UpdateRef_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_UpdateRef_Call) RunAndReturn(run func(context.Context, git.UpdateRefArgs) (*git.GitRef, error)) *Client_UpdateRef_Call { + _c.Call.Return(run) + return _c +} + // UpdateRefs provides a mock function with given fields: _a0, _a1 func (_m *Client) UpdateRefs(_a0 context.Context, _a1 git.UpdateRefsArgs) (*[]git.GitRefUpdateResult, error) { ret := _m.Called(_a0, _a1) @@ -3350,6 +6722,35 @@ func (_m *Client) UpdateRefs(_a0 context.Context, _a1 git.UpdateRefsArgs) (*[]gi return r0, r1 } +// Client_UpdateRefs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRefs' +type Client_UpdateRefs_Call struct { + *mock.Call +} + +// UpdateRefs is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.UpdateRefsArgs +func (_e *Client_Expecter) UpdateRefs(_a0 interface{}, _a1 interface{}) *Client_UpdateRefs_Call { + return &Client_UpdateRefs_Call{Call: _e.mock.On("UpdateRefs", _a0, _a1)} +} + +func (_c *Client_UpdateRefs_Call) Run(run func(_a0 context.Context, _a1 git.UpdateRefsArgs)) *Client_UpdateRefs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.UpdateRefsArgs)) + }) + return _c +} + +func (_c *Client_UpdateRefs_Call) Return(_a0 *[]git.GitRefUpdateResult, _a1 error) *Client_UpdateRefs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_UpdateRefs_Call) RunAndReturn(run func(context.Context, git.UpdateRefsArgs) (*[]git.GitRefUpdateResult, error)) *Client_UpdateRefs_Call { + _c.Call.Return(run) + return _c +} + // UpdateRepository provides a mock function with given fields: _a0, _a1 func (_m *Client) UpdateRepository(_a0 context.Context, _a1 git.UpdateRepositoryArgs) (*git.GitRepository, error) { ret := _m.Called(_a0, _a1) @@ -3380,6 +6781,35 @@ func (_m *Client) UpdateRepository(_a0 context.Context, _a1 git.UpdateRepository return r0, r1 } +// Client_UpdateRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRepository' +type Client_UpdateRepository_Call struct { + *mock.Call +} + +// UpdateRepository is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.UpdateRepositoryArgs +func (_e *Client_Expecter) UpdateRepository(_a0 interface{}, _a1 interface{}) *Client_UpdateRepository_Call { + return &Client_UpdateRepository_Call{Call: _e.mock.On("UpdateRepository", _a0, _a1)} +} + +func (_c *Client_UpdateRepository_Call) Run(run func(_a0 context.Context, _a1 git.UpdateRepositoryArgs)) *Client_UpdateRepository_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.UpdateRepositoryArgs)) + }) + return _c +} + +func (_c *Client_UpdateRepository_Call) Return(_a0 *git.GitRepository, _a1 error) *Client_UpdateRepository_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_UpdateRepository_Call) RunAndReturn(run func(context.Context, git.UpdateRepositoryArgs) (*git.GitRepository, error)) *Client_UpdateRepository_Call { + _c.Call.Return(run) + return _c +} + // UpdateThread provides a mock function with given fields: _a0, _a1 func (_m *Client) UpdateThread(_a0 context.Context, _a1 git.UpdateThreadArgs) (*git.GitPullRequestCommentThread, error) { ret := _m.Called(_a0, _a1) @@ -3410,6 +6840,35 @@ func (_m *Client) UpdateThread(_a0 context.Context, _a1 git.UpdateThreadArgs) (* return r0, r1 } +// Client_UpdateThread_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateThread' +type Client_UpdateThread_Call struct { + *mock.Call +} + +// UpdateThread is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 git.UpdateThreadArgs +func (_e *Client_Expecter) UpdateThread(_a0 interface{}, _a1 interface{}) *Client_UpdateThread_Call { + return &Client_UpdateThread_Call{Call: _e.mock.On("UpdateThread", _a0, _a1)} +} + +func (_c *Client_UpdateThread_Call) Run(run func(_a0 context.Context, _a1 git.UpdateThreadArgs)) *Client_UpdateThread_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(git.UpdateThreadArgs)) + }) + return _c +} + +func (_c *Client_UpdateThread_Call) Return(_a0 *git.GitPullRequestCommentThread, _a1 error) *Client_UpdateThread_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_UpdateThread_Call) RunAndReturn(run func(context.Context, git.UpdateThreadArgs) (*git.GitPullRequestCommentThread, error)) *Client_UpdateThread_Call { + _c.Call.Return(run) + return _c +} + // NewClient creates a new instance of Client. 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 NewClient(t interface { diff --git a/applicationset/utils/mocks/Renderer.go b/applicationset/utils/mocks/Renderer.go index 35767df6f97ee..40d39c8c0b3c8 100644 --- a/applicationset/utils/mocks/Renderer.go +++ b/applicationset/utils/mocks/Renderer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -13,8 +13,16 @@ type Renderer struct { mock.Mock } +type Renderer_Expecter struct { + mock *mock.Mock +} + +func (_m *Renderer) EXPECT() *Renderer_Expecter { + return &Renderer_Expecter{mock: &_m.Mock} +} + // RenderTemplateParams provides a mock function with given fields: tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions -func (_m *Renderer) RenderTemplateParams(tmpl *v1alpha1.Application, syncPolicy *v1alpha1.ApplicationSetSyncPolicy, params map[string]interface{}, useGoTemplate bool, goTemplateOptions []string) (*v1alpha1.Application, error) { +func (_m *Renderer) RenderTemplateParams(tmpl *v1alpha1.Application, syncPolicy *v1alpha1.ApplicationSetSyncPolicy, params map[string]any, useGoTemplate bool, goTemplateOptions []string) (*v1alpha1.Application, error) { ret := _m.Called(tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions) if len(ret) == 0 { @@ -23,10 +31,10 @@ func (_m *Renderer) RenderTemplateParams(tmpl *v1alpha1.Application, syncPolicy var r0 *v1alpha1.Application var r1 error - if rf, ok := ret.Get(0).(func(*v1alpha1.Application, *v1alpha1.ApplicationSetSyncPolicy, map[string]interface{}, bool, []string) (*v1alpha1.Application, error)); ok { + if rf, ok := ret.Get(0).(func(*v1alpha1.Application, *v1alpha1.ApplicationSetSyncPolicy, map[string]any, bool, []string) (*v1alpha1.Application, error)); ok { return rf(tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions) } - if rf, ok := ret.Get(0).(func(*v1alpha1.Application, *v1alpha1.ApplicationSetSyncPolicy, map[string]interface{}, bool, []string) *v1alpha1.Application); ok { + if rf, ok := ret.Get(0).(func(*v1alpha1.Application, *v1alpha1.ApplicationSetSyncPolicy, map[string]any, bool, []string) *v1alpha1.Application); ok { r0 = rf(tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions) } else { if ret.Get(0) != nil { @@ -34,7 +42,7 @@ func (_m *Renderer) RenderTemplateParams(tmpl *v1alpha1.Application, syncPolicy } } - if rf, ok := ret.Get(1).(func(*v1alpha1.Application, *v1alpha1.ApplicationSetSyncPolicy, map[string]interface{}, bool, []string) error); ok { + if rf, ok := ret.Get(1).(func(*v1alpha1.Application, *v1alpha1.ApplicationSetSyncPolicy, map[string]any, bool, []string) error); ok { r1 = rf(tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions) } else { r1 = ret.Error(1) @@ -43,8 +51,40 @@ func (_m *Renderer) RenderTemplateParams(tmpl *v1alpha1.Application, syncPolicy return r0, r1 } +// Renderer_RenderTemplateParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RenderTemplateParams' +type Renderer_RenderTemplateParams_Call struct { + *mock.Call +} + +// RenderTemplateParams is a helper method to define mock.On call +// - tmpl *v1alpha1.Application +// - syncPolicy *v1alpha1.ApplicationSetSyncPolicy +// - params map[string]any +// - useGoTemplate bool +// - goTemplateOptions []string +func (_e *Renderer_Expecter) RenderTemplateParams(tmpl interface{}, syncPolicy interface{}, params interface{}, useGoTemplate interface{}, goTemplateOptions interface{}) *Renderer_RenderTemplateParams_Call { + return &Renderer_RenderTemplateParams_Call{Call: _e.mock.On("RenderTemplateParams", tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions)} +} + +func (_c *Renderer_RenderTemplateParams_Call) Run(run func(tmpl *v1alpha1.Application, syncPolicy *v1alpha1.ApplicationSetSyncPolicy, params map[string]any, useGoTemplate bool, goTemplateOptions []string)) *Renderer_RenderTemplateParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*v1alpha1.Application), args[1].(*v1alpha1.ApplicationSetSyncPolicy), args[2].(map[string]any), args[3].(bool), args[4].([]string)) + }) + return _c +} + +func (_c *Renderer_RenderTemplateParams_Call) Return(_a0 *v1alpha1.Application, _a1 error) *Renderer_RenderTemplateParams_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Renderer_RenderTemplateParams_Call) RunAndReturn(run func(*v1alpha1.Application, *v1alpha1.ApplicationSetSyncPolicy, map[string]any, bool, []string) (*v1alpha1.Application, error)) *Renderer_RenderTemplateParams_Call { + _c.Call.Return(run) + return _c +} + // Replace provides a mock function with given fields: tmpl, replaceMap, useGoTemplate, goTemplateOptions -func (_m *Renderer) Replace(tmpl string, replaceMap map[string]interface{}, useGoTemplate bool, goTemplateOptions []string) (string, error) { +func (_m *Renderer) Replace(tmpl string, replaceMap map[string]any, useGoTemplate bool, goTemplateOptions []string) (string, error) { ret := _m.Called(tmpl, replaceMap, useGoTemplate, goTemplateOptions) if len(ret) == 0 { @@ -53,16 +93,16 @@ func (_m *Renderer) Replace(tmpl string, replaceMap map[string]interface{}, useG var r0 string var r1 error - if rf, ok := ret.Get(0).(func(string, map[string]interface{}, bool, []string) (string, error)); ok { + if rf, ok := ret.Get(0).(func(string, map[string]any, bool, []string) (string, error)); ok { return rf(tmpl, replaceMap, useGoTemplate, goTemplateOptions) } - if rf, ok := ret.Get(0).(func(string, map[string]interface{}, bool, []string) string); ok { + if rf, ok := ret.Get(0).(func(string, map[string]any, bool, []string) string); ok { r0 = rf(tmpl, replaceMap, useGoTemplate, goTemplateOptions) } else { r0 = ret.Get(0).(string) } - if rf, ok := ret.Get(1).(func(string, map[string]interface{}, bool, []string) error); ok { + if rf, ok := ret.Get(1).(func(string, map[string]any, bool, []string) error); ok { r1 = rf(tmpl, replaceMap, useGoTemplate, goTemplateOptions) } else { r1 = ret.Error(1) @@ -71,6 +111,37 @@ func (_m *Renderer) Replace(tmpl string, replaceMap map[string]interface{}, useG return r0, r1 } +// Renderer_Replace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Replace' +type Renderer_Replace_Call struct { + *mock.Call +} + +// Replace is a helper method to define mock.On call +// - tmpl string +// - replaceMap map[string]any +// - useGoTemplate bool +// - goTemplateOptions []string +func (_e *Renderer_Expecter) Replace(tmpl interface{}, replaceMap interface{}, useGoTemplate interface{}, goTemplateOptions interface{}) *Renderer_Replace_Call { + return &Renderer_Replace_Call{Call: _e.mock.On("Replace", tmpl, replaceMap, useGoTemplate, goTemplateOptions)} +} + +func (_c *Renderer_Replace_Call) Run(run func(tmpl string, replaceMap map[string]any, useGoTemplate bool, goTemplateOptions []string)) *Renderer_Replace_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(map[string]any), args[2].(bool), args[3].([]string)) + }) + return _c +} + +func (_c *Renderer_Replace_Call) Return(_a0 string, _a1 error) *Renderer_Replace_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Renderer_Replace_Call) RunAndReturn(run func(string, map[string]any, bool, []string) (string, error)) *Renderer_Replace_Call { + _c.Call.Return(run) + return _c +} + // NewRenderer creates a new instance of Renderer. 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 NewRenderer(t interface { diff --git a/commitserver/apiclient/mocks/Clientset.go b/commitserver/apiclient/mocks/Clientset.go index 031d7f346ee95..b2150b0930005 100644 --- a/commitserver/apiclient/mocks/Clientset.go +++ b/commitserver/apiclient/mocks/Clientset.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type Clientset struct { mock.Mock } +type Clientset_Expecter struct { + mock *mock.Mock +} + +func (_m *Clientset) EXPECT() *Clientset_Expecter { + return &Clientset_Expecter{mock: &_m.Mock} +} + // NewCommitServerClient provides a mock function with no fields func (_m *Clientset) NewCommitServerClient() (io.Closer, apiclient.CommitServiceClient, error) { ret := _m.Called() @@ -53,6 +61,33 @@ func (_m *Clientset) NewCommitServerClient() (io.Closer, apiclient.CommitService return r0, r1, r2 } +// Clientset_NewCommitServerClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewCommitServerClient' +type Clientset_NewCommitServerClient_Call struct { + *mock.Call +} + +// NewCommitServerClient is a helper method to define mock.On call +func (_e *Clientset_Expecter) NewCommitServerClient() *Clientset_NewCommitServerClient_Call { + return &Clientset_NewCommitServerClient_Call{Call: _e.mock.On("NewCommitServerClient")} +} + +func (_c *Clientset_NewCommitServerClient_Call) Run(run func()) *Clientset_NewCommitServerClient_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Clientset_NewCommitServerClient_Call) Return(_a0 io.Closer, _a1 apiclient.CommitServiceClient, _a2 error) *Clientset_NewCommitServerClient_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *Clientset_NewCommitServerClient_Call) RunAndReturn(run func() (io.Closer, apiclient.CommitServiceClient, error)) *Clientset_NewCommitServerClient_Call { + _c.Call.Return(run) + return _c +} + // NewClientset creates a new instance of Clientset. 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 NewClientset(t interface { diff --git a/commitserver/apiclient/mocks/CommitServiceClient.go b/commitserver/apiclient/mocks/CommitServiceClient.go index 347d6505fca0b..f6d3fd1daefa3 100644 --- a/commitserver/apiclient/mocks/CommitServiceClient.go +++ b/commitserver/apiclient/mocks/CommitServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type CommitServiceClient struct { mock.Mock } +type CommitServiceClient_Expecter struct { + mock *mock.Mock +} + +func (_m *CommitServiceClient) EXPECT() *CommitServiceClient_Expecter { + return &CommitServiceClient_Expecter{mock: &_m.Mock} +} + // CommitHydratedManifests provides a mock function with given fields: ctx, in, opts func (_m *CommitServiceClient) CommitHydratedManifests(ctx context.Context, in *apiclient.CommitHydratedManifestsRequest, opts ...grpc.CallOption) (*apiclient.CommitHydratedManifestsResponse, error) { _va := make([]interface{}, len(opts)) @@ -54,6 +62,43 @@ func (_m *CommitServiceClient) CommitHydratedManifests(ctx context.Context, in * return r0, r1 } +// CommitServiceClient_CommitHydratedManifests_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommitHydratedManifests' +type CommitServiceClient_CommitHydratedManifests_Call struct { + *mock.Call +} + +// CommitHydratedManifests is a helper method to define mock.On call +// - ctx context.Context +// - in *apiclient.CommitHydratedManifestsRequest +// - opts ...grpc.CallOption +func (_e *CommitServiceClient_Expecter) CommitHydratedManifests(ctx interface{}, in interface{}, opts ...interface{}) *CommitServiceClient_CommitHydratedManifests_Call { + return &CommitServiceClient_CommitHydratedManifests_Call{Call: _e.mock.On("CommitHydratedManifests", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *CommitServiceClient_CommitHydratedManifests_Call) Run(run func(ctx context.Context, in *apiclient.CommitHydratedManifestsRequest, opts ...grpc.CallOption)) *CommitServiceClient_CommitHydratedManifests_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*apiclient.CommitHydratedManifestsRequest), variadicArgs...) + }) + return _c +} + +func (_c *CommitServiceClient_CommitHydratedManifests_Call) Return(_a0 *apiclient.CommitHydratedManifestsResponse, _a1 error) *CommitServiceClient_CommitHydratedManifests_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CommitServiceClient_CommitHydratedManifests_Call) RunAndReturn(run func(context.Context, *apiclient.CommitHydratedManifestsRequest, ...grpc.CallOption) (*apiclient.CommitHydratedManifestsResponse, error)) *CommitServiceClient_CommitHydratedManifests_Call { + _c.Call.Return(run) + return _c +} + // NewCommitServiceClient creates a new instance of CommitServiceClient. 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 NewCommitServiceClient(t interface { diff --git a/commitserver/commit/mocks/RepoClientFactory.go b/commitserver/commit/mocks/RepoClientFactory.go index 58bae99918fe2..c16d118c3e5b5 100644 --- a/commitserver/commit/mocks/RepoClientFactory.go +++ b/commitserver/commit/mocks/RepoClientFactory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type RepoClientFactory struct { mock.Mock } +type RepoClientFactory_Expecter struct { + mock *mock.Mock +} + +func (_m *RepoClientFactory) EXPECT() *RepoClientFactory_Expecter { + return &RepoClientFactory_Expecter{mock: &_m.Mock} +} + // NewClient provides a mock function with given fields: repo, rootPath func (_m *RepoClientFactory) NewClient(repo *v1alpha1.Repository, rootPath string) (git.Client, error) { ret := _m.Called(repo, rootPath) @@ -44,6 +52,35 @@ func (_m *RepoClientFactory) NewClient(repo *v1alpha1.Repository, rootPath strin return r0, r1 } +// RepoClientFactory_NewClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewClient' +type RepoClientFactory_NewClient_Call struct { + *mock.Call +} + +// NewClient is a helper method to define mock.On call +// - repo *v1alpha1.Repository +// - rootPath string +func (_e *RepoClientFactory_Expecter) NewClient(repo interface{}, rootPath interface{}) *RepoClientFactory_NewClient_Call { + return &RepoClientFactory_NewClient_Call{Call: _e.mock.On("NewClient", repo, rootPath)} +} + +func (_c *RepoClientFactory_NewClient_Call) Run(run func(repo *v1alpha1.Repository, rootPath string)) *RepoClientFactory_NewClient_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*v1alpha1.Repository), args[1].(string)) + }) + return _c +} + +func (_c *RepoClientFactory_NewClient_Call) Return(_a0 git.Client, _a1 error) *RepoClientFactory_NewClient_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoClientFactory_NewClient_Call) RunAndReturn(run func(*v1alpha1.Repository, string) (git.Client, error)) *RepoClientFactory_NewClient_Call { + _c.Call.Return(run) + return _c +} + // NewRepoClientFactory creates a new instance of RepoClientFactory. 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 NewRepoClientFactory(t interface { diff --git a/controller/cache/mocks/LiveStateCache.go b/controller/cache/mocks/LiveStateCache.go index 7f556e33eb926..99148679070ac 100644 --- a/controller/cache/mocks/LiveStateCache.go +++ b/controller/cache/mocks/LiveStateCache.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -25,6 +25,14 @@ type LiveStateCache struct { mock.Mock } +type LiveStateCache_Expecter struct { + mock *mock.Mock +} + +func (_m *LiveStateCache) EXPECT() *LiveStateCache_Expecter { + return &LiveStateCache_Expecter{mock: &_m.Mock} +} + // GetClusterCache provides a mock function with given fields: server func (_m *LiveStateCache) GetClusterCache(server *v1alpha1.Cluster) (cache.ClusterCache, error) { ret := _m.Called(server) @@ -55,6 +63,34 @@ func (_m *LiveStateCache) GetClusterCache(server *v1alpha1.Cluster) (cache.Clust return r0, r1 } +// LiveStateCache_GetClusterCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClusterCache' +type LiveStateCache_GetClusterCache_Call struct { + *mock.Call +} + +// GetClusterCache is a helper method to define mock.On call +// - server *v1alpha1.Cluster +func (_e *LiveStateCache_Expecter) GetClusterCache(server interface{}) *LiveStateCache_GetClusterCache_Call { + return &LiveStateCache_GetClusterCache_Call{Call: _e.mock.On("GetClusterCache", server)} +} + +func (_c *LiveStateCache_GetClusterCache_Call) Run(run func(server *v1alpha1.Cluster)) *LiveStateCache_GetClusterCache_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*v1alpha1.Cluster)) + }) + return _c +} + +func (_c *LiveStateCache_GetClusterCache_Call) Return(_a0 cache.ClusterCache, _a1 error) *LiveStateCache_GetClusterCache_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LiveStateCache_GetClusterCache_Call) RunAndReturn(run func(*v1alpha1.Cluster) (cache.ClusterCache, error)) *LiveStateCache_GetClusterCache_Call { + _c.Call.Return(run) + return _c +} + // GetClustersInfo provides a mock function with no fields func (_m *LiveStateCache) GetClustersInfo() []cache.ClusterInfo { ret := _m.Called() @@ -75,6 +111,33 @@ func (_m *LiveStateCache) GetClustersInfo() []cache.ClusterInfo { return r0 } +// LiveStateCache_GetClustersInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClustersInfo' +type LiveStateCache_GetClustersInfo_Call struct { + *mock.Call +} + +// GetClustersInfo is a helper method to define mock.On call +func (_e *LiveStateCache_Expecter) GetClustersInfo() *LiveStateCache_GetClustersInfo_Call { + return &LiveStateCache_GetClustersInfo_Call{Call: _e.mock.On("GetClustersInfo")} +} + +func (_c *LiveStateCache_GetClustersInfo_Call) Run(run func()) *LiveStateCache_GetClustersInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LiveStateCache_GetClustersInfo_Call) Return(_a0 []cache.ClusterInfo) *LiveStateCache_GetClustersInfo_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LiveStateCache_GetClustersInfo_Call) RunAndReturn(run func() []cache.ClusterInfo) *LiveStateCache_GetClustersInfo_Call { + _c.Call.Return(run) + return _c +} + // GetManagedLiveObjs provides a mock function with given fields: destCluster, a, targetObjs func (_m *LiveStateCache) GetManagedLiveObjs(destCluster *v1alpha1.Cluster, a *v1alpha1.Application, targetObjs []*unstructured.Unstructured) (map[kube.ResourceKey]*unstructured.Unstructured, error) { ret := _m.Called(destCluster, a, targetObjs) @@ -105,6 +168,36 @@ func (_m *LiveStateCache) GetManagedLiveObjs(destCluster *v1alpha1.Cluster, a *v return r0, r1 } +// LiveStateCache_GetManagedLiveObjs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetManagedLiveObjs' +type LiveStateCache_GetManagedLiveObjs_Call struct { + *mock.Call +} + +// GetManagedLiveObjs is a helper method to define mock.On call +// - destCluster *v1alpha1.Cluster +// - a *v1alpha1.Application +// - targetObjs []*unstructured.Unstructured +func (_e *LiveStateCache_Expecter) GetManagedLiveObjs(destCluster interface{}, a interface{}, targetObjs interface{}) *LiveStateCache_GetManagedLiveObjs_Call { + return &LiveStateCache_GetManagedLiveObjs_Call{Call: _e.mock.On("GetManagedLiveObjs", destCluster, a, targetObjs)} +} + +func (_c *LiveStateCache_GetManagedLiveObjs_Call) Run(run func(destCluster *v1alpha1.Cluster, a *v1alpha1.Application, targetObjs []*unstructured.Unstructured)) *LiveStateCache_GetManagedLiveObjs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*v1alpha1.Cluster), args[1].(*v1alpha1.Application), args[2].([]*unstructured.Unstructured)) + }) + return _c +} + +func (_c *LiveStateCache_GetManagedLiveObjs_Call) Return(_a0 map[kube.ResourceKey]*unstructured.Unstructured, _a1 error) *LiveStateCache_GetManagedLiveObjs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LiveStateCache_GetManagedLiveObjs_Call) RunAndReturn(run func(*v1alpha1.Cluster, *v1alpha1.Application, []*unstructured.Unstructured) (map[kube.ResourceKey]*unstructured.Unstructured, error)) *LiveStateCache_GetManagedLiveObjs_Call { + _c.Call.Return(run) + return _c +} + // GetNamespaceTopLevelResources provides a mock function with given fields: server, namespace func (_m *LiveStateCache) GetNamespaceTopLevelResources(server *v1alpha1.Cluster, namespace string) (map[kube.ResourceKey]v1alpha1.ResourceNode, error) { ret := _m.Called(server, namespace) @@ -135,6 +228,35 @@ func (_m *LiveStateCache) GetNamespaceTopLevelResources(server *v1alpha1.Cluster return r0, r1 } +// LiveStateCache_GetNamespaceTopLevelResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNamespaceTopLevelResources' +type LiveStateCache_GetNamespaceTopLevelResources_Call struct { + *mock.Call +} + +// GetNamespaceTopLevelResources is a helper method to define mock.On call +// - server *v1alpha1.Cluster +// - namespace string +func (_e *LiveStateCache_Expecter) GetNamespaceTopLevelResources(server interface{}, namespace interface{}) *LiveStateCache_GetNamespaceTopLevelResources_Call { + return &LiveStateCache_GetNamespaceTopLevelResources_Call{Call: _e.mock.On("GetNamespaceTopLevelResources", server, namespace)} +} + +func (_c *LiveStateCache_GetNamespaceTopLevelResources_Call) Run(run func(server *v1alpha1.Cluster, namespace string)) *LiveStateCache_GetNamespaceTopLevelResources_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*v1alpha1.Cluster), args[1].(string)) + }) + return _c +} + +func (_c *LiveStateCache_GetNamespaceTopLevelResources_Call) Return(_a0 map[kube.ResourceKey]v1alpha1.ResourceNode, _a1 error) *LiveStateCache_GetNamespaceTopLevelResources_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LiveStateCache_GetNamespaceTopLevelResources_Call) RunAndReturn(run func(*v1alpha1.Cluster, string) (map[kube.ResourceKey]v1alpha1.ResourceNode, error)) *LiveStateCache_GetNamespaceTopLevelResources_Call { + _c.Call.Return(run) + return _c +} + // GetVersionsInfo provides a mock function with given fields: server func (_m *LiveStateCache) GetVersionsInfo(server *v1alpha1.Cluster) (string, []kube.APIResourceInfo, error) { ret := _m.Called(server) @@ -172,6 +294,34 @@ func (_m *LiveStateCache) GetVersionsInfo(server *v1alpha1.Cluster) (string, []k return r0, r1, r2 } +// LiveStateCache_GetVersionsInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetVersionsInfo' +type LiveStateCache_GetVersionsInfo_Call struct { + *mock.Call +} + +// GetVersionsInfo is a helper method to define mock.On call +// - server *v1alpha1.Cluster +func (_e *LiveStateCache_Expecter) GetVersionsInfo(server interface{}) *LiveStateCache_GetVersionsInfo_Call { + return &LiveStateCache_GetVersionsInfo_Call{Call: _e.mock.On("GetVersionsInfo", server)} +} + +func (_c *LiveStateCache_GetVersionsInfo_Call) Run(run func(server *v1alpha1.Cluster)) *LiveStateCache_GetVersionsInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*v1alpha1.Cluster)) + }) + return _c +} + +func (_c *LiveStateCache_GetVersionsInfo_Call) Return(_a0 string, _a1 []kube.APIResourceInfo, _a2 error) *LiveStateCache_GetVersionsInfo_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *LiveStateCache_GetVersionsInfo_Call) RunAndReturn(run func(*v1alpha1.Cluster) (string, []kube.APIResourceInfo, error)) *LiveStateCache_GetVersionsInfo_Call { + _c.Call.Return(run) + return _c +} + // Init provides a mock function with no fields func (_m *LiveStateCache) Init() error { ret := _m.Called() @@ -190,6 +340,33 @@ func (_m *LiveStateCache) Init() error { return r0 } +// LiveStateCache_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init' +type LiveStateCache_Init_Call struct { + *mock.Call +} + +// Init is a helper method to define mock.On call +func (_e *LiveStateCache_Expecter) Init() *LiveStateCache_Init_Call { + return &LiveStateCache_Init_Call{Call: _e.mock.On("Init")} +} + +func (_c *LiveStateCache_Init_Call) Run(run func()) *LiveStateCache_Init_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LiveStateCache_Init_Call) Return(_a0 error) *LiveStateCache_Init_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LiveStateCache_Init_Call) RunAndReturn(run func() error) *LiveStateCache_Init_Call { + _c.Call.Return(run) + return _c +} + // IsNamespaced provides a mock function with given fields: server, gk func (_m *LiveStateCache) IsNamespaced(server *v1alpha1.Cluster, gk schema.GroupKind) (bool, error) { ret := _m.Called(server, gk) @@ -218,6 +395,35 @@ func (_m *LiveStateCache) IsNamespaced(server *v1alpha1.Cluster, gk schema.Group return r0, r1 } +// LiveStateCache_IsNamespaced_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsNamespaced' +type LiveStateCache_IsNamespaced_Call struct { + *mock.Call +} + +// IsNamespaced is a helper method to define mock.On call +// - server *v1alpha1.Cluster +// - gk schema.GroupKind +func (_e *LiveStateCache_Expecter) IsNamespaced(server interface{}, gk interface{}) *LiveStateCache_IsNamespaced_Call { + return &LiveStateCache_IsNamespaced_Call{Call: _e.mock.On("IsNamespaced", server, gk)} +} + +func (_c *LiveStateCache_IsNamespaced_Call) Run(run func(server *v1alpha1.Cluster, gk schema.GroupKind)) *LiveStateCache_IsNamespaced_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*v1alpha1.Cluster), args[1].(schema.GroupKind)) + }) + return _c +} + +func (_c *LiveStateCache_IsNamespaced_Call) Return(_a0 bool, _a1 error) *LiveStateCache_IsNamespaced_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LiveStateCache_IsNamespaced_Call) RunAndReturn(run func(*v1alpha1.Cluster, schema.GroupKind) (bool, error)) *LiveStateCache_IsNamespaced_Call { + _c.Call.Return(run) + return _c +} + // IterateHierarchy provides a mock function with given fields: server, key, action func (_m *LiveStateCache) IterateHierarchy(server *v1alpha1.Cluster, key kube.ResourceKey, action func(v1alpha1.ResourceNode, string) bool) error { ret := _m.Called(server, key, action) @@ -236,6 +442,36 @@ func (_m *LiveStateCache) IterateHierarchy(server *v1alpha1.Cluster, key kube.Re return r0 } +// LiveStateCache_IterateHierarchy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IterateHierarchy' +type LiveStateCache_IterateHierarchy_Call struct { + *mock.Call +} + +// IterateHierarchy is a helper method to define mock.On call +// - server *v1alpha1.Cluster +// - key kube.ResourceKey +// - action func(v1alpha1.ResourceNode , string) bool +func (_e *LiveStateCache_Expecter) IterateHierarchy(server interface{}, key interface{}, action interface{}) *LiveStateCache_IterateHierarchy_Call { + return &LiveStateCache_IterateHierarchy_Call{Call: _e.mock.On("IterateHierarchy", server, key, action)} +} + +func (_c *LiveStateCache_IterateHierarchy_Call) Run(run func(server *v1alpha1.Cluster, key kube.ResourceKey, action func(v1alpha1.ResourceNode, string) bool)) *LiveStateCache_IterateHierarchy_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*v1alpha1.Cluster), args[1].(kube.ResourceKey), args[2].(func(v1alpha1.ResourceNode, string) bool)) + }) + return _c +} + +func (_c *LiveStateCache_IterateHierarchy_Call) Return(_a0 error) *LiveStateCache_IterateHierarchy_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LiveStateCache_IterateHierarchy_Call) RunAndReturn(run func(*v1alpha1.Cluster, kube.ResourceKey, func(v1alpha1.ResourceNode, string) bool) error) *LiveStateCache_IterateHierarchy_Call { + _c.Call.Return(run) + return _c +} + // IterateHierarchyV2 provides a mock function with given fields: server, keys, action func (_m *LiveStateCache) IterateHierarchyV2(server *v1alpha1.Cluster, keys []kube.ResourceKey, action func(v1alpha1.ResourceNode, string) bool) error { ret := _m.Called(server, keys, action) @@ -254,6 +490,36 @@ func (_m *LiveStateCache) IterateHierarchyV2(server *v1alpha1.Cluster, keys []ku return r0 } +// LiveStateCache_IterateHierarchyV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IterateHierarchyV2' +type LiveStateCache_IterateHierarchyV2_Call struct { + *mock.Call +} + +// IterateHierarchyV2 is a helper method to define mock.On call +// - server *v1alpha1.Cluster +// - keys []kube.ResourceKey +// - action func(v1alpha1.ResourceNode , string) bool +func (_e *LiveStateCache_Expecter) IterateHierarchyV2(server interface{}, keys interface{}, action interface{}) *LiveStateCache_IterateHierarchyV2_Call { + return &LiveStateCache_IterateHierarchyV2_Call{Call: _e.mock.On("IterateHierarchyV2", server, keys, action)} +} + +func (_c *LiveStateCache_IterateHierarchyV2_Call) Run(run func(server *v1alpha1.Cluster, keys []kube.ResourceKey, action func(v1alpha1.ResourceNode, string) bool)) *LiveStateCache_IterateHierarchyV2_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*v1alpha1.Cluster), args[1].([]kube.ResourceKey), args[2].(func(v1alpha1.ResourceNode, string) bool)) + }) + return _c +} + +func (_c *LiveStateCache_IterateHierarchyV2_Call) Return(_a0 error) *LiveStateCache_IterateHierarchyV2_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LiveStateCache_IterateHierarchyV2_Call) RunAndReturn(run func(*v1alpha1.Cluster, []kube.ResourceKey, func(v1alpha1.ResourceNode, string) bool) error) *LiveStateCache_IterateHierarchyV2_Call { + _c.Call.Return(run) + return _c +} + // IterateResources provides a mock function with given fields: server, callback func (_m *LiveStateCache) IterateResources(server *v1alpha1.Cluster, callback func(*cache.Resource, *controllercache.ResourceInfo)) error { ret := _m.Called(server, callback) @@ -272,6 +538,35 @@ func (_m *LiveStateCache) IterateResources(server *v1alpha1.Cluster, callback fu return r0 } +// LiveStateCache_IterateResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IterateResources' +type LiveStateCache_IterateResources_Call struct { + *mock.Call +} + +// IterateResources is a helper method to define mock.On call +// - server *v1alpha1.Cluster +// - callback func(*cache.Resource , *controllercache.ResourceInfo) +func (_e *LiveStateCache_Expecter) IterateResources(server interface{}, callback interface{}) *LiveStateCache_IterateResources_Call { + return &LiveStateCache_IterateResources_Call{Call: _e.mock.On("IterateResources", server, callback)} +} + +func (_c *LiveStateCache_IterateResources_Call) Run(run func(server *v1alpha1.Cluster, callback func(*cache.Resource, *controllercache.ResourceInfo))) *LiveStateCache_IterateResources_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*v1alpha1.Cluster), args[1].(func(*cache.Resource, *controllercache.ResourceInfo))) + }) + return _c +} + +func (_c *LiveStateCache_IterateResources_Call) Return(_a0 error) *LiveStateCache_IterateResources_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LiveStateCache_IterateResources_Call) RunAndReturn(run func(*v1alpha1.Cluster, func(*cache.Resource, *controllercache.ResourceInfo)) error) *LiveStateCache_IterateResources_Call { + _c.Call.Return(run) + return _c +} + // Run provides a mock function with given fields: ctx func (_m *LiveStateCache) Run(ctx context.Context) error { ret := _m.Called(ctx) @@ -290,6 +585,34 @@ func (_m *LiveStateCache) Run(ctx context.Context) error { return r0 } +// LiveStateCache_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run' +type LiveStateCache_Run_Call struct { + *mock.Call +} + +// Run is a helper method to define mock.On call +// - ctx context.Context +func (_e *LiveStateCache_Expecter) Run(ctx interface{}) *LiveStateCache_Run_Call { + return &LiveStateCache_Run_Call{Call: _e.mock.On("Run", ctx)} +} + +func (_c *LiveStateCache_Run_Call) Run(run func(ctx context.Context)) *LiveStateCache_Run_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *LiveStateCache_Run_Call) Return(_a0 error) *LiveStateCache_Run_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LiveStateCache_Run_Call) RunAndReturn(run func(context.Context) error) *LiveStateCache_Run_Call { + _c.Call.Return(run) + return _c +} + // UpdateShard provides a mock function with given fields: shard func (_m *LiveStateCache) UpdateShard(shard int) bool { ret := _m.Called(shard) @@ -308,6 +631,34 @@ func (_m *LiveStateCache) UpdateShard(shard int) bool { return r0 } +// LiveStateCache_UpdateShard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateShard' +type LiveStateCache_UpdateShard_Call struct { + *mock.Call +} + +// UpdateShard is a helper method to define mock.On call +// - shard int +func (_e *LiveStateCache_Expecter) UpdateShard(shard interface{}) *LiveStateCache_UpdateShard_Call { + return &LiveStateCache_UpdateShard_Call{Call: _e.mock.On("UpdateShard", shard)} +} + +func (_c *LiveStateCache_UpdateShard_Call) Run(run func(shard int)) *LiveStateCache_UpdateShard_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int)) + }) + return _c +} + +func (_c *LiveStateCache_UpdateShard_Call) Return(_a0 bool) *LiveStateCache_UpdateShard_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LiveStateCache_UpdateShard_Call) RunAndReturn(run func(int) bool) *LiveStateCache_UpdateShard_Call { + _c.Call.Return(run) + return _c +} + // NewLiveStateCache creates a new instance of LiveStateCache. 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 NewLiveStateCache(t interface { diff --git a/pkg/apiclient/cluster/mocks/ClusterServiceServer.go b/pkg/apiclient/cluster/mocks/ClusterServiceServer.go index e451ea5bf8b88..a08623bcb40c7 100644 --- a/pkg/apiclient/cluster/mocks/ClusterServiceServer.go +++ b/pkg/apiclient/cluster/mocks/ClusterServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type ClusterServiceServer struct { mock.Mock } +type ClusterServiceServer_Expecter struct { + mock *mock.Mock +} + +func (_m *ClusterServiceServer) EXPECT() *ClusterServiceServer_Expecter { + return &ClusterServiceServer_Expecter{mock: &_m.Mock} +} + // Create provides a mock function with given fields: _a0, _a1 func (_m *ClusterServiceServer) Create(_a0 context.Context, _a1 *cluster.ClusterCreateRequest) (*v1alpha1.Cluster, error) { ret := _m.Called(_a0, _a1) @@ -47,6 +55,35 @@ func (_m *ClusterServiceServer) Create(_a0 context.Context, _a1 *cluster.Cluster return r0, r1 } +// ClusterServiceServer_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type ClusterServiceServer_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *cluster.ClusterCreateRequest +func (_e *ClusterServiceServer_Expecter) Create(_a0 interface{}, _a1 interface{}) *ClusterServiceServer_Create_Call { + return &ClusterServiceServer_Create_Call{Call: _e.mock.On("Create", _a0, _a1)} +} + +func (_c *ClusterServiceServer_Create_Call) Run(run func(_a0 context.Context, _a1 *cluster.ClusterCreateRequest)) *ClusterServiceServer_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*cluster.ClusterCreateRequest)) + }) + return _c +} + +func (_c *ClusterServiceServer_Create_Call) Return(_a0 *v1alpha1.Cluster, _a1 error) *ClusterServiceServer_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ClusterServiceServer_Create_Call) RunAndReturn(run func(context.Context, *cluster.ClusterCreateRequest) (*v1alpha1.Cluster, error)) *ClusterServiceServer_Create_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: _a0, _a1 func (_m *ClusterServiceServer) Delete(_a0 context.Context, _a1 *cluster.ClusterQuery) (*cluster.ClusterResponse, error) { ret := _m.Called(_a0, _a1) @@ -77,6 +114,35 @@ func (_m *ClusterServiceServer) Delete(_a0 context.Context, _a1 *cluster.Cluster return r0, r1 } +// ClusterServiceServer_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type ClusterServiceServer_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *cluster.ClusterQuery +func (_e *ClusterServiceServer_Expecter) Delete(_a0 interface{}, _a1 interface{}) *ClusterServiceServer_Delete_Call { + return &ClusterServiceServer_Delete_Call{Call: _e.mock.On("Delete", _a0, _a1)} +} + +func (_c *ClusterServiceServer_Delete_Call) Run(run func(_a0 context.Context, _a1 *cluster.ClusterQuery)) *ClusterServiceServer_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*cluster.ClusterQuery)) + }) + return _c +} + +func (_c *ClusterServiceServer_Delete_Call) Return(_a0 *cluster.ClusterResponse, _a1 error) *ClusterServiceServer_Delete_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ClusterServiceServer_Delete_Call) RunAndReturn(run func(context.Context, *cluster.ClusterQuery) (*cluster.ClusterResponse, error)) *ClusterServiceServer_Delete_Call { + _c.Call.Return(run) + return _c +} + // Get provides a mock function with given fields: _a0, _a1 func (_m *ClusterServiceServer) Get(_a0 context.Context, _a1 *cluster.ClusterQuery) (*v1alpha1.Cluster, error) { ret := _m.Called(_a0, _a1) @@ -107,6 +173,35 @@ func (_m *ClusterServiceServer) Get(_a0 context.Context, _a1 *cluster.ClusterQue return r0, r1 } +// ClusterServiceServer_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type ClusterServiceServer_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *cluster.ClusterQuery +func (_e *ClusterServiceServer_Expecter) Get(_a0 interface{}, _a1 interface{}) *ClusterServiceServer_Get_Call { + return &ClusterServiceServer_Get_Call{Call: _e.mock.On("Get", _a0, _a1)} +} + +func (_c *ClusterServiceServer_Get_Call) Run(run func(_a0 context.Context, _a1 *cluster.ClusterQuery)) *ClusterServiceServer_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*cluster.ClusterQuery)) + }) + return _c +} + +func (_c *ClusterServiceServer_Get_Call) Return(_a0 *v1alpha1.Cluster, _a1 error) *ClusterServiceServer_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ClusterServiceServer_Get_Call) RunAndReturn(run func(context.Context, *cluster.ClusterQuery) (*v1alpha1.Cluster, error)) *ClusterServiceServer_Get_Call { + _c.Call.Return(run) + return _c +} + // InvalidateCache provides a mock function with given fields: _a0, _a1 func (_m *ClusterServiceServer) InvalidateCache(_a0 context.Context, _a1 *cluster.ClusterQuery) (*v1alpha1.Cluster, error) { ret := _m.Called(_a0, _a1) @@ -137,6 +232,35 @@ func (_m *ClusterServiceServer) InvalidateCache(_a0 context.Context, _a1 *cluste return r0, r1 } +// ClusterServiceServer_InvalidateCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InvalidateCache' +type ClusterServiceServer_InvalidateCache_Call struct { + *mock.Call +} + +// InvalidateCache is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *cluster.ClusterQuery +func (_e *ClusterServiceServer_Expecter) InvalidateCache(_a0 interface{}, _a1 interface{}) *ClusterServiceServer_InvalidateCache_Call { + return &ClusterServiceServer_InvalidateCache_Call{Call: _e.mock.On("InvalidateCache", _a0, _a1)} +} + +func (_c *ClusterServiceServer_InvalidateCache_Call) Run(run func(_a0 context.Context, _a1 *cluster.ClusterQuery)) *ClusterServiceServer_InvalidateCache_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*cluster.ClusterQuery)) + }) + return _c +} + +func (_c *ClusterServiceServer_InvalidateCache_Call) Return(_a0 *v1alpha1.Cluster, _a1 error) *ClusterServiceServer_InvalidateCache_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ClusterServiceServer_InvalidateCache_Call) RunAndReturn(run func(context.Context, *cluster.ClusterQuery) (*v1alpha1.Cluster, error)) *ClusterServiceServer_InvalidateCache_Call { + _c.Call.Return(run) + return _c +} + // List provides a mock function with given fields: _a0, _a1 func (_m *ClusterServiceServer) List(_a0 context.Context, _a1 *cluster.ClusterQuery) (*v1alpha1.ClusterList, error) { ret := _m.Called(_a0, _a1) @@ -167,6 +291,35 @@ func (_m *ClusterServiceServer) List(_a0 context.Context, _a1 *cluster.ClusterQu return r0, r1 } +// ClusterServiceServer_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' +type ClusterServiceServer_List_Call struct { + *mock.Call +} + +// List is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *cluster.ClusterQuery +func (_e *ClusterServiceServer_Expecter) List(_a0 interface{}, _a1 interface{}) *ClusterServiceServer_List_Call { + return &ClusterServiceServer_List_Call{Call: _e.mock.On("List", _a0, _a1)} +} + +func (_c *ClusterServiceServer_List_Call) Run(run func(_a0 context.Context, _a1 *cluster.ClusterQuery)) *ClusterServiceServer_List_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*cluster.ClusterQuery)) + }) + return _c +} + +func (_c *ClusterServiceServer_List_Call) Return(_a0 *v1alpha1.ClusterList, _a1 error) *ClusterServiceServer_List_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ClusterServiceServer_List_Call) RunAndReturn(run func(context.Context, *cluster.ClusterQuery) (*v1alpha1.ClusterList, error)) *ClusterServiceServer_List_Call { + _c.Call.Return(run) + return _c +} + // RotateAuth provides a mock function with given fields: _a0, _a1 func (_m *ClusterServiceServer) RotateAuth(_a0 context.Context, _a1 *cluster.ClusterQuery) (*cluster.ClusterResponse, error) { ret := _m.Called(_a0, _a1) @@ -197,6 +350,35 @@ func (_m *ClusterServiceServer) RotateAuth(_a0 context.Context, _a1 *cluster.Clu return r0, r1 } +// ClusterServiceServer_RotateAuth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RotateAuth' +type ClusterServiceServer_RotateAuth_Call struct { + *mock.Call +} + +// RotateAuth is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *cluster.ClusterQuery +func (_e *ClusterServiceServer_Expecter) RotateAuth(_a0 interface{}, _a1 interface{}) *ClusterServiceServer_RotateAuth_Call { + return &ClusterServiceServer_RotateAuth_Call{Call: _e.mock.On("RotateAuth", _a0, _a1)} +} + +func (_c *ClusterServiceServer_RotateAuth_Call) Run(run func(_a0 context.Context, _a1 *cluster.ClusterQuery)) *ClusterServiceServer_RotateAuth_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*cluster.ClusterQuery)) + }) + return _c +} + +func (_c *ClusterServiceServer_RotateAuth_Call) Return(_a0 *cluster.ClusterResponse, _a1 error) *ClusterServiceServer_RotateAuth_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ClusterServiceServer_RotateAuth_Call) RunAndReturn(run func(context.Context, *cluster.ClusterQuery) (*cluster.ClusterResponse, error)) *ClusterServiceServer_RotateAuth_Call { + _c.Call.Return(run) + return _c +} + // Update provides a mock function with given fields: _a0, _a1 func (_m *ClusterServiceServer) Update(_a0 context.Context, _a1 *cluster.ClusterUpdateRequest) (*v1alpha1.Cluster, error) { ret := _m.Called(_a0, _a1) @@ -227,6 +409,35 @@ func (_m *ClusterServiceServer) Update(_a0 context.Context, _a1 *cluster.Cluster return r0, r1 } +// ClusterServiceServer_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type ClusterServiceServer_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *cluster.ClusterUpdateRequest +func (_e *ClusterServiceServer_Expecter) Update(_a0 interface{}, _a1 interface{}) *ClusterServiceServer_Update_Call { + return &ClusterServiceServer_Update_Call{Call: _e.mock.On("Update", _a0, _a1)} +} + +func (_c *ClusterServiceServer_Update_Call) Run(run func(_a0 context.Context, _a1 *cluster.ClusterUpdateRequest)) *ClusterServiceServer_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*cluster.ClusterUpdateRequest)) + }) + return _c +} + +func (_c *ClusterServiceServer_Update_Call) Return(_a0 *v1alpha1.Cluster, _a1 error) *ClusterServiceServer_Update_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ClusterServiceServer_Update_Call) RunAndReturn(run func(context.Context, *cluster.ClusterUpdateRequest) (*v1alpha1.Cluster, error)) *ClusterServiceServer_Update_Call { + _c.Call.Return(run) + return _c +} + // NewClusterServiceServer creates a new instance of ClusterServiceServer. 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 NewClusterServiceServer(t interface { diff --git a/pkg/apiclient/session/mocks/SessionServiceClient.go b/pkg/apiclient/session/mocks/SessionServiceClient.go index 36f910c08fc27..e677bbef4c301 100644 --- a/pkg/apiclient/session/mocks/SessionServiceClient.go +++ b/pkg/apiclient/session/mocks/SessionServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type SessionServiceClient struct { mock.Mock } +type SessionServiceClient_Expecter struct { + mock *mock.Mock +} + +func (_m *SessionServiceClient) EXPECT() *SessionServiceClient_Expecter { + return &SessionServiceClient_Expecter{mock: &_m.Mock} +} + // Create provides a mock function with given fields: ctx, in, opts func (_m *SessionServiceClient) Create(ctx context.Context, in *session.SessionCreateRequest, opts ...grpc.CallOption) (*session.SessionResponse, error) { _va := make([]interface{}, len(opts)) @@ -54,6 +62,43 @@ func (_m *SessionServiceClient) Create(ctx context.Context, in *session.SessionC return r0, r1 } +// SessionServiceClient_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type SessionServiceClient_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - in *session.SessionCreateRequest +// - opts ...grpc.CallOption +func (_e *SessionServiceClient_Expecter) Create(ctx interface{}, in interface{}, opts ...interface{}) *SessionServiceClient_Create_Call { + return &SessionServiceClient_Create_Call{Call: _e.mock.On("Create", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *SessionServiceClient_Create_Call) Run(run func(ctx context.Context, in *session.SessionCreateRequest, opts ...grpc.CallOption)) *SessionServiceClient_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*session.SessionCreateRequest), variadicArgs...) + }) + return _c +} + +func (_c *SessionServiceClient_Create_Call) Return(_a0 *session.SessionResponse, _a1 error) *SessionServiceClient_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SessionServiceClient_Create_Call) RunAndReturn(run func(context.Context, *session.SessionCreateRequest, ...grpc.CallOption) (*session.SessionResponse, error)) *SessionServiceClient_Create_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: ctx, in, opts func (_m *SessionServiceClient) Delete(ctx context.Context, in *session.SessionDeleteRequest, opts ...grpc.CallOption) (*session.SessionResponse, error) { _va := make([]interface{}, len(opts)) @@ -91,6 +136,43 @@ func (_m *SessionServiceClient) Delete(ctx context.Context, in *session.SessionD return r0, r1 } +// SessionServiceClient_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type SessionServiceClient_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - in *session.SessionDeleteRequest +// - opts ...grpc.CallOption +func (_e *SessionServiceClient_Expecter) Delete(ctx interface{}, in interface{}, opts ...interface{}) *SessionServiceClient_Delete_Call { + return &SessionServiceClient_Delete_Call{Call: _e.mock.On("Delete", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *SessionServiceClient_Delete_Call) Run(run func(ctx context.Context, in *session.SessionDeleteRequest, opts ...grpc.CallOption)) *SessionServiceClient_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*session.SessionDeleteRequest), variadicArgs...) + }) + return _c +} + +func (_c *SessionServiceClient_Delete_Call) Return(_a0 *session.SessionResponse, _a1 error) *SessionServiceClient_Delete_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SessionServiceClient_Delete_Call) RunAndReturn(run func(context.Context, *session.SessionDeleteRequest, ...grpc.CallOption) (*session.SessionResponse, error)) *SessionServiceClient_Delete_Call { + _c.Call.Return(run) + return _c +} + // GetUserInfo provides a mock function with given fields: ctx, in, opts func (_m *SessionServiceClient) GetUserInfo(ctx context.Context, in *session.GetUserInfoRequest, opts ...grpc.CallOption) (*session.GetUserInfoResponse, error) { _va := make([]interface{}, len(opts)) @@ -128,6 +210,43 @@ func (_m *SessionServiceClient) GetUserInfo(ctx context.Context, in *session.Get return r0, r1 } +// SessionServiceClient_GetUserInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserInfo' +type SessionServiceClient_GetUserInfo_Call struct { + *mock.Call +} + +// GetUserInfo is a helper method to define mock.On call +// - ctx context.Context +// - in *session.GetUserInfoRequest +// - opts ...grpc.CallOption +func (_e *SessionServiceClient_Expecter) GetUserInfo(ctx interface{}, in interface{}, opts ...interface{}) *SessionServiceClient_GetUserInfo_Call { + return &SessionServiceClient_GetUserInfo_Call{Call: _e.mock.On("GetUserInfo", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *SessionServiceClient_GetUserInfo_Call) Run(run func(ctx context.Context, in *session.GetUserInfoRequest, opts ...grpc.CallOption)) *SessionServiceClient_GetUserInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*session.GetUserInfoRequest), variadicArgs...) + }) + return _c +} + +func (_c *SessionServiceClient_GetUserInfo_Call) Return(_a0 *session.GetUserInfoResponse, _a1 error) *SessionServiceClient_GetUserInfo_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SessionServiceClient_GetUserInfo_Call) RunAndReturn(run func(context.Context, *session.GetUserInfoRequest, ...grpc.CallOption) (*session.GetUserInfoResponse, error)) *SessionServiceClient_GetUserInfo_Call { + _c.Call.Return(run) + return _c +} + // NewSessionServiceClient creates a new instance of SessionServiceClient. 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 NewSessionServiceClient(t interface { diff --git a/pkg/apiclient/session/mocks/SessionServiceServer.go b/pkg/apiclient/session/mocks/SessionServiceServer.go index 759063541c765..70d04cd795abe 100644 --- a/pkg/apiclient/session/mocks/SessionServiceServer.go +++ b/pkg/apiclient/session/mocks/SessionServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type SessionServiceServer struct { mock.Mock } +type SessionServiceServer_Expecter struct { + mock *mock.Mock +} + +func (_m *SessionServiceServer) EXPECT() *SessionServiceServer_Expecter { + return &SessionServiceServer_Expecter{mock: &_m.Mock} +} + // Create provides a mock function with given fields: _a0, _a1 func (_m *SessionServiceServer) Create(_a0 context.Context, _a1 *session.SessionCreateRequest) (*session.SessionResponse, error) { ret := _m.Called(_a0, _a1) @@ -44,6 +52,35 @@ func (_m *SessionServiceServer) Create(_a0 context.Context, _a1 *session.Session return r0, r1 } +// SessionServiceServer_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type SessionServiceServer_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *session.SessionCreateRequest +func (_e *SessionServiceServer_Expecter) Create(_a0 interface{}, _a1 interface{}) *SessionServiceServer_Create_Call { + return &SessionServiceServer_Create_Call{Call: _e.mock.On("Create", _a0, _a1)} +} + +func (_c *SessionServiceServer_Create_Call) Run(run func(_a0 context.Context, _a1 *session.SessionCreateRequest)) *SessionServiceServer_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*session.SessionCreateRequest)) + }) + return _c +} + +func (_c *SessionServiceServer_Create_Call) Return(_a0 *session.SessionResponse, _a1 error) *SessionServiceServer_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SessionServiceServer_Create_Call) RunAndReturn(run func(context.Context, *session.SessionCreateRequest) (*session.SessionResponse, error)) *SessionServiceServer_Create_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: _a0, _a1 func (_m *SessionServiceServer) Delete(_a0 context.Context, _a1 *session.SessionDeleteRequest) (*session.SessionResponse, error) { ret := _m.Called(_a0, _a1) @@ -74,6 +111,35 @@ func (_m *SessionServiceServer) Delete(_a0 context.Context, _a1 *session.Session return r0, r1 } +// SessionServiceServer_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type SessionServiceServer_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *session.SessionDeleteRequest +func (_e *SessionServiceServer_Expecter) Delete(_a0 interface{}, _a1 interface{}) *SessionServiceServer_Delete_Call { + return &SessionServiceServer_Delete_Call{Call: _e.mock.On("Delete", _a0, _a1)} +} + +func (_c *SessionServiceServer_Delete_Call) Run(run func(_a0 context.Context, _a1 *session.SessionDeleteRequest)) *SessionServiceServer_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*session.SessionDeleteRequest)) + }) + return _c +} + +func (_c *SessionServiceServer_Delete_Call) Return(_a0 *session.SessionResponse, _a1 error) *SessionServiceServer_Delete_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SessionServiceServer_Delete_Call) RunAndReturn(run func(context.Context, *session.SessionDeleteRequest) (*session.SessionResponse, error)) *SessionServiceServer_Delete_Call { + _c.Call.Return(run) + return _c +} + // GetUserInfo provides a mock function with given fields: _a0, _a1 func (_m *SessionServiceServer) GetUserInfo(_a0 context.Context, _a1 *session.GetUserInfoRequest) (*session.GetUserInfoResponse, error) { ret := _m.Called(_a0, _a1) @@ -104,6 +170,35 @@ func (_m *SessionServiceServer) GetUserInfo(_a0 context.Context, _a1 *session.Ge return r0, r1 } +// SessionServiceServer_GetUserInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserInfo' +type SessionServiceServer_GetUserInfo_Call struct { + *mock.Call +} + +// GetUserInfo is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *session.GetUserInfoRequest +func (_e *SessionServiceServer_Expecter) GetUserInfo(_a0 interface{}, _a1 interface{}) *SessionServiceServer_GetUserInfo_Call { + return &SessionServiceServer_GetUserInfo_Call{Call: _e.mock.On("GetUserInfo", _a0, _a1)} +} + +func (_c *SessionServiceServer_GetUserInfo_Call) Run(run func(_a0 context.Context, _a1 *session.GetUserInfoRequest)) *SessionServiceServer_GetUserInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*session.GetUserInfoRequest)) + }) + return _c +} + +func (_c *SessionServiceServer_GetUserInfo_Call) Return(_a0 *session.GetUserInfoResponse, _a1 error) *SessionServiceServer_GetUserInfo_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SessionServiceServer_GetUserInfo_Call) RunAndReturn(run func(context.Context, *session.GetUserInfoRequest) (*session.GetUserInfoResponse, error)) *SessionServiceServer_GetUserInfo_Call { + _c.Call.Return(run) + return _c +} + // NewSessionServiceServer creates a new instance of SessionServiceServer. 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 NewSessionServiceServer(t interface { diff --git a/pkg/client/clientset/versioned/typed/application/v1alpha1/mocks/AppProjectInterface.go b/pkg/client/clientset/versioned/typed/application/v1alpha1/mocks/AppProjectInterface.go index 71577f5cce15f..ec84052a9e64a 100644 --- a/pkg/client/clientset/versioned/typed/application/v1alpha1/mocks/AppProjectInterface.go +++ b/pkg/client/clientset/versioned/typed/application/v1alpha1/mocks/AppProjectInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -20,6 +20,14 @@ type AppProjectInterface struct { mock.Mock } +type AppProjectInterface_Expecter struct { + mock *mock.Mock +} + +func (_m *AppProjectInterface) EXPECT() *AppProjectInterface_Expecter { + return &AppProjectInterface_Expecter{mock: &_m.Mock} +} + // Create provides a mock function with given fields: ctx, appProject, opts func (_m *AppProjectInterface) Create(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.CreateOptions) (*v1alpha1.AppProject, error) { ret := _m.Called(ctx, appProject, opts) @@ -50,6 +58,36 @@ func (_m *AppProjectInterface) Create(ctx context.Context, appProject *v1alpha1. return r0, r1 } +// AppProjectInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type AppProjectInterface_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - appProject *v1alpha1.AppProject +// - opts v1.CreateOptions +func (_e *AppProjectInterface_Expecter) Create(ctx interface{}, appProject interface{}, opts interface{}) *AppProjectInterface_Create_Call { + return &AppProjectInterface_Create_Call{Call: _e.mock.On("Create", ctx, appProject, opts)} +} + +func (_c *AppProjectInterface_Create_Call) Run(run func(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.CreateOptions)) *AppProjectInterface_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1alpha1.AppProject), args[2].(v1.CreateOptions)) + }) + return _c +} + +func (_c *AppProjectInterface_Create_Call) Return(_a0 *v1alpha1.AppProject, _a1 error) *AppProjectInterface_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AppProjectInterface_Create_Call) RunAndReturn(run func(context.Context, *v1alpha1.AppProject, v1.CreateOptions) (*v1alpha1.AppProject, error)) *AppProjectInterface_Create_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: ctx, name, opts func (_m *AppProjectInterface) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) @@ -68,6 +106,36 @@ func (_m *AppProjectInterface) Delete(ctx context.Context, name string, opts v1. return r0 } +// AppProjectInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type AppProjectInterface_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - name string +// - opts v1.DeleteOptions +func (_e *AppProjectInterface_Expecter) Delete(ctx interface{}, name interface{}, opts interface{}) *AppProjectInterface_Delete_Call { + return &AppProjectInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, name, opts)} +} + +func (_c *AppProjectInterface_Delete_Call) Run(run func(ctx context.Context, name string, opts v1.DeleteOptions)) *AppProjectInterface_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(v1.DeleteOptions)) + }) + return _c +} + +func (_c *AppProjectInterface_Delete_Call) Return(_a0 error) *AppProjectInterface_Delete_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *AppProjectInterface_Delete_Call) RunAndReturn(run func(context.Context, string, v1.DeleteOptions) error) *AppProjectInterface_Delete_Call { + _c.Call.Return(run) + return _c +} + // DeleteCollection provides a mock function with given fields: ctx, opts, listOpts func (_m *AppProjectInterface) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) @@ -86,6 +154,36 @@ func (_m *AppProjectInterface) DeleteCollection(ctx context.Context, opts v1.Del return r0 } +// AppProjectInterface_DeleteCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCollection' +type AppProjectInterface_DeleteCollection_Call struct { + *mock.Call +} + +// DeleteCollection is a helper method to define mock.On call +// - ctx context.Context +// - opts v1.DeleteOptions +// - listOpts v1.ListOptions +func (_e *AppProjectInterface_Expecter) DeleteCollection(ctx interface{}, opts interface{}, listOpts interface{}) *AppProjectInterface_DeleteCollection_Call { + return &AppProjectInterface_DeleteCollection_Call{Call: _e.mock.On("DeleteCollection", ctx, opts, listOpts)} +} + +func (_c *AppProjectInterface_DeleteCollection_Call) Run(run func(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions)) *AppProjectInterface_DeleteCollection_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(v1.DeleteOptions), args[2].(v1.ListOptions)) + }) + return _c +} + +func (_c *AppProjectInterface_DeleteCollection_Call) Return(_a0 error) *AppProjectInterface_DeleteCollection_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *AppProjectInterface_DeleteCollection_Call) RunAndReturn(run func(context.Context, v1.DeleteOptions, v1.ListOptions) error) *AppProjectInterface_DeleteCollection_Call { + _c.Call.Return(run) + return _c +} + // Get provides a mock function with given fields: ctx, name, opts func (_m *AppProjectInterface) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.AppProject, error) { ret := _m.Called(ctx, name, opts) @@ -116,6 +214,36 @@ func (_m *AppProjectInterface) Get(ctx context.Context, name string, opts v1.Get return r0, r1 } +// AppProjectInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type AppProjectInterface_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - name string +// - opts v1.GetOptions +func (_e *AppProjectInterface_Expecter) Get(ctx interface{}, name interface{}, opts interface{}) *AppProjectInterface_Get_Call { + return &AppProjectInterface_Get_Call{Call: _e.mock.On("Get", ctx, name, opts)} +} + +func (_c *AppProjectInterface_Get_Call) Run(run func(ctx context.Context, name string, opts v1.GetOptions)) *AppProjectInterface_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(v1.GetOptions)) + }) + return _c +} + +func (_c *AppProjectInterface_Get_Call) Return(_a0 *v1alpha1.AppProject, _a1 error) *AppProjectInterface_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AppProjectInterface_Get_Call) RunAndReturn(run func(context.Context, string, v1.GetOptions) (*v1alpha1.AppProject, error)) *AppProjectInterface_Get_Call { + _c.Call.Return(run) + return _c +} + // List provides a mock function with given fields: ctx, opts func (_m *AppProjectInterface) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AppProjectList, error) { ret := _m.Called(ctx, opts) @@ -146,6 +274,35 @@ func (_m *AppProjectInterface) List(ctx context.Context, opts v1.ListOptions) (* return r0, r1 } +// AppProjectInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' +type AppProjectInterface_List_Call struct { + *mock.Call +} + +// List is a helper method to define mock.On call +// - ctx context.Context +// - opts v1.ListOptions +func (_e *AppProjectInterface_Expecter) List(ctx interface{}, opts interface{}) *AppProjectInterface_List_Call { + return &AppProjectInterface_List_Call{Call: _e.mock.On("List", ctx, opts)} +} + +func (_c *AppProjectInterface_List_Call) Run(run func(ctx context.Context, opts v1.ListOptions)) *AppProjectInterface_List_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(v1.ListOptions)) + }) + return _c +} + +func (_c *AppProjectInterface_List_Call) Return(_a0 *v1alpha1.AppProjectList, _a1 error) *AppProjectInterface_List_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AppProjectInterface_List_Call) RunAndReturn(run func(context.Context, v1.ListOptions) (*v1alpha1.AppProjectList, error)) *AppProjectInterface_List_Call { + _c.Call.Return(run) + return _c +} + // Patch provides a mock function with given fields: ctx, name, pt, data, opts, subresources func (_m *AppProjectInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (*v1alpha1.AppProject, error) { _va := make([]interface{}, len(subresources)) @@ -183,6 +340,46 @@ func (_m *AppProjectInterface) Patch(ctx context.Context, name string, pt types. return r0, r1 } +// AppProjectInterface_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch' +type AppProjectInterface_Patch_Call struct { + *mock.Call +} + +// Patch is a helper method to define mock.On call +// - ctx context.Context +// - name string +// - pt types.PatchType +// - data []byte +// - opts v1.PatchOptions +// - subresources ...string +func (_e *AppProjectInterface_Expecter) Patch(ctx interface{}, name interface{}, pt interface{}, data interface{}, opts interface{}, subresources ...interface{}) *AppProjectInterface_Patch_Call { + return &AppProjectInterface_Patch_Call{Call: _e.mock.On("Patch", + append([]interface{}{ctx, name, pt, data, opts}, subresources...)...)} +} + +func (_c *AppProjectInterface_Patch_Call) Run(run func(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string)) *AppProjectInterface_Patch_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]string, len(args)-5) + for i, a := range args[5:] { + if a != nil { + variadicArgs[i] = a.(string) + } + } + run(args[0].(context.Context), args[1].(string), args[2].(types.PatchType), args[3].([]byte), args[4].(v1.PatchOptions), variadicArgs...) + }) + return _c +} + +func (_c *AppProjectInterface_Patch_Call) Return(result *v1alpha1.AppProject, err error) *AppProjectInterface_Patch_Call { + _c.Call.Return(result, err) + return _c +} + +func (_c *AppProjectInterface_Patch_Call) RunAndReturn(run func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*v1alpha1.AppProject, error)) *AppProjectInterface_Patch_Call { + _c.Call.Return(run) + return _c +} + // Update provides a mock function with given fields: ctx, appProject, opts func (_m *AppProjectInterface) Update(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.UpdateOptions) (*v1alpha1.AppProject, error) { ret := _m.Called(ctx, appProject, opts) @@ -213,6 +410,36 @@ func (_m *AppProjectInterface) Update(ctx context.Context, appProject *v1alpha1. return r0, r1 } +// AppProjectInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type AppProjectInterface_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - appProject *v1alpha1.AppProject +// - opts v1.UpdateOptions +func (_e *AppProjectInterface_Expecter) Update(ctx interface{}, appProject interface{}, opts interface{}) *AppProjectInterface_Update_Call { + return &AppProjectInterface_Update_Call{Call: _e.mock.On("Update", ctx, appProject, opts)} +} + +func (_c *AppProjectInterface_Update_Call) Run(run func(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.UpdateOptions)) *AppProjectInterface_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1alpha1.AppProject), args[2].(v1.UpdateOptions)) + }) + return _c +} + +func (_c *AppProjectInterface_Update_Call) Return(_a0 *v1alpha1.AppProject, _a1 error) *AppProjectInterface_Update_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AppProjectInterface_Update_Call) RunAndReturn(run func(context.Context, *v1alpha1.AppProject, v1.UpdateOptions) (*v1alpha1.AppProject, error)) *AppProjectInterface_Update_Call { + _c.Call.Return(run) + return _c +} + // Watch provides a mock function with given fields: ctx, opts func (_m *AppProjectInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) @@ -243,6 +470,35 @@ func (_m *AppProjectInterface) Watch(ctx context.Context, opts v1.ListOptions) ( return r0, r1 } +// AppProjectInterface_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch' +type AppProjectInterface_Watch_Call struct { + *mock.Call +} + +// Watch is a helper method to define mock.On call +// - ctx context.Context +// - opts v1.ListOptions +func (_e *AppProjectInterface_Expecter) Watch(ctx interface{}, opts interface{}) *AppProjectInterface_Watch_Call { + return &AppProjectInterface_Watch_Call{Call: _e.mock.On("Watch", ctx, opts)} +} + +func (_c *AppProjectInterface_Watch_Call) Run(run func(ctx context.Context, opts v1.ListOptions)) *AppProjectInterface_Watch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(v1.ListOptions)) + }) + return _c +} + +func (_c *AppProjectInterface_Watch_Call) Return(_a0 watch.Interface, _a1 error) *AppProjectInterface_Watch_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AppProjectInterface_Watch_Call) RunAndReturn(run func(context.Context, v1.ListOptions) (watch.Interface, error)) *AppProjectInterface_Watch_Call { + _c.Call.Return(run) + return _c +} + // NewAppProjectInterface creates a new instance of AppProjectInterface. 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 NewAppProjectInterface(t interface { diff --git a/reposerver/apiclient/mocks/RepoServerServiceClient.go b/reposerver/apiclient/mocks/RepoServerServiceClient.go index 1659468ce3652..494864b9a65fc 100644 --- a/reposerver/apiclient/mocks/RepoServerServiceClient.go +++ b/reposerver/apiclient/mocks/RepoServerServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -21,6 +21,14 @@ type RepoServerServiceClient struct { mock.Mock } +type RepoServerServiceClient_Expecter struct { + mock *mock.Mock +} + +func (_m *RepoServerServiceClient) EXPECT() *RepoServerServiceClient_Expecter { + return &RepoServerServiceClient_Expecter{mock: &_m.Mock} +} + // GenerateManifest provides a mock function with given fields: ctx, in, opts func (_m *RepoServerServiceClient) GenerateManifest(ctx context.Context, in *apiclient.ManifestRequest, opts ...grpc.CallOption) (*apiclient.ManifestResponse, error) { _va := make([]interface{}, len(opts)) @@ -58,6 +66,43 @@ func (_m *RepoServerServiceClient) GenerateManifest(ctx context.Context, in *api return r0, r1 } +// RepoServerServiceClient_GenerateManifest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateManifest' +type RepoServerServiceClient_GenerateManifest_Call struct { + *mock.Call +} + +// GenerateManifest is a helper method to define mock.On call +// - ctx context.Context +// - in *apiclient.ManifestRequest +// - opts ...grpc.CallOption +func (_e *RepoServerServiceClient_Expecter) GenerateManifest(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_GenerateManifest_Call { + return &RepoServerServiceClient_GenerateManifest_Call{Call: _e.mock.On("GenerateManifest", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RepoServerServiceClient_GenerateManifest_Call) Run(run func(ctx context.Context, in *apiclient.ManifestRequest, opts ...grpc.CallOption)) *RepoServerServiceClient_GenerateManifest_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*apiclient.ManifestRequest), variadicArgs...) + }) + return _c +} + +func (_c *RepoServerServiceClient_GenerateManifest_Call) Return(_a0 *apiclient.ManifestResponse, _a1 error) *RepoServerServiceClient_GenerateManifest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerServiceClient_GenerateManifest_Call) RunAndReturn(run func(context.Context, *apiclient.ManifestRequest, ...grpc.CallOption) (*apiclient.ManifestResponse, error)) *RepoServerServiceClient_GenerateManifest_Call { + _c.Call.Return(run) + return _c +} + // GenerateManifestWithFiles provides a mock function with given fields: ctx, opts func (_m *RepoServerServiceClient) GenerateManifestWithFiles(ctx context.Context, opts ...grpc.CallOption) (apiclient.RepoServerService_GenerateManifestWithFilesClient, error) { _va := make([]interface{}, len(opts)) @@ -95,6 +140,42 @@ func (_m *RepoServerServiceClient) GenerateManifestWithFiles(ctx context.Context return r0, r1 } +// RepoServerServiceClient_GenerateManifestWithFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateManifestWithFiles' +type RepoServerServiceClient_GenerateManifestWithFiles_Call struct { + *mock.Call +} + +// GenerateManifestWithFiles is a helper method to define mock.On call +// - ctx context.Context +// - opts ...grpc.CallOption +func (_e *RepoServerServiceClient_Expecter) GenerateManifestWithFiles(ctx interface{}, opts ...interface{}) *RepoServerServiceClient_GenerateManifestWithFiles_Call { + return &RepoServerServiceClient_GenerateManifestWithFiles_Call{Call: _e.mock.On("GenerateManifestWithFiles", + append([]interface{}{ctx}, opts...)...)} +} + +func (_c *RepoServerServiceClient_GenerateManifestWithFiles_Call) Run(run func(ctx context.Context, opts ...grpc.CallOption)) *RepoServerServiceClient_GenerateManifestWithFiles_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), variadicArgs...) + }) + return _c +} + +func (_c *RepoServerServiceClient_GenerateManifestWithFiles_Call) Return(_a0 apiclient.RepoServerService_GenerateManifestWithFilesClient, _a1 error) *RepoServerServiceClient_GenerateManifestWithFiles_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerServiceClient_GenerateManifestWithFiles_Call) RunAndReturn(run func(context.Context, ...grpc.CallOption) (apiclient.RepoServerService_GenerateManifestWithFilesClient, error)) *RepoServerServiceClient_GenerateManifestWithFiles_Call { + _c.Call.Return(run) + return _c +} + // GetAppDetails provides a mock function with given fields: ctx, in, opts func (_m *RepoServerServiceClient) GetAppDetails(ctx context.Context, in *apiclient.RepoServerAppDetailsQuery, opts ...grpc.CallOption) (*apiclient.RepoAppDetailsResponse, error) { _va := make([]interface{}, len(opts)) @@ -132,6 +213,43 @@ func (_m *RepoServerServiceClient) GetAppDetails(ctx context.Context, in *apicli return r0, r1 } +// RepoServerServiceClient_GetAppDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAppDetails' +type RepoServerServiceClient_GetAppDetails_Call struct { + *mock.Call +} + +// GetAppDetails is a helper method to define mock.On call +// - ctx context.Context +// - in *apiclient.RepoServerAppDetailsQuery +// - opts ...grpc.CallOption +func (_e *RepoServerServiceClient_Expecter) GetAppDetails(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_GetAppDetails_Call { + return &RepoServerServiceClient_GetAppDetails_Call{Call: _e.mock.On("GetAppDetails", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RepoServerServiceClient_GetAppDetails_Call) Run(run func(ctx context.Context, in *apiclient.RepoServerAppDetailsQuery, opts ...grpc.CallOption)) *RepoServerServiceClient_GetAppDetails_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*apiclient.RepoServerAppDetailsQuery), variadicArgs...) + }) + return _c +} + +func (_c *RepoServerServiceClient_GetAppDetails_Call) Return(_a0 *apiclient.RepoAppDetailsResponse, _a1 error) *RepoServerServiceClient_GetAppDetails_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerServiceClient_GetAppDetails_Call) RunAndReturn(run func(context.Context, *apiclient.RepoServerAppDetailsQuery, ...grpc.CallOption) (*apiclient.RepoAppDetailsResponse, error)) *RepoServerServiceClient_GetAppDetails_Call { + _c.Call.Return(run) + return _c +} + // GetGitDirectories provides a mock function with given fields: ctx, in, opts func (_m *RepoServerServiceClient) GetGitDirectories(ctx context.Context, in *apiclient.GitDirectoriesRequest, opts ...grpc.CallOption) (*apiclient.GitDirectoriesResponse, error) { _va := make([]interface{}, len(opts)) @@ -169,6 +287,43 @@ func (_m *RepoServerServiceClient) GetGitDirectories(ctx context.Context, in *ap return r0, r1 } +// RepoServerServiceClient_GetGitDirectories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGitDirectories' +type RepoServerServiceClient_GetGitDirectories_Call struct { + *mock.Call +} + +// GetGitDirectories is a helper method to define mock.On call +// - ctx context.Context +// - in *apiclient.GitDirectoriesRequest +// - opts ...grpc.CallOption +func (_e *RepoServerServiceClient_Expecter) GetGitDirectories(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_GetGitDirectories_Call { + return &RepoServerServiceClient_GetGitDirectories_Call{Call: _e.mock.On("GetGitDirectories", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RepoServerServiceClient_GetGitDirectories_Call) Run(run func(ctx context.Context, in *apiclient.GitDirectoriesRequest, opts ...grpc.CallOption)) *RepoServerServiceClient_GetGitDirectories_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*apiclient.GitDirectoriesRequest), variadicArgs...) + }) + return _c +} + +func (_c *RepoServerServiceClient_GetGitDirectories_Call) Return(_a0 *apiclient.GitDirectoriesResponse, _a1 error) *RepoServerServiceClient_GetGitDirectories_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerServiceClient_GetGitDirectories_Call) RunAndReturn(run func(context.Context, *apiclient.GitDirectoriesRequest, ...grpc.CallOption) (*apiclient.GitDirectoriesResponse, error)) *RepoServerServiceClient_GetGitDirectories_Call { + _c.Call.Return(run) + return _c +} + // GetGitFiles provides a mock function with given fields: ctx, in, opts func (_m *RepoServerServiceClient) GetGitFiles(ctx context.Context, in *apiclient.GitFilesRequest, opts ...grpc.CallOption) (*apiclient.GitFilesResponse, error) { _va := make([]interface{}, len(opts)) @@ -206,6 +361,43 @@ func (_m *RepoServerServiceClient) GetGitFiles(ctx context.Context, in *apiclien return r0, r1 } +// RepoServerServiceClient_GetGitFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGitFiles' +type RepoServerServiceClient_GetGitFiles_Call struct { + *mock.Call +} + +// GetGitFiles is a helper method to define mock.On call +// - ctx context.Context +// - in *apiclient.GitFilesRequest +// - opts ...grpc.CallOption +func (_e *RepoServerServiceClient_Expecter) GetGitFiles(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_GetGitFiles_Call { + return &RepoServerServiceClient_GetGitFiles_Call{Call: _e.mock.On("GetGitFiles", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RepoServerServiceClient_GetGitFiles_Call) Run(run func(ctx context.Context, in *apiclient.GitFilesRequest, opts ...grpc.CallOption)) *RepoServerServiceClient_GetGitFiles_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*apiclient.GitFilesRequest), variadicArgs...) + }) + return _c +} + +func (_c *RepoServerServiceClient_GetGitFiles_Call) Return(_a0 *apiclient.GitFilesResponse, _a1 error) *RepoServerServiceClient_GetGitFiles_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerServiceClient_GetGitFiles_Call) RunAndReturn(run func(context.Context, *apiclient.GitFilesRequest, ...grpc.CallOption) (*apiclient.GitFilesResponse, error)) *RepoServerServiceClient_GetGitFiles_Call { + _c.Call.Return(run) + return _c +} + // GetHelmCharts provides a mock function with given fields: ctx, in, opts func (_m *RepoServerServiceClient) GetHelmCharts(ctx context.Context, in *apiclient.HelmChartsRequest, opts ...grpc.CallOption) (*apiclient.HelmChartsResponse, error) { _va := make([]interface{}, len(opts)) @@ -243,6 +435,43 @@ func (_m *RepoServerServiceClient) GetHelmCharts(ctx context.Context, in *apicli return r0, r1 } +// RepoServerServiceClient_GetHelmCharts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHelmCharts' +type RepoServerServiceClient_GetHelmCharts_Call struct { + *mock.Call +} + +// GetHelmCharts is a helper method to define mock.On call +// - ctx context.Context +// - in *apiclient.HelmChartsRequest +// - opts ...grpc.CallOption +func (_e *RepoServerServiceClient_Expecter) GetHelmCharts(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_GetHelmCharts_Call { + return &RepoServerServiceClient_GetHelmCharts_Call{Call: _e.mock.On("GetHelmCharts", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RepoServerServiceClient_GetHelmCharts_Call) Run(run func(ctx context.Context, in *apiclient.HelmChartsRequest, opts ...grpc.CallOption)) *RepoServerServiceClient_GetHelmCharts_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*apiclient.HelmChartsRequest), variadicArgs...) + }) + return _c +} + +func (_c *RepoServerServiceClient_GetHelmCharts_Call) Return(_a0 *apiclient.HelmChartsResponse, _a1 error) *RepoServerServiceClient_GetHelmCharts_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerServiceClient_GetHelmCharts_Call) RunAndReturn(run func(context.Context, *apiclient.HelmChartsRequest, ...grpc.CallOption) (*apiclient.HelmChartsResponse, error)) *RepoServerServiceClient_GetHelmCharts_Call { + _c.Call.Return(run) + return _c +} + // GetRevisionChartDetails provides a mock function with given fields: ctx, in, opts func (_m *RepoServerServiceClient) GetRevisionChartDetails(ctx context.Context, in *apiclient.RepoServerRevisionChartDetailsRequest, opts ...grpc.CallOption) (*v1alpha1.ChartDetails, error) { _va := make([]interface{}, len(opts)) @@ -280,6 +509,43 @@ func (_m *RepoServerServiceClient) GetRevisionChartDetails(ctx context.Context, return r0, r1 } +// RepoServerServiceClient_GetRevisionChartDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRevisionChartDetails' +type RepoServerServiceClient_GetRevisionChartDetails_Call struct { + *mock.Call +} + +// GetRevisionChartDetails is a helper method to define mock.On call +// - ctx context.Context +// - in *apiclient.RepoServerRevisionChartDetailsRequest +// - opts ...grpc.CallOption +func (_e *RepoServerServiceClient_Expecter) GetRevisionChartDetails(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_GetRevisionChartDetails_Call { + return &RepoServerServiceClient_GetRevisionChartDetails_Call{Call: _e.mock.On("GetRevisionChartDetails", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RepoServerServiceClient_GetRevisionChartDetails_Call) Run(run func(ctx context.Context, in *apiclient.RepoServerRevisionChartDetailsRequest, opts ...grpc.CallOption)) *RepoServerServiceClient_GetRevisionChartDetails_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*apiclient.RepoServerRevisionChartDetailsRequest), variadicArgs...) + }) + return _c +} + +func (_c *RepoServerServiceClient_GetRevisionChartDetails_Call) Return(_a0 *v1alpha1.ChartDetails, _a1 error) *RepoServerServiceClient_GetRevisionChartDetails_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerServiceClient_GetRevisionChartDetails_Call) RunAndReturn(run func(context.Context, *apiclient.RepoServerRevisionChartDetailsRequest, ...grpc.CallOption) (*v1alpha1.ChartDetails, error)) *RepoServerServiceClient_GetRevisionChartDetails_Call { + _c.Call.Return(run) + return _c +} + // GetRevisionMetadata provides a mock function with given fields: ctx, in, opts func (_m *RepoServerServiceClient) GetRevisionMetadata(ctx context.Context, in *apiclient.RepoServerRevisionMetadataRequest, opts ...grpc.CallOption) (*v1alpha1.RevisionMetadata, error) { _va := make([]interface{}, len(opts)) @@ -317,6 +583,43 @@ func (_m *RepoServerServiceClient) GetRevisionMetadata(ctx context.Context, in * return r0, r1 } +// RepoServerServiceClient_GetRevisionMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRevisionMetadata' +type RepoServerServiceClient_GetRevisionMetadata_Call struct { + *mock.Call +} + +// GetRevisionMetadata is a helper method to define mock.On call +// - ctx context.Context +// - in *apiclient.RepoServerRevisionMetadataRequest +// - opts ...grpc.CallOption +func (_e *RepoServerServiceClient_Expecter) GetRevisionMetadata(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_GetRevisionMetadata_Call { + return &RepoServerServiceClient_GetRevisionMetadata_Call{Call: _e.mock.On("GetRevisionMetadata", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RepoServerServiceClient_GetRevisionMetadata_Call) Run(run func(ctx context.Context, in *apiclient.RepoServerRevisionMetadataRequest, opts ...grpc.CallOption)) *RepoServerServiceClient_GetRevisionMetadata_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*apiclient.RepoServerRevisionMetadataRequest), variadicArgs...) + }) + return _c +} + +func (_c *RepoServerServiceClient_GetRevisionMetadata_Call) Return(_a0 *v1alpha1.RevisionMetadata, _a1 error) *RepoServerServiceClient_GetRevisionMetadata_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerServiceClient_GetRevisionMetadata_Call) RunAndReturn(run func(context.Context, *apiclient.RepoServerRevisionMetadataRequest, ...grpc.CallOption) (*v1alpha1.RevisionMetadata, error)) *RepoServerServiceClient_GetRevisionMetadata_Call { + _c.Call.Return(run) + return _c +} + // ListApps provides a mock function with given fields: ctx, in, opts func (_m *RepoServerServiceClient) ListApps(ctx context.Context, in *apiclient.ListAppsRequest, opts ...grpc.CallOption) (*apiclient.AppList, error) { _va := make([]interface{}, len(opts)) @@ -354,6 +657,43 @@ func (_m *RepoServerServiceClient) ListApps(ctx context.Context, in *apiclient.L return r0, r1 } +// RepoServerServiceClient_ListApps_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListApps' +type RepoServerServiceClient_ListApps_Call struct { + *mock.Call +} + +// ListApps is a helper method to define mock.On call +// - ctx context.Context +// - in *apiclient.ListAppsRequest +// - opts ...grpc.CallOption +func (_e *RepoServerServiceClient_Expecter) ListApps(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_ListApps_Call { + return &RepoServerServiceClient_ListApps_Call{Call: _e.mock.On("ListApps", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RepoServerServiceClient_ListApps_Call) Run(run func(ctx context.Context, in *apiclient.ListAppsRequest, opts ...grpc.CallOption)) *RepoServerServiceClient_ListApps_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*apiclient.ListAppsRequest), variadicArgs...) + }) + return _c +} + +func (_c *RepoServerServiceClient_ListApps_Call) Return(_a0 *apiclient.AppList, _a1 error) *RepoServerServiceClient_ListApps_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerServiceClient_ListApps_Call) RunAndReturn(run func(context.Context, *apiclient.ListAppsRequest, ...grpc.CallOption) (*apiclient.AppList, error)) *RepoServerServiceClient_ListApps_Call { + _c.Call.Return(run) + return _c +} + // ListPlugins provides a mock function with given fields: ctx, in, opts func (_m *RepoServerServiceClient) ListPlugins(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*apiclient.PluginList, error) { _va := make([]interface{}, len(opts)) @@ -391,6 +731,43 @@ func (_m *RepoServerServiceClient) ListPlugins(ctx context.Context, in *emptypb. return r0, r1 } +// RepoServerServiceClient_ListPlugins_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPlugins' +type RepoServerServiceClient_ListPlugins_Call struct { + *mock.Call +} + +// ListPlugins is a helper method to define mock.On call +// - ctx context.Context +// - in *emptypb.Empty +// - opts ...grpc.CallOption +func (_e *RepoServerServiceClient_Expecter) ListPlugins(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_ListPlugins_Call { + return &RepoServerServiceClient_ListPlugins_Call{Call: _e.mock.On("ListPlugins", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RepoServerServiceClient_ListPlugins_Call) Run(run func(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption)) *RepoServerServiceClient_ListPlugins_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*emptypb.Empty), variadicArgs...) + }) + return _c +} + +func (_c *RepoServerServiceClient_ListPlugins_Call) Return(_a0 *apiclient.PluginList, _a1 error) *RepoServerServiceClient_ListPlugins_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerServiceClient_ListPlugins_Call) RunAndReturn(run func(context.Context, *emptypb.Empty, ...grpc.CallOption) (*apiclient.PluginList, error)) *RepoServerServiceClient_ListPlugins_Call { + _c.Call.Return(run) + return _c +} + // ListRefs provides a mock function with given fields: ctx, in, opts func (_m *RepoServerServiceClient) ListRefs(ctx context.Context, in *apiclient.ListRefsRequest, opts ...grpc.CallOption) (*apiclient.Refs, error) { _va := make([]interface{}, len(opts)) @@ -428,6 +805,43 @@ func (_m *RepoServerServiceClient) ListRefs(ctx context.Context, in *apiclient.L return r0, r1 } +// RepoServerServiceClient_ListRefs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRefs' +type RepoServerServiceClient_ListRefs_Call struct { + *mock.Call +} + +// ListRefs is a helper method to define mock.On call +// - ctx context.Context +// - in *apiclient.ListRefsRequest +// - opts ...grpc.CallOption +func (_e *RepoServerServiceClient_Expecter) ListRefs(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_ListRefs_Call { + return &RepoServerServiceClient_ListRefs_Call{Call: _e.mock.On("ListRefs", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RepoServerServiceClient_ListRefs_Call) Run(run func(ctx context.Context, in *apiclient.ListRefsRequest, opts ...grpc.CallOption)) *RepoServerServiceClient_ListRefs_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*apiclient.ListRefsRequest), variadicArgs...) + }) + return _c +} + +func (_c *RepoServerServiceClient_ListRefs_Call) Return(_a0 *apiclient.Refs, _a1 error) *RepoServerServiceClient_ListRefs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerServiceClient_ListRefs_Call) RunAndReturn(run func(context.Context, *apiclient.ListRefsRequest, ...grpc.CallOption) (*apiclient.Refs, error)) *RepoServerServiceClient_ListRefs_Call { + _c.Call.Return(run) + return _c +} + // ResolveRevision provides a mock function with given fields: ctx, in, opts func (_m *RepoServerServiceClient) ResolveRevision(ctx context.Context, in *apiclient.ResolveRevisionRequest, opts ...grpc.CallOption) (*apiclient.ResolveRevisionResponse, error) { _va := make([]interface{}, len(opts)) @@ -465,6 +879,43 @@ func (_m *RepoServerServiceClient) ResolveRevision(ctx context.Context, in *apic return r0, r1 } +// RepoServerServiceClient_ResolveRevision_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResolveRevision' +type RepoServerServiceClient_ResolveRevision_Call struct { + *mock.Call +} + +// ResolveRevision is a helper method to define mock.On call +// - ctx context.Context +// - in *apiclient.ResolveRevisionRequest +// - opts ...grpc.CallOption +func (_e *RepoServerServiceClient_Expecter) ResolveRevision(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_ResolveRevision_Call { + return &RepoServerServiceClient_ResolveRevision_Call{Call: _e.mock.On("ResolveRevision", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RepoServerServiceClient_ResolveRevision_Call) Run(run func(ctx context.Context, in *apiclient.ResolveRevisionRequest, opts ...grpc.CallOption)) *RepoServerServiceClient_ResolveRevision_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*apiclient.ResolveRevisionRequest), variadicArgs...) + }) + return _c +} + +func (_c *RepoServerServiceClient_ResolveRevision_Call) Return(_a0 *apiclient.ResolveRevisionResponse, _a1 error) *RepoServerServiceClient_ResolveRevision_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerServiceClient_ResolveRevision_Call) RunAndReturn(run func(context.Context, *apiclient.ResolveRevisionRequest, ...grpc.CallOption) (*apiclient.ResolveRevisionResponse, error)) *RepoServerServiceClient_ResolveRevision_Call { + _c.Call.Return(run) + return _c +} + // TestRepository provides a mock function with given fields: ctx, in, opts func (_m *RepoServerServiceClient) TestRepository(ctx context.Context, in *apiclient.TestRepositoryRequest, opts ...grpc.CallOption) (*apiclient.TestRepositoryResponse, error) { _va := make([]interface{}, len(opts)) @@ -502,6 +953,43 @@ func (_m *RepoServerServiceClient) TestRepository(ctx context.Context, in *apicl return r0, r1 } +// RepoServerServiceClient_TestRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TestRepository' +type RepoServerServiceClient_TestRepository_Call struct { + *mock.Call +} + +// TestRepository is a helper method to define mock.On call +// - ctx context.Context +// - in *apiclient.TestRepositoryRequest +// - opts ...grpc.CallOption +func (_e *RepoServerServiceClient_Expecter) TestRepository(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_TestRepository_Call { + return &RepoServerServiceClient_TestRepository_Call{Call: _e.mock.On("TestRepository", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RepoServerServiceClient_TestRepository_Call) Run(run func(ctx context.Context, in *apiclient.TestRepositoryRequest, opts ...grpc.CallOption)) *RepoServerServiceClient_TestRepository_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*apiclient.TestRepositoryRequest), variadicArgs...) + }) + return _c +} + +func (_c *RepoServerServiceClient_TestRepository_Call) Return(_a0 *apiclient.TestRepositoryResponse, _a1 error) *RepoServerServiceClient_TestRepository_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerServiceClient_TestRepository_Call) RunAndReturn(run func(context.Context, *apiclient.TestRepositoryRequest, ...grpc.CallOption) (*apiclient.TestRepositoryResponse, error)) *RepoServerServiceClient_TestRepository_Call { + _c.Call.Return(run) + return _c +} + // UpdateRevisionForPaths provides a mock function with given fields: ctx, in, opts func (_m *RepoServerServiceClient) UpdateRevisionForPaths(ctx context.Context, in *apiclient.UpdateRevisionForPathsRequest, opts ...grpc.CallOption) (*apiclient.UpdateRevisionForPathsResponse, error) { _va := make([]interface{}, len(opts)) @@ -539,6 +1027,43 @@ func (_m *RepoServerServiceClient) UpdateRevisionForPaths(ctx context.Context, i return r0, r1 } +// RepoServerServiceClient_UpdateRevisionForPaths_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRevisionForPaths' +type RepoServerServiceClient_UpdateRevisionForPaths_Call struct { + *mock.Call +} + +// UpdateRevisionForPaths is a helper method to define mock.On call +// - ctx context.Context +// - in *apiclient.UpdateRevisionForPathsRequest +// - opts ...grpc.CallOption +func (_e *RepoServerServiceClient_Expecter) UpdateRevisionForPaths(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_UpdateRevisionForPaths_Call { + return &RepoServerServiceClient_UpdateRevisionForPaths_Call{Call: _e.mock.On("UpdateRevisionForPaths", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RepoServerServiceClient_UpdateRevisionForPaths_Call) Run(run func(ctx context.Context, in *apiclient.UpdateRevisionForPathsRequest, opts ...grpc.CallOption)) *RepoServerServiceClient_UpdateRevisionForPaths_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*apiclient.UpdateRevisionForPathsRequest), variadicArgs...) + }) + return _c +} + +func (_c *RepoServerServiceClient_UpdateRevisionForPaths_Call) Return(_a0 *apiclient.UpdateRevisionForPathsResponse, _a1 error) *RepoServerServiceClient_UpdateRevisionForPaths_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerServiceClient_UpdateRevisionForPaths_Call) RunAndReturn(run func(context.Context, *apiclient.UpdateRevisionForPathsRequest, ...grpc.CallOption) (*apiclient.UpdateRevisionForPathsResponse, error)) *RepoServerServiceClient_UpdateRevisionForPaths_Call { + _c.Call.Return(run) + return _c +} + // NewRepoServerServiceClient creates a new instance of RepoServerServiceClient. 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 NewRepoServerServiceClient(t interface { diff --git a/reposerver/apiclient/mocks/RepoServerService_GenerateManifestWithFilesClient.go b/reposerver/apiclient/mocks/RepoServerService_GenerateManifestWithFilesClient.go index dd21d0ce94146..70ce4bb3319d3 100644 --- a/reposerver/apiclient/mocks/RepoServerService_GenerateManifestWithFilesClient.go +++ b/reposerver/apiclient/mocks/RepoServerService_GenerateManifestWithFilesClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type RepoServerService_GenerateManifestWithFilesClient struct { mock.Mock } +type RepoServerService_GenerateManifestWithFilesClient_Expecter struct { + mock *mock.Mock +} + +func (_m *RepoServerService_GenerateManifestWithFilesClient) EXPECT() *RepoServerService_GenerateManifestWithFilesClient_Expecter { + return &RepoServerService_GenerateManifestWithFilesClient_Expecter{mock: &_m.Mock} +} + // CloseAndRecv provides a mock function with no fields func (_m *RepoServerService_GenerateManifestWithFilesClient) CloseAndRecv() (*apiclient.ManifestResponse, error) { ret := _m.Called() @@ -47,6 +55,33 @@ func (_m *RepoServerService_GenerateManifestWithFilesClient) CloseAndRecv() (*ap return r0, r1 } +// RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CloseAndRecv' +type RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call struct { + *mock.Call +} + +// CloseAndRecv is a helper method to define mock.On call +func (_e *RepoServerService_GenerateManifestWithFilesClient_Expecter) CloseAndRecv() *RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call { + return &RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call{Call: _e.mock.On("CloseAndRecv")} +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call) Run(run func()) *RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call) Return(_a0 *apiclient.ManifestResponse, _a1 error) *RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call) RunAndReturn(run func() (*apiclient.ManifestResponse, error)) *RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call { + _c.Call.Return(run) + return _c +} + // CloseSend provides a mock function with no fields func (_m *RepoServerService_GenerateManifestWithFilesClient) CloseSend() error { ret := _m.Called() @@ -65,6 +100,33 @@ func (_m *RepoServerService_GenerateManifestWithFilesClient) CloseSend() error { return r0 } +// RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CloseSend' +type RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call struct { + *mock.Call +} + +// CloseSend is a helper method to define mock.On call +func (_e *RepoServerService_GenerateManifestWithFilesClient_Expecter) CloseSend() *RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call { + return &RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call{Call: _e.mock.On("CloseSend")} +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call) Run(run func()) *RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call) Return(_a0 error) *RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call) RunAndReturn(run func() error) *RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call { + _c.Call.Return(run) + return _c +} + // Context provides a mock function with no fields func (_m *RepoServerService_GenerateManifestWithFilesClient) Context() context.Context { ret := _m.Called() @@ -85,6 +147,33 @@ func (_m *RepoServerService_GenerateManifestWithFilesClient) Context() context.C return r0 } +// RepoServerService_GenerateManifestWithFilesClient_Context_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Context' +type RepoServerService_GenerateManifestWithFilesClient_Context_Call struct { + *mock.Call +} + +// Context is a helper method to define mock.On call +func (_e *RepoServerService_GenerateManifestWithFilesClient_Expecter) Context() *RepoServerService_GenerateManifestWithFilesClient_Context_Call { + return &RepoServerService_GenerateManifestWithFilesClient_Context_Call{Call: _e.mock.On("Context")} +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_Context_Call) Run(run func()) *RepoServerService_GenerateManifestWithFilesClient_Context_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_Context_Call) Return(_a0 context.Context) *RepoServerService_GenerateManifestWithFilesClient_Context_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_Context_Call) RunAndReturn(run func() context.Context) *RepoServerService_GenerateManifestWithFilesClient_Context_Call { + _c.Call.Return(run) + return _c +} + // Header provides a mock function with no fields func (_m *RepoServerService_GenerateManifestWithFilesClient) Header() (metadata.MD, error) { ret := _m.Called() @@ -115,8 +204,35 @@ func (_m *RepoServerService_GenerateManifestWithFilesClient) Header() (metadata. return r0, r1 } +// RepoServerService_GenerateManifestWithFilesClient_Header_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Header' +type RepoServerService_GenerateManifestWithFilesClient_Header_Call struct { + *mock.Call +} + +// Header is a helper method to define mock.On call +func (_e *RepoServerService_GenerateManifestWithFilesClient_Expecter) Header() *RepoServerService_GenerateManifestWithFilesClient_Header_Call { + return &RepoServerService_GenerateManifestWithFilesClient_Header_Call{Call: _e.mock.On("Header")} +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_Header_Call) Run(run func()) *RepoServerService_GenerateManifestWithFilesClient_Header_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_Header_Call) Return(_a0 metadata.MD, _a1 error) *RepoServerService_GenerateManifestWithFilesClient_Header_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_Header_Call) RunAndReturn(run func() (metadata.MD, error)) *RepoServerService_GenerateManifestWithFilesClient_Header_Call { + _c.Call.Return(run) + return _c +} + // RecvMsg provides a mock function with given fields: m -func (_m *RepoServerService_GenerateManifestWithFilesClient) RecvMsg(m interface{}) error { +func (_m *RepoServerService_GenerateManifestWithFilesClient) RecvMsg(m any) error { ret := _m.Called(m) if len(ret) == 0 { @@ -124,7 +240,7 @@ func (_m *RepoServerService_GenerateManifestWithFilesClient) RecvMsg(m interface } var r0 error - if rf, ok := ret.Get(0).(func(interface{}) error); ok { + if rf, ok := ret.Get(0).(func(any) error); ok { r0 = rf(m) } else { r0 = ret.Error(0) @@ -133,6 +249,34 @@ func (_m *RepoServerService_GenerateManifestWithFilesClient) RecvMsg(m interface return r0 } +// RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecvMsg' +type RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call struct { + *mock.Call +} + +// RecvMsg is a helper method to define mock.On call +// - m any +func (_e *RepoServerService_GenerateManifestWithFilesClient_Expecter) RecvMsg(m interface{}) *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call { + return &RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call{Call: _e.mock.On("RecvMsg", m)} +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call) Run(run func(m any)) *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(any)) + }) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call) Return(_a0 error) *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call) RunAndReturn(run func(any) error) *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call { + _c.Call.Return(run) + return _c +} + // Send provides a mock function with given fields: _a0 func (_m *RepoServerService_GenerateManifestWithFilesClient) Send(_a0 *apiclient.ManifestRequestWithFiles) error { ret := _m.Called(_a0) @@ -151,8 +295,36 @@ func (_m *RepoServerService_GenerateManifestWithFilesClient) Send(_a0 *apiclient return r0 } +// RepoServerService_GenerateManifestWithFilesClient_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' +type RepoServerService_GenerateManifestWithFilesClient_Send_Call struct { + *mock.Call +} + +// Send is a helper method to define mock.On call +// - _a0 *apiclient.ManifestRequestWithFiles +func (_e *RepoServerService_GenerateManifestWithFilesClient_Expecter) Send(_a0 interface{}) *RepoServerService_GenerateManifestWithFilesClient_Send_Call { + return &RepoServerService_GenerateManifestWithFilesClient_Send_Call{Call: _e.mock.On("Send", _a0)} +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_Send_Call) Run(run func(_a0 *apiclient.ManifestRequestWithFiles)) *RepoServerService_GenerateManifestWithFilesClient_Send_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*apiclient.ManifestRequestWithFiles)) + }) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_Send_Call) Return(_a0 error) *RepoServerService_GenerateManifestWithFilesClient_Send_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_Send_Call) RunAndReturn(run func(*apiclient.ManifestRequestWithFiles) error) *RepoServerService_GenerateManifestWithFilesClient_Send_Call { + _c.Call.Return(run) + return _c +} + // SendMsg provides a mock function with given fields: m -func (_m *RepoServerService_GenerateManifestWithFilesClient) SendMsg(m interface{}) error { +func (_m *RepoServerService_GenerateManifestWithFilesClient) SendMsg(m any) error { ret := _m.Called(m) if len(ret) == 0 { @@ -160,7 +332,7 @@ func (_m *RepoServerService_GenerateManifestWithFilesClient) SendMsg(m interface } var r0 error - if rf, ok := ret.Get(0).(func(interface{}) error); ok { + if rf, ok := ret.Get(0).(func(any) error); ok { r0 = rf(m) } else { r0 = ret.Error(0) @@ -169,6 +341,34 @@ func (_m *RepoServerService_GenerateManifestWithFilesClient) SendMsg(m interface return r0 } +// RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendMsg' +type RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call struct { + *mock.Call +} + +// SendMsg is a helper method to define mock.On call +// - m any +func (_e *RepoServerService_GenerateManifestWithFilesClient_Expecter) SendMsg(m interface{}) *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call { + return &RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call{Call: _e.mock.On("SendMsg", m)} +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call) Run(run func(m any)) *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(any)) + }) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call) Return(_a0 error) *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call) RunAndReturn(run func(any) error) *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call { + _c.Call.Return(run) + return _c +} + // Trailer provides a mock function with no fields func (_m *RepoServerService_GenerateManifestWithFilesClient) Trailer() metadata.MD { ret := _m.Called() @@ -189,6 +389,33 @@ func (_m *RepoServerService_GenerateManifestWithFilesClient) Trailer() metadata. return r0 } +// RepoServerService_GenerateManifestWithFilesClient_Trailer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Trailer' +type RepoServerService_GenerateManifestWithFilesClient_Trailer_Call struct { + *mock.Call +} + +// Trailer is a helper method to define mock.On call +func (_e *RepoServerService_GenerateManifestWithFilesClient_Expecter) Trailer() *RepoServerService_GenerateManifestWithFilesClient_Trailer_Call { + return &RepoServerService_GenerateManifestWithFilesClient_Trailer_Call{Call: _e.mock.On("Trailer")} +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_Trailer_Call) Run(run func()) *RepoServerService_GenerateManifestWithFilesClient_Trailer_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_Trailer_Call) Return(_a0 metadata.MD) *RepoServerService_GenerateManifestWithFilesClient_Trailer_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RepoServerService_GenerateManifestWithFilesClient_Trailer_Call) RunAndReturn(run func() metadata.MD) *RepoServerService_GenerateManifestWithFilesClient_Trailer_Call { + _c.Call.Return(run) + return _c +} + // NewRepoServerService_GenerateManifestWithFilesClient creates a new instance of RepoServerService_GenerateManifestWithFilesClient. 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 NewRepoServerService_GenerateManifestWithFilesClient(t interface { diff --git a/server/application/mocks/Broadcaster.go b/server/application/mocks/Broadcaster.go index 51350d2d7be56..8e17abb79bfeb 100644 --- a/server/application/mocks/Broadcaster.go +++ b/server/application/mocks/Broadcaster.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -12,21 +12,115 @@ type Broadcaster struct { mock.Mock } +type Broadcaster_Expecter struct { + mock *mock.Mock +} + +func (_m *Broadcaster) EXPECT() *Broadcaster_Expecter { + return &Broadcaster_Expecter{mock: &_m.Mock} +} + // OnAdd provides a mock function with given fields: _a0, _a1 -func (_m *Broadcaster) OnAdd(_a0 interface{}, _a1 bool) { +func (_m *Broadcaster) OnAdd(_a0 any, _a1 bool) { _m.Called(_a0, _a1) } +// Broadcaster_OnAdd_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnAdd' +type Broadcaster_OnAdd_Call struct { + *mock.Call +} + +// OnAdd is a helper method to define mock.On call +// - _a0 any +// - _a1 bool +func (_e *Broadcaster_Expecter) OnAdd(_a0 interface{}, _a1 interface{}) *Broadcaster_OnAdd_Call { + return &Broadcaster_OnAdd_Call{Call: _e.mock.On("OnAdd", _a0, _a1)} +} + +func (_c *Broadcaster_OnAdd_Call) Run(run func(_a0 any, _a1 bool)) *Broadcaster_OnAdd_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(any), args[1].(bool)) + }) + return _c +} + +func (_c *Broadcaster_OnAdd_Call) Return() *Broadcaster_OnAdd_Call { + _c.Call.Return() + return _c +} + +func (_c *Broadcaster_OnAdd_Call) RunAndReturn(run func(any, bool)) *Broadcaster_OnAdd_Call { + _c.Run(run) + return _c +} + // OnDelete provides a mock function with given fields: _a0 -func (_m *Broadcaster) OnDelete(_a0 interface{}) { +func (_m *Broadcaster) OnDelete(_a0 any) { _m.Called(_a0) } +// Broadcaster_OnDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnDelete' +type Broadcaster_OnDelete_Call struct { + *mock.Call +} + +// OnDelete is a helper method to define mock.On call +// - _a0 any +func (_e *Broadcaster_Expecter) OnDelete(_a0 interface{}) *Broadcaster_OnDelete_Call { + return &Broadcaster_OnDelete_Call{Call: _e.mock.On("OnDelete", _a0)} +} + +func (_c *Broadcaster_OnDelete_Call) Run(run func(_a0 any)) *Broadcaster_OnDelete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(any)) + }) + return _c +} + +func (_c *Broadcaster_OnDelete_Call) Return() *Broadcaster_OnDelete_Call { + _c.Call.Return() + return _c +} + +func (_c *Broadcaster_OnDelete_Call) RunAndReturn(run func(any)) *Broadcaster_OnDelete_Call { + _c.Run(run) + return _c +} + // OnUpdate provides a mock function with given fields: _a0, _a1 -func (_m *Broadcaster) OnUpdate(_a0 interface{}, _a1 interface{}) { +func (_m *Broadcaster) OnUpdate(_a0 any, _a1 any) { _m.Called(_a0, _a1) } +// Broadcaster_OnUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnUpdate' +type Broadcaster_OnUpdate_Call struct { + *mock.Call +} + +// OnUpdate is a helper method to define mock.On call +// - _a0 any +// - _a1 any +func (_e *Broadcaster_Expecter) OnUpdate(_a0 interface{}, _a1 interface{}) *Broadcaster_OnUpdate_Call { + return &Broadcaster_OnUpdate_Call{Call: _e.mock.On("OnUpdate", _a0, _a1)} +} + +func (_c *Broadcaster_OnUpdate_Call) Run(run func(_a0 any, _a1 any)) *Broadcaster_OnUpdate_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(any), args[1].(any)) + }) + return _c +} + +func (_c *Broadcaster_OnUpdate_Call) Return() *Broadcaster_OnUpdate_Call { + _c.Call.Return() + return _c +} + +func (_c *Broadcaster_OnUpdate_Call) RunAndReturn(run func(any, any)) *Broadcaster_OnUpdate_Call { + _c.Run(run) + return _c +} + // Subscribe provides a mock function with given fields: ch, filters func (_m *Broadcaster) Subscribe(ch chan *v1alpha1.ApplicationWatchEvent, filters ...func(*v1alpha1.ApplicationWatchEvent) bool) func() { _va := make([]interface{}, len(filters)) @@ -54,6 +148,42 @@ func (_m *Broadcaster) Subscribe(ch chan *v1alpha1.ApplicationWatchEvent, filter return r0 } +// Broadcaster_Subscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscribe' +type Broadcaster_Subscribe_Call struct { + *mock.Call +} + +// Subscribe is a helper method to define mock.On call +// - ch chan *v1alpha1.ApplicationWatchEvent +// - filters ...func(*v1alpha1.ApplicationWatchEvent) bool +func (_e *Broadcaster_Expecter) Subscribe(ch interface{}, filters ...interface{}) *Broadcaster_Subscribe_Call { + return &Broadcaster_Subscribe_Call{Call: _e.mock.On("Subscribe", + append([]interface{}{ch}, filters...)...)} +} + +func (_c *Broadcaster_Subscribe_Call) Run(run func(ch chan *v1alpha1.ApplicationWatchEvent, filters ...func(*v1alpha1.ApplicationWatchEvent) bool)) *Broadcaster_Subscribe_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]func(*v1alpha1.ApplicationWatchEvent) bool, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(func(*v1alpha1.ApplicationWatchEvent) bool) + } + } + run(args[0].(chan *v1alpha1.ApplicationWatchEvent), variadicArgs...) + }) + return _c +} + +func (_c *Broadcaster_Subscribe_Call) Return(_a0 func()) *Broadcaster_Subscribe_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcaster_Subscribe_Call) RunAndReturn(run func(chan *v1alpha1.ApplicationWatchEvent, ...func(*v1alpha1.ApplicationWatchEvent) bool) func()) *Broadcaster_Subscribe_Call { + _c.Call.Return(run) + return _c +} + // NewBroadcaster creates a new instance of Broadcaster. 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 NewBroadcaster(t interface { diff --git a/server/extension/mocks/ApplicationGetter.go b/server/extension/mocks/ApplicationGetter.go index 842acbcf35517..cceafdb288aba 100644 --- a/server/extension/mocks/ApplicationGetter.go +++ b/server/extension/mocks/ApplicationGetter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -12,6 +12,14 @@ type ApplicationGetter struct { mock.Mock } +type ApplicationGetter_Expecter struct { + mock *mock.Mock +} + +func (_m *ApplicationGetter) EXPECT() *ApplicationGetter_Expecter { + return &ApplicationGetter_Expecter{mock: &_m.Mock} +} + // Get provides a mock function with given fields: ns, name func (_m *ApplicationGetter) Get(ns string, name string) (*v1alpha1.Application, error) { ret := _m.Called(ns, name) @@ -42,6 +50,35 @@ func (_m *ApplicationGetter) Get(ns string, name string) (*v1alpha1.Application, return r0, r1 } +// ApplicationGetter_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type ApplicationGetter_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ns string +// - name string +func (_e *ApplicationGetter_Expecter) Get(ns interface{}, name interface{}) *ApplicationGetter_Get_Call { + return &ApplicationGetter_Get_Call{Call: _e.mock.On("Get", ns, name)} +} + +func (_c *ApplicationGetter_Get_Call) Run(run func(ns string, name string)) *ApplicationGetter_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *ApplicationGetter_Get_Call) Return(_a0 *v1alpha1.Application, _a1 error) *ApplicationGetter_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ApplicationGetter_Get_Call) RunAndReturn(run func(string, string) (*v1alpha1.Application, error)) *ApplicationGetter_Get_Call { + _c.Call.Return(run) + return _c +} + // NewApplicationGetter creates a new instance of ApplicationGetter. 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 NewApplicationGetter(t interface { diff --git a/server/extension/mocks/ExtensionMetricsRegistry.go b/server/extension/mocks/ExtensionMetricsRegistry.go index b96b0951fa3cb..72c189ab09ebf 100644 --- a/server/extension/mocks/ExtensionMetricsRegistry.go +++ b/server/extension/mocks/ExtensionMetricsRegistry.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -13,16 +13,82 @@ type ExtensionMetricsRegistry struct { mock.Mock } +type ExtensionMetricsRegistry_Expecter struct { + mock *mock.Mock +} + +func (_m *ExtensionMetricsRegistry) EXPECT() *ExtensionMetricsRegistry_Expecter { + return &ExtensionMetricsRegistry_Expecter{mock: &_m.Mock} +} + // IncExtensionRequestCounter provides a mock function with given fields: _a0, status func (_m *ExtensionMetricsRegistry) IncExtensionRequestCounter(_a0 string, status int) { _m.Called(_a0, status) } +// ExtensionMetricsRegistry_IncExtensionRequestCounter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncExtensionRequestCounter' +type ExtensionMetricsRegistry_IncExtensionRequestCounter_Call struct { + *mock.Call +} + +// IncExtensionRequestCounter is a helper method to define mock.On call +// - _a0 string +// - status int +func (_e *ExtensionMetricsRegistry_Expecter) IncExtensionRequestCounter(_a0 interface{}, status interface{}) *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call { + return &ExtensionMetricsRegistry_IncExtensionRequestCounter_Call{Call: _e.mock.On("IncExtensionRequestCounter", _a0, status)} +} + +func (_c *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call) Run(run func(_a0 string, status int)) *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(int)) + }) + return _c +} + +func (_c *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call) Return() *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call { + _c.Call.Return() + return _c +} + +func (_c *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call) RunAndReturn(run func(string, int)) *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call { + _c.Run(run) + return _c +} + // ObserveExtensionRequestDuration provides a mock function with given fields: _a0, duration func (_m *ExtensionMetricsRegistry) ObserveExtensionRequestDuration(_a0 string, duration time.Duration) { _m.Called(_a0, duration) } +// ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ObserveExtensionRequestDuration' +type ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call struct { + *mock.Call +} + +// ObserveExtensionRequestDuration is a helper method to define mock.On call +// - _a0 string +// - duration time.Duration +func (_e *ExtensionMetricsRegistry_Expecter) ObserveExtensionRequestDuration(_a0 interface{}, duration interface{}) *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call { + return &ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call{Call: _e.mock.On("ObserveExtensionRequestDuration", _a0, duration)} +} + +func (_c *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call) Run(run func(_a0 string, duration time.Duration)) *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(time.Duration)) + }) + return _c +} + +func (_c *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call) Return() *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call { + _c.Call.Return() + return _c +} + +func (_c *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call) RunAndReturn(run func(string, time.Duration)) *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call { + _c.Run(run) + return _c +} + // NewExtensionMetricsRegistry creates a new instance of ExtensionMetricsRegistry. 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 NewExtensionMetricsRegistry(t interface { diff --git a/server/extension/mocks/ProjectGetter.go b/server/extension/mocks/ProjectGetter.go index 3553a20e1321d..ef761dcd80cd3 100644 --- a/server/extension/mocks/ProjectGetter.go +++ b/server/extension/mocks/ProjectGetter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -12,6 +12,14 @@ type ProjectGetter struct { mock.Mock } +type ProjectGetter_Expecter struct { + mock *mock.Mock +} + +func (_m *ProjectGetter) EXPECT() *ProjectGetter_Expecter { + return &ProjectGetter_Expecter{mock: &_m.Mock} +} + // Get provides a mock function with given fields: name func (_m *ProjectGetter) Get(name string) (*v1alpha1.AppProject, error) { ret := _m.Called(name) @@ -42,6 +50,34 @@ func (_m *ProjectGetter) Get(name string) (*v1alpha1.AppProject, error) { return r0, r1 } +// ProjectGetter_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type ProjectGetter_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - name string +func (_e *ProjectGetter_Expecter) Get(name interface{}) *ProjectGetter_Get_Call { + return &ProjectGetter_Get_Call{Call: _e.mock.On("Get", name)} +} + +func (_c *ProjectGetter_Get_Call) Run(run func(name string)) *ProjectGetter_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *ProjectGetter_Get_Call) Return(_a0 *v1alpha1.AppProject, _a1 error) *ProjectGetter_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProjectGetter_Get_Call) RunAndReturn(run func(string) (*v1alpha1.AppProject, error)) *ProjectGetter_Get_Call { + _c.Call.Return(run) + return _c +} + // GetClusters provides a mock function with given fields: project func (_m *ProjectGetter) GetClusters(project string) ([]*v1alpha1.Cluster, error) { ret := _m.Called(project) @@ -72,6 +108,34 @@ func (_m *ProjectGetter) GetClusters(project string) ([]*v1alpha1.Cluster, error return r0, r1 } +// ProjectGetter_GetClusters_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClusters' +type ProjectGetter_GetClusters_Call struct { + *mock.Call +} + +// GetClusters is a helper method to define mock.On call +// - project string +func (_e *ProjectGetter_Expecter) GetClusters(project interface{}) *ProjectGetter_GetClusters_Call { + return &ProjectGetter_GetClusters_Call{Call: _e.mock.On("GetClusters", project)} +} + +func (_c *ProjectGetter_GetClusters_Call) Run(run func(project string)) *ProjectGetter_GetClusters_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *ProjectGetter_GetClusters_Call) Return(_a0 []*v1alpha1.Cluster, _a1 error) *ProjectGetter_GetClusters_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProjectGetter_GetClusters_Call) RunAndReturn(run func(string) ([]*v1alpha1.Cluster, error)) *ProjectGetter_GetClusters_Call { + _c.Call.Return(run) + return _c +} + // NewProjectGetter creates a new instance of ProjectGetter. 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 NewProjectGetter(t interface { diff --git a/server/extension/mocks/RbacEnforcer.go b/server/extension/mocks/RbacEnforcer.go index c37e2cdb543a0..bf00e63a7678b 100644 --- a/server/extension/mocks/RbacEnforcer.go +++ b/server/extension/mocks/RbacEnforcer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -9,8 +9,16 @@ type RbacEnforcer struct { mock.Mock } +type RbacEnforcer_Expecter struct { + mock *mock.Mock +} + +func (_m *RbacEnforcer) EXPECT() *RbacEnforcer_Expecter { + return &RbacEnforcer_Expecter{mock: &_m.Mock} +} + // EnforceErr provides a mock function with given fields: rvals -func (_m *RbacEnforcer) EnforceErr(rvals ...interface{}) error { +func (_m *RbacEnforcer) EnforceErr(rvals ...any) error { var _ca []interface{} _ca = append(_ca, rvals...) ret := _m.Called(_ca...) @@ -20,7 +28,7 @@ func (_m *RbacEnforcer) EnforceErr(rvals ...interface{}) error { } var r0 error - if rf, ok := ret.Get(0).(func(...interface{}) error); ok { + if rf, ok := ret.Get(0).(func(...any) error); ok { r0 = rf(rvals...) } else { r0 = ret.Error(0) @@ -29,6 +37,41 @@ func (_m *RbacEnforcer) EnforceErr(rvals ...interface{}) error { return r0 } +// RbacEnforcer_EnforceErr_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnforceErr' +type RbacEnforcer_EnforceErr_Call struct { + *mock.Call +} + +// EnforceErr is a helper method to define mock.On call +// - rvals ...any +func (_e *RbacEnforcer_Expecter) EnforceErr(rvals ...interface{}) *RbacEnforcer_EnforceErr_Call { + return &RbacEnforcer_EnforceErr_Call{Call: _e.mock.On("EnforceErr", + append([]interface{}{}, rvals...)...)} +} + +func (_c *RbacEnforcer_EnforceErr_Call) Run(run func(rvals ...any)) *RbacEnforcer_EnforceErr_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]any, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(any) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *RbacEnforcer_EnforceErr_Call) Return(_a0 error) *RbacEnforcer_EnforceErr_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RbacEnforcer_EnforceErr_Call) RunAndReturn(run func(...any) error) *RbacEnforcer_EnforceErr_Call { + _c.Call.Return(run) + return _c +} + // NewRbacEnforcer creates a new instance of RbacEnforcer. 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 NewRbacEnforcer(t interface { diff --git a/server/extension/mocks/SettingsGetter.go b/server/extension/mocks/SettingsGetter.go index 2dd298398535f..4ca21a1f1b4a1 100644 --- a/server/extension/mocks/SettingsGetter.go +++ b/server/extension/mocks/SettingsGetter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -12,6 +12,14 @@ type SettingsGetter struct { mock.Mock } +type SettingsGetter_Expecter struct { + mock *mock.Mock +} + +func (_m *SettingsGetter) EXPECT() *SettingsGetter_Expecter { + return &SettingsGetter_Expecter{mock: &_m.Mock} +} + // Get provides a mock function with no fields func (_m *SettingsGetter) Get() (*settings.ArgoCDSettings, error) { ret := _m.Called() @@ -42,6 +50,33 @@ func (_m *SettingsGetter) Get() (*settings.ArgoCDSettings, error) { return r0, r1 } +// SettingsGetter_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type SettingsGetter_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +func (_e *SettingsGetter_Expecter) Get() *SettingsGetter_Get_Call { + return &SettingsGetter_Get_Call{Call: _e.mock.On("Get")} +} + +func (_c *SettingsGetter_Get_Call) Run(run func()) *SettingsGetter_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *SettingsGetter_Get_Call) Return(_a0 *settings.ArgoCDSettings, _a1 error) *SettingsGetter_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SettingsGetter_Get_Call) RunAndReturn(run func() (*settings.ArgoCDSettings, error)) *SettingsGetter_Get_Call { + _c.Call.Return(run) + return _c +} + // NewSettingsGetter creates a new instance of SettingsGetter. 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 NewSettingsGetter(t interface { diff --git a/server/extension/mocks/UserGetter.go b/server/extension/mocks/UserGetter.go index 5a40962a5f7c7..f170ea8e36a3c 100644 --- a/server/extension/mocks/UserGetter.go +++ b/server/extension/mocks/UserGetter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -13,6 +13,14 @@ type UserGetter struct { mock.Mock } +type UserGetter_Expecter struct { + mock *mock.Mock +} + +func (_m *UserGetter) EXPECT() *UserGetter_Expecter { + return &UserGetter_Expecter{mock: &_m.Mock} +} + // GetGroups provides a mock function with given fields: ctx func (_m *UserGetter) GetGroups(ctx context.Context) []string { ret := _m.Called(ctx) @@ -33,6 +41,34 @@ func (_m *UserGetter) GetGroups(ctx context.Context) []string { return r0 } +// UserGetter_GetGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroups' +type UserGetter_GetGroups_Call struct { + *mock.Call +} + +// GetGroups is a helper method to define mock.On call +// - ctx context.Context +func (_e *UserGetter_Expecter) GetGroups(ctx interface{}) *UserGetter_GetGroups_Call { + return &UserGetter_GetGroups_Call{Call: _e.mock.On("GetGroups", ctx)} +} + +func (_c *UserGetter_GetGroups_Call) Run(run func(ctx context.Context)) *UserGetter_GetGroups_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *UserGetter_GetGroups_Call) Return(_a0 []string) *UserGetter_GetGroups_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *UserGetter_GetGroups_Call) RunAndReturn(run func(context.Context) []string) *UserGetter_GetGroups_Call { + _c.Call.Return(run) + return _c +} + // GetUser provides a mock function with given fields: ctx func (_m *UserGetter) GetUser(ctx context.Context) string { ret := _m.Called(ctx) @@ -51,6 +87,34 @@ func (_m *UserGetter) GetUser(ctx context.Context) string { return r0 } +// UserGetter_GetUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUser' +type UserGetter_GetUser_Call struct { + *mock.Call +} + +// GetUser is a helper method to define mock.On call +// - ctx context.Context +func (_e *UserGetter_Expecter) GetUser(ctx interface{}) *UserGetter_GetUser_Call { + return &UserGetter_GetUser_Call{Call: _e.mock.On("GetUser", ctx)} +} + +func (_c *UserGetter_GetUser_Call) Run(run func(ctx context.Context)) *UserGetter_GetUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *UserGetter_GetUser_Call) Return(_a0 string) *UserGetter_GetUser_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *UserGetter_GetUser_Call) RunAndReturn(run func(context.Context) string) *UserGetter_GetUser_Call { + _c.Call.Return(run) + return _c +} + // NewUserGetter creates a new instance of UserGetter. 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 NewUserGetter(t interface { diff --git a/util/db/mocks/ArgoDB.go b/util/db/mocks/ArgoDB.go index 896e4f9ccca2d..500b29b3af566 100644 --- a/util/db/mocks/ArgoDB.go +++ b/util/db/mocks/ArgoDB.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -16,6 +16,14 @@ type ArgoDB struct { mock.Mock } +type ArgoDB_Expecter struct { + mock *mock.Mock +} + +func (_m *ArgoDB) EXPECT() *ArgoDB_Expecter { + return &ArgoDB_Expecter{mock: &_m.Mock} +} + // AddGPGPublicKey provides a mock function with given fields: ctx, keyData func (_m *ArgoDB) AddGPGPublicKey(ctx context.Context, keyData string) (map[string]*v1alpha1.GnuPGPublicKey, []string, error) { ret := _m.Called(ctx, keyData) @@ -55,6 +63,35 @@ func (_m *ArgoDB) AddGPGPublicKey(ctx context.Context, keyData string) (map[stri return r0, r1, r2 } +// ArgoDB_AddGPGPublicKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddGPGPublicKey' +type ArgoDB_AddGPGPublicKey_Call struct { + *mock.Call +} + +// AddGPGPublicKey is a helper method to define mock.On call +// - ctx context.Context +// - keyData string +func (_e *ArgoDB_Expecter) AddGPGPublicKey(ctx interface{}, keyData interface{}) *ArgoDB_AddGPGPublicKey_Call { + return &ArgoDB_AddGPGPublicKey_Call{Call: _e.mock.On("AddGPGPublicKey", ctx, keyData)} +} + +func (_c *ArgoDB_AddGPGPublicKey_Call) Run(run func(ctx context.Context, keyData string)) *ArgoDB_AddGPGPublicKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ArgoDB_AddGPGPublicKey_Call) Return(_a0 map[string]*v1alpha1.GnuPGPublicKey, _a1 []string, _a2 error) *ArgoDB_AddGPGPublicKey_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *ArgoDB_AddGPGPublicKey_Call) RunAndReturn(run func(context.Context, string) (map[string]*v1alpha1.GnuPGPublicKey, []string, error)) *ArgoDB_AddGPGPublicKey_Call { + _c.Call.Return(run) + return _c +} + // CreateCluster provides a mock function with given fields: ctx, c func (_m *ArgoDB) CreateCluster(ctx context.Context, c *v1alpha1.Cluster) (*v1alpha1.Cluster, error) { ret := _m.Called(ctx, c) @@ -85,6 +122,35 @@ func (_m *ArgoDB) CreateCluster(ctx context.Context, c *v1alpha1.Cluster) (*v1al return r0, r1 } +// ArgoDB_CreateCluster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCluster' +type ArgoDB_CreateCluster_Call struct { + *mock.Call +} + +// CreateCluster is a helper method to define mock.On call +// - ctx context.Context +// - c *v1alpha1.Cluster +func (_e *ArgoDB_Expecter) CreateCluster(ctx interface{}, c interface{}) *ArgoDB_CreateCluster_Call { + return &ArgoDB_CreateCluster_Call{Call: _e.mock.On("CreateCluster", ctx, c)} +} + +func (_c *ArgoDB_CreateCluster_Call) Run(run func(ctx context.Context, c *v1alpha1.Cluster)) *ArgoDB_CreateCluster_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1alpha1.Cluster)) + }) + return _c +} + +func (_c *ArgoDB_CreateCluster_Call) Return(_a0 *v1alpha1.Cluster, _a1 error) *ArgoDB_CreateCluster_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_CreateCluster_Call) RunAndReturn(run func(context.Context, *v1alpha1.Cluster) (*v1alpha1.Cluster, error)) *ArgoDB_CreateCluster_Call { + _c.Call.Return(run) + return _c +} + // CreateRepoCertificate provides a mock function with given fields: ctx, certificate, upsert func (_m *ArgoDB) CreateRepoCertificate(ctx context.Context, certificate *v1alpha1.RepositoryCertificateList, upsert bool) (*v1alpha1.RepositoryCertificateList, error) { ret := _m.Called(ctx, certificate, upsert) @@ -115,6 +181,36 @@ func (_m *ArgoDB) CreateRepoCertificate(ctx context.Context, certificate *v1alph return r0, r1 } +// ArgoDB_CreateRepoCertificate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRepoCertificate' +type ArgoDB_CreateRepoCertificate_Call struct { + *mock.Call +} + +// CreateRepoCertificate is a helper method to define mock.On call +// - ctx context.Context +// - certificate *v1alpha1.RepositoryCertificateList +// - upsert bool +func (_e *ArgoDB_Expecter) CreateRepoCertificate(ctx interface{}, certificate interface{}, upsert interface{}) *ArgoDB_CreateRepoCertificate_Call { + return &ArgoDB_CreateRepoCertificate_Call{Call: _e.mock.On("CreateRepoCertificate", ctx, certificate, upsert)} +} + +func (_c *ArgoDB_CreateRepoCertificate_Call) Run(run func(ctx context.Context, certificate *v1alpha1.RepositoryCertificateList, upsert bool)) *ArgoDB_CreateRepoCertificate_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1alpha1.RepositoryCertificateList), args[2].(bool)) + }) + return _c +} + +func (_c *ArgoDB_CreateRepoCertificate_Call) Return(_a0 *v1alpha1.RepositoryCertificateList, _a1 error) *ArgoDB_CreateRepoCertificate_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_CreateRepoCertificate_Call) RunAndReturn(run func(context.Context, *v1alpha1.RepositoryCertificateList, bool) (*v1alpha1.RepositoryCertificateList, error)) *ArgoDB_CreateRepoCertificate_Call { + _c.Call.Return(run) + return _c +} + // CreateRepository provides a mock function with given fields: ctx, r func (_m *ArgoDB) CreateRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) { ret := _m.Called(ctx, r) @@ -145,6 +241,35 @@ func (_m *ArgoDB) CreateRepository(ctx context.Context, r *v1alpha1.Repository) return r0, r1 } +// ArgoDB_CreateRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRepository' +type ArgoDB_CreateRepository_Call struct { + *mock.Call +} + +// CreateRepository is a helper method to define mock.On call +// - ctx context.Context +// - r *v1alpha1.Repository +func (_e *ArgoDB_Expecter) CreateRepository(ctx interface{}, r interface{}) *ArgoDB_CreateRepository_Call { + return &ArgoDB_CreateRepository_Call{Call: _e.mock.On("CreateRepository", ctx, r)} +} + +func (_c *ArgoDB_CreateRepository_Call) Run(run func(ctx context.Context, r *v1alpha1.Repository)) *ArgoDB_CreateRepository_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1alpha1.Repository)) + }) + return _c +} + +func (_c *ArgoDB_CreateRepository_Call) Return(_a0 *v1alpha1.Repository, _a1 error) *ArgoDB_CreateRepository_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_CreateRepository_Call) RunAndReturn(run func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)) *ArgoDB_CreateRepository_Call { + _c.Call.Return(run) + return _c +} + // CreateRepositoryCredentials provides a mock function with given fields: ctx, r func (_m *ArgoDB) CreateRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) { ret := _m.Called(ctx, r) @@ -175,6 +300,35 @@ func (_m *ArgoDB) CreateRepositoryCredentials(ctx context.Context, r *v1alpha1.R return r0, r1 } +// ArgoDB_CreateRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRepositoryCredentials' +type ArgoDB_CreateRepositoryCredentials_Call struct { + *mock.Call +} + +// CreateRepositoryCredentials is a helper method to define mock.On call +// - ctx context.Context +// - r *v1alpha1.RepoCreds +func (_e *ArgoDB_Expecter) CreateRepositoryCredentials(ctx interface{}, r interface{}) *ArgoDB_CreateRepositoryCredentials_Call { + return &ArgoDB_CreateRepositoryCredentials_Call{Call: _e.mock.On("CreateRepositoryCredentials", ctx, r)} +} + +func (_c *ArgoDB_CreateRepositoryCredentials_Call) Run(run func(ctx context.Context, r *v1alpha1.RepoCreds)) *ArgoDB_CreateRepositoryCredentials_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1alpha1.RepoCreds)) + }) + return _c +} + +func (_c *ArgoDB_CreateRepositoryCredentials_Call) Return(_a0 *v1alpha1.RepoCreds, _a1 error) *ArgoDB_CreateRepositoryCredentials_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_CreateRepositoryCredentials_Call) RunAndReturn(run func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *ArgoDB_CreateRepositoryCredentials_Call { + _c.Call.Return(run) + return _c +} + // CreateWriteRepository provides a mock function with given fields: ctx, r func (_m *ArgoDB) CreateWriteRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) { ret := _m.Called(ctx, r) @@ -205,6 +359,35 @@ func (_m *ArgoDB) CreateWriteRepository(ctx context.Context, r *v1alpha1.Reposit return r0, r1 } +// ArgoDB_CreateWriteRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateWriteRepository' +type ArgoDB_CreateWriteRepository_Call struct { + *mock.Call +} + +// CreateWriteRepository is a helper method to define mock.On call +// - ctx context.Context +// - r *v1alpha1.Repository +func (_e *ArgoDB_Expecter) CreateWriteRepository(ctx interface{}, r interface{}) *ArgoDB_CreateWriteRepository_Call { + return &ArgoDB_CreateWriteRepository_Call{Call: _e.mock.On("CreateWriteRepository", ctx, r)} +} + +func (_c *ArgoDB_CreateWriteRepository_Call) Run(run func(ctx context.Context, r *v1alpha1.Repository)) *ArgoDB_CreateWriteRepository_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1alpha1.Repository)) + }) + return _c +} + +func (_c *ArgoDB_CreateWriteRepository_Call) Return(_a0 *v1alpha1.Repository, _a1 error) *ArgoDB_CreateWriteRepository_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_CreateWriteRepository_Call) RunAndReturn(run func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)) *ArgoDB_CreateWriteRepository_Call { + _c.Call.Return(run) + return _c +} + // CreateWriteRepositoryCredentials provides a mock function with given fields: ctx, r func (_m *ArgoDB) CreateWriteRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) { ret := _m.Called(ctx, r) @@ -235,6 +418,35 @@ func (_m *ArgoDB) CreateWriteRepositoryCredentials(ctx context.Context, r *v1alp return r0, r1 } +// ArgoDB_CreateWriteRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateWriteRepositoryCredentials' +type ArgoDB_CreateWriteRepositoryCredentials_Call struct { + *mock.Call +} + +// CreateWriteRepositoryCredentials is a helper method to define mock.On call +// - ctx context.Context +// - r *v1alpha1.RepoCreds +func (_e *ArgoDB_Expecter) CreateWriteRepositoryCredentials(ctx interface{}, r interface{}) *ArgoDB_CreateWriteRepositoryCredentials_Call { + return &ArgoDB_CreateWriteRepositoryCredentials_Call{Call: _e.mock.On("CreateWriteRepositoryCredentials", ctx, r)} +} + +func (_c *ArgoDB_CreateWriteRepositoryCredentials_Call) Run(run func(ctx context.Context, r *v1alpha1.RepoCreds)) *ArgoDB_CreateWriteRepositoryCredentials_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1alpha1.RepoCreds)) + }) + return _c +} + +func (_c *ArgoDB_CreateWriteRepositoryCredentials_Call) Return(_a0 *v1alpha1.RepoCreds, _a1 error) *ArgoDB_CreateWriteRepositoryCredentials_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_CreateWriteRepositoryCredentials_Call) RunAndReturn(run func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *ArgoDB_CreateWriteRepositoryCredentials_Call { + _c.Call.Return(run) + return _c +} + // DeleteCluster provides a mock function with given fields: ctx, server func (_m *ArgoDB) DeleteCluster(ctx context.Context, server string) error { ret := _m.Called(ctx, server) @@ -253,6 +465,35 @@ func (_m *ArgoDB) DeleteCluster(ctx context.Context, server string) error { return r0 } +// ArgoDB_DeleteCluster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCluster' +type ArgoDB_DeleteCluster_Call struct { + *mock.Call +} + +// DeleteCluster is a helper method to define mock.On call +// - ctx context.Context +// - server string +func (_e *ArgoDB_Expecter) DeleteCluster(ctx interface{}, server interface{}) *ArgoDB_DeleteCluster_Call { + return &ArgoDB_DeleteCluster_Call{Call: _e.mock.On("DeleteCluster", ctx, server)} +} + +func (_c *ArgoDB_DeleteCluster_Call) Run(run func(ctx context.Context, server string)) *ArgoDB_DeleteCluster_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ArgoDB_DeleteCluster_Call) Return(_a0 error) *ArgoDB_DeleteCluster_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ArgoDB_DeleteCluster_Call) RunAndReturn(run func(context.Context, string) error) *ArgoDB_DeleteCluster_Call { + _c.Call.Return(run) + return _c +} + // DeleteGPGPublicKey provides a mock function with given fields: ctx, keyID func (_m *ArgoDB) DeleteGPGPublicKey(ctx context.Context, keyID string) error { ret := _m.Called(ctx, keyID) @@ -271,6 +512,35 @@ func (_m *ArgoDB) DeleteGPGPublicKey(ctx context.Context, keyID string) error { return r0 } +// ArgoDB_DeleteGPGPublicKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteGPGPublicKey' +type ArgoDB_DeleteGPGPublicKey_Call struct { + *mock.Call +} + +// DeleteGPGPublicKey is a helper method to define mock.On call +// - ctx context.Context +// - keyID string +func (_e *ArgoDB_Expecter) DeleteGPGPublicKey(ctx interface{}, keyID interface{}) *ArgoDB_DeleteGPGPublicKey_Call { + return &ArgoDB_DeleteGPGPublicKey_Call{Call: _e.mock.On("DeleteGPGPublicKey", ctx, keyID)} +} + +func (_c *ArgoDB_DeleteGPGPublicKey_Call) Run(run func(ctx context.Context, keyID string)) *ArgoDB_DeleteGPGPublicKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ArgoDB_DeleteGPGPublicKey_Call) Return(_a0 error) *ArgoDB_DeleteGPGPublicKey_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ArgoDB_DeleteGPGPublicKey_Call) RunAndReturn(run func(context.Context, string) error) *ArgoDB_DeleteGPGPublicKey_Call { + _c.Call.Return(run) + return _c +} + // DeleteRepository provides a mock function with given fields: ctx, name, project func (_m *ArgoDB) DeleteRepository(ctx context.Context, name string, project string) error { ret := _m.Called(ctx, name, project) @@ -289,6 +559,36 @@ func (_m *ArgoDB) DeleteRepository(ctx context.Context, name string, project str return r0 } +// ArgoDB_DeleteRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRepository' +type ArgoDB_DeleteRepository_Call struct { + *mock.Call +} + +// DeleteRepository is a helper method to define mock.On call +// - ctx context.Context +// - name string +// - project string +func (_e *ArgoDB_Expecter) DeleteRepository(ctx interface{}, name interface{}, project interface{}) *ArgoDB_DeleteRepository_Call { + return &ArgoDB_DeleteRepository_Call{Call: _e.mock.On("DeleteRepository", ctx, name, project)} +} + +func (_c *ArgoDB_DeleteRepository_Call) Run(run func(ctx context.Context, name string, project string)) *ArgoDB_DeleteRepository_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *ArgoDB_DeleteRepository_Call) Return(_a0 error) *ArgoDB_DeleteRepository_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ArgoDB_DeleteRepository_Call) RunAndReturn(run func(context.Context, string, string) error) *ArgoDB_DeleteRepository_Call { + _c.Call.Return(run) + return _c +} + // DeleteRepositoryCredentials provides a mock function with given fields: ctx, name func (_m *ArgoDB) DeleteRepositoryCredentials(ctx context.Context, name string) error { ret := _m.Called(ctx, name) @@ -307,6 +607,35 @@ func (_m *ArgoDB) DeleteRepositoryCredentials(ctx context.Context, name string) return r0 } +// ArgoDB_DeleteRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRepositoryCredentials' +type ArgoDB_DeleteRepositoryCredentials_Call struct { + *mock.Call +} + +// DeleteRepositoryCredentials is a helper method to define mock.On call +// - ctx context.Context +// - name string +func (_e *ArgoDB_Expecter) DeleteRepositoryCredentials(ctx interface{}, name interface{}) *ArgoDB_DeleteRepositoryCredentials_Call { + return &ArgoDB_DeleteRepositoryCredentials_Call{Call: _e.mock.On("DeleteRepositoryCredentials", ctx, name)} +} + +func (_c *ArgoDB_DeleteRepositoryCredentials_Call) Run(run func(ctx context.Context, name string)) *ArgoDB_DeleteRepositoryCredentials_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ArgoDB_DeleteRepositoryCredentials_Call) Return(_a0 error) *ArgoDB_DeleteRepositoryCredentials_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ArgoDB_DeleteRepositoryCredentials_Call) RunAndReturn(run func(context.Context, string) error) *ArgoDB_DeleteRepositoryCredentials_Call { + _c.Call.Return(run) + return _c +} + // DeleteWriteRepository provides a mock function with given fields: ctx, name, project func (_m *ArgoDB) DeleteWriteRepository(ctx context.Context, name string, project string) error { ret := _m.Called(ctx, name, project) @@ -325,6 +654,36 @@ func (_m *ArgoDB) DeleteWriteRepository(ctx context.Context, name string, projec return r0 } +// ArgoDB_DeleteWriteRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteWriteRepository' +type ArgoDB_DeleteWriteRepository_Call struct { + *mock.Call +} + +// DeleteWriteRepository is a helper method to define mock.On call +// - ctx context.Context +// - name string +// - project string +func (_e *ArgoDB_Expecter) DeleteWriteRepository(ctx interface{}, name interface{}, project interface{}) *ArgoDB_DeleteWriteRepository_Call { + return &ArgoDB_DeleteWriteRepository_Call{Call: _e.mock.On("DeleteWriteRepository", ctx, name, project)} +} + +func (_c *ArgoDB_DeleteWriteRepository_Call) Run(run func(ctx context.Context, name string, project string)) *ArgoDB_DeleteWriteRepository_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *ArgoDB_DeleteWriteRepository_Call) Return(_a0 error) *ArgoDB_DeleteWriteRepository_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ArgoDB_DeleteWriteRepository_Call) RunAndReturn(run func(context.Context, string, string) error) *ArgoDB_DeleteWriteRepository_Call { + _c.Call.Return(run) + return _c +} + // DeleteWriteRepositoryCredentials provides a mock function with given fields: ctx, name func (_m *ArgoDB) DeleteWriteRepositoryCredentials(ctx context.Context, name string) error { ret := _m.Called(ctx, name) @@ -343,6 +702,35 @@ func (_m *ArgoDB) DeleteWriteRepositoryCredentials(ctx context.Context, name str return r0 } +// ArgoDB_DeleteWriteRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteWriteRepositoryCredentials' +type ArgoDB_DeleteWriteRepositoryCredentials_Call struct { + *mock.Call +} + +// DeleteWriteRepositoryCredentials is a helper method to define mock.On call +// - ctx context.Context +// - name string +func (_e *ArgoDB_Expecter) DeleteWriteRepositoryCredentials(ctx interface{}, name interface{}) *ArgoDB_DeleteWriteRepositoryCredentials_Call { + return &ArgoDB_DeleteWriteRepositoryCredentials_Call{Call: _e.mock.On("DeleteWriteRepositoryCredentials", ctx, name)} +} + +func (_c *ArgoDB_DeleteWriteRepositoryCredentials_Call) Run(run func(ctx context.Context, name string)) *ArgoDB_DeleteWriteRepositoryCredentials_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ArgoDB_DeleteWriteRepositoryCredentials_Call) Return(_a0 error) *ArgoDB_DeleteWriteRepositoryCredentials_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ArgoDB_DeleteWriteRepositoryCredentials_Call) RunAndReturn(run func(context.Context, string) error) *ArgoDB_DeleteWriteRepositoryCredentials_Call { + _c.Call.Return(run) + return _c +} + // GetAllHelmRepositoryCredentials provides a mock function with given fields: ctx func (_m *ArgoDB) GetAllHelmRepositoryCredentials(ctx context.Context) ([]*v1alpha1.RepoCreds, error) { ret := _m.Called(ctx) @@ -373,6 +761,34 @@ func (_m *ArgoDB) GetAllHelmRepositoryCredentials(ctx context.Context) ([]*v1alp return r0, r1 } +// ArgoDB_GetAllHelmRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllHelmRepositoryCredentials' +type ArgoDB_GetAllHelmRepositoryCredentials_Call struct { + *mock.Call +} + +// GetAllHelmRepositoryCredentials is a helper method to define mock.On call +// - ctx context.Context +func (_e *ArgoDB_Expecter) GetAllHelmRepositoryCredentials(ctx interface{}) *ArgoDB_GetAllHelmRepositoryCredentials_Call { + return &ArgoDB_GetAllHelmRepositoryCredentials_Call{Call: _e.mock.On("GetAllHelmRepositoryCredentials", ctx)} +} + +func (_c *ArgoDB_GetAllHelmRepositoryCredentials_Call) Run(run func(ctx context.Context)) *ArgoDB_GetAllHelmRepositoryCredentials_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ArgoDB_GetAllHelmRepositoryCredentials_Call) Return(_a0 []*v1alpha1.RepoCreds, _a1 error) *ArgoDB_GetAllHelmRepositoryCredentials_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_GetAllHelmRepositoryCredentials_Call) RunAndReturn(run func(context.Context) ([]*v1alpha1.RepoCreds, error)) *ArgoDB_GetAllHelmRepositoryCredentials_Call { + _c.Call.Return(run) + return _c +} + // GetApplicationControllerReplicas provides a mock function with no fields func (_m *ArgoDB) GetApplicationControllerReplicas() int { ret := _m.Called() @@ -391,6 +807,33 @@ func (_m *ArgoDB) GetApplicationControllerReplicas() int { return r0 } +// ArgoDB_GetApplicationControllerReplicas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetApplicationControllerReplicas' +type ArgoDB_GetApplicationControllerReplicas_Call struct { + *mock.Call +} + +// GetApplicationControllerReplicas is a helper method to define mock.On call +func (_e *ArgoDB_Expecter) GetApplicationControllerReplicas() *ArgoDB_GetApplicationControllerReplicas_Call { + return &ArgoDB_GetApplicationControllerReplicas_Call{Call: _e.mock.On("GetApplicationControllerReplicas")} +} + +func (_c *ArgoDB_GetApplicationControllerReplicas_Call) Run(run func()) *ArgoDB_GetApplicationControllerReplicas_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ArgoDB_GetApplicationControllerReplicas_Call) Return(_a0 int) *ArgoDB_GetApplicationControllerReplicas_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ArgoDB_GetApplicationControllerReplicas_Call) RunAndReturn(run func() int) *ArgoDB_GetApplicationControllerReplicas_Call { + _c.Call.Return(run) + return _c +} + // GetCluster provides a mock function with given fields: ctx, server func (_m *ArgoDB) GetCluster(ctx context.Context, server string) (*v1alpha1.Cluster, error) { ret := _m.Called(ctx, server) @@ -421,6 +864,35 @@ func (_m *ArgoDB) GetCluster(ctx context.Context, server string) (*v1alpha1.Clus return r0, r1 } +// ArgoDB_GetCluster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCluster' +type ArgoDB_GetCluster_Call struct { + *mock.Call +} + +// GetCluster is a helper method to define mock.On call +// - ctx context.Context +// - server string +func (_e *ArgoDB_Expecter) GetCluster(ctx interface{}, server interface{}) *ArgoDB_GetCluster_Call { + return &ArgoDB_GetCluster_Call{Call: _e.mock.On("GetCluster", ctx, server)} +} + +func (_c *ArgoDB_GetCluster_Call) Run(run func(ctx context.Context, server string)) *ArgoDB_GetCluster_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ArgoDB_GetCluster_Call) Return(_a0 *v1alpha1.Cluster, _a1 error) *ArgoDB_GetCluster_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_GetCluster_Call) RunAndReturn(run func(context.Context, string) (*v1alpha1.Cluster, error)) *ArgoDB_GetCluster_Call { + _c.Call.Return(run) + return _c +} + // GetClusterServersByName provides a mock function with given fields: ctx, name func (_m *ArgoDB) GetClusterServersByName(ctx context.Context, name string) ([]string, error) { ret := _m.Called(ctx, name) @@ -451,6 +923,35 @@ func (_m *ArgoDB) GetClusterServersByName(ctx context.Context, name string) ([]s return r0, r1 } +// ArgoDB_GetClusterServersByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClusterServersByName' +type ArgoDB_GetClusterServersByName_Call struct { + *mock.Call +} + +// GetClusterServersByName is a helper method to define mock.On call +// - ctx context.Context +// - name string +func (_e *ArgoDB_Expecter) GetClusterServersByName(ctx interface{}, name interface{}) *ArgoDB_GetClusterServersByName_Call { + return &ArgoDB_GetClusterServersByName_Call{Call: _e.mock.On("GetClusterServersByName", ctx, name)} +} + +func (_c *ArgoDB_GetClusterServersByName_Call) Run(run func(ctx context.Context, name string)) *ArgoDB_GetClusterServersByName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ArgoDB_GetClusterServersByName_Call) Return(_a0 []string, _a1 error) *ArgoDB_GetClusterServersByName_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_GetClusterServersByName_Call) RunAndReturn(run func(context.Context, string) ([]string, error)) *ArgoDB_GetClusterServersByName_Call { + _c.Call.Return(run) + return _c +} + // GetProjectClusters provides a mock function with given fields: ctx, project func (_m *ArgoDB) GetProjectClusters(ctx context.Context, project string) ([]*v1alpha1.Cluster, error) { ret := _m.Called(ctx, project) @@ -481,6 +982,35 @@ func (_m *ArgoDB) GetProjectClusters(ctx context.Context, project string) ([]*v1 return r0, r1 } +// ArgoDB_GetProjectClusters_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProjectClusters' +type ArgoDB_GetProjectClusters_Call struct { + *mock.Call +} + +// GetProjectClusters is a helper method to define mock.On call +// - ctx context.Context +// - project string +func (_e *ArgoDB_Expecter) GetProjectClusters(ctx interface{}, project interface{}) *ArgoDB_GetProjectClusters_Call { + return &ArgoDB_GetProjectClusters_Call{Call: _e.mock.On("GetProjectClusters", ctx, project)} +} + +func (_c *ArgoDB_GetProjectClusters_Call) Run(run func(ctx context.Context, project string)) *ArgoDB_GetProjectClusters_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ArgoDB_GetProjectClusters_Call) Return(_a0 []*v1alpha1.Cluster, _a1 error) *ArgoDB_GetProjectClusters_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_GetProjectClusters_Call) RunAndReturn(run func(context.Context, string) ([]*v1alpha1.Cluster, error)) *ArgoDB_GetProjectClusters_Call { + _c.Call.Return(run) + return _c +} + // GetProjectRepositories provides a mock function with given fields: project func (_m *ArgoDB) GetProjectRepositories(project string) ([]*v1alpha1.Repository, error) { ret := _m.Called(project) @@ -511,6 +1041,34 @@ func (_m *ArgoDB) GetProjectRepositories(project string) ([]*v1alpha1.Repository return r0, r1 } +// ArgoDB_GetProjectRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProjectRepositories' +type ArgoDB_GetProjectRepositories_Call struct { + *mock.Call +} + +// GetProjectRepositories is a helper method to define mock.On call +// - project string +func (_e *ArgoDB_Expecter) GetProjectRepositories(project interface{}) *ArgoDB_GetProjectRepositories_Call { + return &ArgoDB_GetProjectRepositories_Call{Call: _e.mock.On("GetProjectRepositories", project)} +} + +func (_c *ArgoDB_GetProjectRepositories_Call) Run(run func(project string)) *ArgoDB_GetProjectRepositories_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *ArgoDB_GetProjectRepositories_Call) Return(_a0 []*v1alpha1.Repository, _a1 error) *ArgoDB_GetProjectRepositories_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_GetProjectRepositories_Call) RunAndReturn(run func(string) ([]*v1alpha1.Repository, error)) *ArgoDB_GetProjectRepositories_Call { + _c.Call.Return(run) + return _c +} + // GetProjectWriteRepositories provides a mock function with given fields: project func (_m *ArgoDB) GetProjectWriteRepositories(project string) ([]*v1alpha1.Repository, error) { ret := _m.Called(project) @@ -541,6 +1099,34 @@ func (_m *ArgoDB) GetProjectWriteRepositories(project string) ([]*v1alpha1.Repos return r0, r1 } +// ArgoDB_GetProjectWriteRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProjectWriteRepositories' +type ArgoDB_GetProjectWriteRepositories_Call struct { + *mock.Call +} + +// GetProjectWriteRepositories is a helper method to define mock.On call +// - project string +func (_e *ArgoDB_Expecter) GetProjectWriteRepositories(project interface{}) *ArgoDB_GetProjectWriteRepositories_Call { + return &ArgoDB_GetProjectWriteRepositories_Call{Call: _e.mock.On("GetProjectWriteRepositories", project)} +} + +func (_c *ArgoDB_GetProjectWriteRepositories_Call) Run(run func(project string)) *ArgoDB_GetProjectWriteRepositories_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *ArgoDB_GetProjectWriteRepositories_Call) Return(_a0 []*v1alpha1.Repository, _a1 error) *ArgoDB_GetProjectWriteRepositories_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_GetProjectWriteRepositories_Call) RunAndReturn(run func(string) ([]*v1alpha1.Repository, error)) *ArgoDB_GetProjectWriteRepositories_Call { + _c.Call.Return(run) + return _c +} + // GetRepository provides a mock function with given fields: ctx, url, project func (_m *ArgoDB) GetRepository(ctx context.Context, url string, project string) (*v1alpha1.Repository, error) { ret := _m.Called(ctx, url, project) @@ -571,6 +1157,36 @@ func (_m *ArgoDB) GetRepository(ctx context.Context, url string, project string) return r0, r1 } +// ArgoDB_GetRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepository' +type ArgoDB_GetRepository_Call struct { + *mock.Call +} + +// GetRepository is a helper method to define mock.On call +// - ctx context.Context +// - url string +// - project string +func (_e *ArgoDB_Expecter) GetRepository(ctx interface{}, url interface{}, project interface{}) *ArgoDB_GetRepository_Call { + return &ArgoDB_GetRepository_Call{Call: _e.mock.On("GetRepository", ctx, url, project)} +} + +func (_c *ArgoDB_GetRepository_Call) Run(run func(ctx context.Context, url string, project string)) *ArgoDB_GetRepository_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *ArgoDB_GetRepository_Call) Return(_a0 *v1alpha1.Repository, _a1 error) *ArgoDB_GetRepository_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_GetRepository_Call) RunAndReturn(run func(context.Context, string, string) (*v1alpha1.Repository, error)) *ArgoDB_GetRepository_Call { + _c.Call.Return(run) + return _c +} + // GetRepositoryCredentials provides a mock function with given fields: ctx, name func (_m *ArgoDB) GetRepositoryCredentials(ctx context.Context, name string) (*v1alpha1.RepoCreds, error) { ret := _m.Called(ctx, name) @@ -601,6 +1217,35 @@ func (_m *ArgoDB) GetRepositoryCredentials(ctx context.Context, name string) (*v return r0, r1 } +// ArgoDB_GetRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepositoryCredentials' +type ArgoDB_GetRepositoryCredentials_Call struct { + *mock.Call +} + +// GetRepositoryCredentials is a helper method to define mock.On call +// - ctx context.Context +// - name string +func (_e *ArgoDB_Expecter) GetRepositoryCredentials(ctx interface{}, name interface{}) *ArgoDB_GetRepositoryCredentials_Call { + return &ArgoDB_GetRepositoryCredentials_Call{Call: _e.mock.On("GetRepositoryCredentials", ctx, name)} +} + +func (_c *ArgoDB_GetRepositoryCredentials_Call) Run(run func(ctx context.Context, name string)) *ArgoDB_GetRepositoryCredentials_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ArgoDB_GetRepositoryCredentials_Call) Return(_a0 *v1alpha1.RepoCreds, _a1 error) *ArgoDB_GetRepositoryCredentials_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_GetRepositoryCredentials_Call) RunAndReturn(run func(context.Context, string) (*v1alpha1.RepoCreds, error)) *ArgoDB_GetRepositoryCredentials_Call { + _c.Call.Return(run) + return _c +} + // GetWriteRepository provides a mock function with given fields: ctx, url, project func (_m *ArgoDB) GetWriteRepository(ctx context.Context, url string, project string) (*v1alpha1.Repository, error) { ret := _m.Called(ctx, url, project) @@ -631,6 +1276,36 @@ func (_m *ArgoDB) GetWriteRepository(ctx context.Context, url string, project st return r0, r1 } +// ArgoDB_GetWriteRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWriteRepository' +type ArgoDB_GetWriteRepository_Call struct { + *mock.Call +} + +// GetWriteRepository is a helper method to define mock.On call +// - ctx context.Context +// - url string +// - project string +func (_e *ArgoDB_Expecter) GetWriteRepository(ctx interface{}, url interface{}, project interface{}) *ArgoDB_GetWriteRepository_Call { + return &ArgoDB_GetWriteRepository_Call{Call: _e.mock.On("GetWriteRepository", ctx, url, project)} +} + +func (_c *ArgoDB_GetWriteRepository_Call) Run(run func(ctx context.Context, url string, project string)) *ArgoDB_GetWriteRepository_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *ArgoDB_GetWriteRepository_Call) Return(_a0 *v1alpha1.Repository, _a1 error) *ArgoDB_GetWriteRepository_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_GetWriteRepository_Call) RunAndReturn(run func(context.Context, string, string) (*v1alpha1.Repository, error)) *ArgoDB_GetWriteRepository_Call { + _c.Call.Return(run) + return _c +} + // GetWriteRepositoryCredentials provides a mock function with given fields: ctx, name func (_m *ArgoDB) GetWriteRepositoryCredentials(ctx context.Context, name string) (*v1alpha1.RepoCreds, error) { ret := _m.Called(ctx, name) @@ -661,6 +1336,35 @@ func (_m *ArgoDB) GetWriteRepositoryCredentials(ctx context.Context, name string return r0, r1 } +// ArgoDB_GetWriteRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWriteRepositoryCredentials' +type ArgoDB_GetWriteRepositoryCredentials_Call struct { + *mock.Call +} + +// GetWriteRepositoryCredentials is a helper method to define mock.On call +// - ctx context.Context +// - name string +func (_e *ArgoDB_Expecter) GetWriteRepositoryCredentials(ctx interface{}, name interface{}) *ArgoDB_GetWriteRepositoryCredentials_Call { + return &ArgoDB_GetWriteRepositoryCredentials_Call{Call: _e.mock.On("GetWriteRepositoryCredentials", ctx, name)} +} + +func (_c *ArgoDB_GetWriteRepositoryCredentials_Call) Run(run func(ctx context.Context, name string)) *ArgoDB_GetWriteRepositoryCredentials_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ArgoDB_GetWriteRepositoryCredentials_Call) Return(_a0 *v1alpha1.RepoCreds, _a1 error) *ArgoDB_GetWriteRepositoryCredentials_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_GetWriteRepositoryCredentials_Call) RunAndReturn(run func(context.Context, string) (*v1alpha1.RepoCreds, error)) *ArgoDB_GetWriteRepositoryCredentials_Call { + _c.Call.Return(run) + return _c +} + // ListClusters provides a mock function with given fields: ctx func (_m *ArgoDB) ListClusters(ctx context.Context) (*v1alpha1.ClusterList, error) { ret := _m.Called(ctx) @@ -691,6 +1395,34 @@ func (_m *ArgoDB) ListClusters(ctx context.Context) (*v1alpha1.ClusterList, erro return r0, r1 } +// ArgoDB_ListClusters_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListClusters' +type ArgoDB_ListClusters_Call struct { + *mock.Call +} + +// ListClusters is a helper method to define mock.On call +// - ctx context.Context +func (_e *ArgoDB_Expecter) ListClusters(ctx interface{}) *ArgoDB_ListClusters_Call { + return &ArgoDB_ListClusters_Call{Call: _e.mock.On("ListClusters", ctx)} +} + +func (_c *ArgoDB_ListClusters_Call) Run(run func(ctx context.Context)) *ArgoDB_ListClusters_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ArgoDB_ListClusters_Call) Return(_a0 *v1alpha1.ClusterList, _a1 error) *ArgoDB_ListClusters_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_ListClusters_Call) RunAndReturn(run func(context.Context) (*v1alpha1.ClusterList, error)) *ArgoDB_ListClusters_Call { + _c.Call.Return(run) + return _c +} + // ListConfiguredGPGPublicKeys provides a mock function with given fields: ctx func (_m *ArgoDB) ListConfiguredGPGPublicKeys(ctx context.Context) (map[string]*v1alpha1.GnuPGPublicKey, error) { ret := _m.Called(ctx) @@ -721,6 +1453,34 @@ func (_m *ArgoDB) ListConfiguredGPGPublicKeys(ctx context.Context) (map[string]* return r0, r1 } +// ArgoDB_ListConfiguredGPGPublicKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListConfiguredGPGPublicKeys' +type ArgoDB_ListConfiguredGPGPublicKeys_Call struct { + *mock.Call +} + +// ListConfiguredGPGPublicKeys is a helper method to define mock.On call +// - ctx context.Context +func (_e *ArgoDB_Expecter) ListConfiguredGPGPublicKeys(ctx interface{}) *ArgoDB_ListConfiguredGPGPublicKeys_Call { + return &ArgoDB_ListConfiguredGPGPublicKeys_Call{Call: _e.mock.On("ListConfiguredGPGPublicKeys", ctx)} +} + +func (_c *ArgoDB_ListConfiguredGPGPublicKeys_Call) Run(run func(ctx context.Context)) *ArgoDB_ListConfiguredGPGPublicKeys_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ArgoDB_ListConfiguredGPGPublicKeys_Call) Return(_a0 map[string]*v1alpha1.GnuPGPublicKey, _a1 error) *ArgoDB_ListConfiguredGPGPublicKeys_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_ListConfiguredGPGPublicKeys_Call) RunAndReturn(run func(context.Context) (map[string]*v1alpha1.GnuPGPublicKey, error)) *ArgoDB_ListConfiguredGPGPublicKeys_Call { + _c.Call.Return(run) + return _c +} + // ListHelmRepositories provides a mock function with given fields: ctx func (_m *ArgoDB) ListHelmRepositories(ctx context.Context) ([]*v1alpha1.Repository, error) { ret := _m.Called(ctx) @@ -751,6 +1511,34 @@ func (_m *ArgoDB) ListHelmRepositories(ctx context.Context) ([]*v1alpha1.Reposit return r0, r1 } +// ArgoDB_ListHelmRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListHelmRepositories' +type ArgoDB_ListHelmRepositories_Call struct { + *mock.Call +} + +// ListHelmRepositories is a helper method to define mock.On call +// - ctx context.Context +func (_e *ArgoDB_Expecter) ListHelmRepositories(ctx interface{}) *ArgoDB_ListHelmRepositories_Call { + return &ArgoDB_ListHelmRepositories_Call{Call: _e.mock.On("ListHelmRepositories", ctx)} +} + +func (_c *ArgoDB_ListHelmRepositories_Call) Run(run func(ctx context.Context)) *ArgoDB_ListHelmRepositories_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ArgoDB_ListHelmRepositories_Call) Return(_a0 []*v1alpha1.Repository, _a1 error) *ArgoDB_ListHelmRepositories_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_ListHelmRepositories_Call) RunAndReturn(run func(context.Context) ([]*v1alpha1.Repository, error)) *ArgoDB_ListHelmRepositories_Call { + _c.Call.Return(run) + return _c +} + // ListRepoCertificates provides a mock function with given fields: ctx, selector func (_m *ArgoDB) ListRepoCertificates(ctx context.Context, selector *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error) { ret := _m.Called(ctx, selector) @@ -781,6 +1569,35 @@ func (_m *ArgoDB) ListRepoCertificates(ctx context.Context, selector *db.Certifi return r0, r1 } +// ArgoDB_ListRepoCertificates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRepoCertificates' +type ArgoDB_ListRepoCertificates_Call struct { + *mock.Call +} + +// ListRepoCertificates is a helper method to define mock.On call +// - ctx context.Context +// - selector *db.CertificateListSelector +func (_e *ArgoDB_Expecter) ListRepoCertificates(ctx interface{}, selector interface{}) *ArgoDB_ListRepoCertificates_Call { + return &ArgoDB_ListRepoCertificates_Call{Call: _e.mock.On("ListRepoCertificates", ctx, selector)} +} + +func (_c *ArgoDB_ListRepoCertificates_Call) Run(run func(ctx context.Context, selector *db.CertificateListSelector)) *ArgoDB_ListRepoCertificates_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*db.CertificateListSelector)) + }) + return _c +} + +func (_c *ArgoDB_ListRepoCertificates_Call) Return(_a0 *v1alpha1.RepositoryCertificateList, _a1 error) *ArgoDB_ListRepoCertificates_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_ListRepoCertificates_Call) RunAndReturn(run func(context.Context, *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)) *ArgoDB_ListRepoCertificates_Call { + _c.Call.Return(run) + return _c +} + // ListRepositories provides a mock function with given fields: ctx func (_m *ArgoDB) ListRepositories(ctx context.Context) ([]*v1alpha1.Repository, error) { ret := _m.Called(ctx) @@ -811,6 +1628,34 @@ func (_m *ArgoDB) ListRepositories(ctx context.Context) ([]*v1alpha1.Repository, return r0, r1 } +// ArgoDB_ListRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRepositories' +type ArgoDB_ListRepositories_Call struct { + *mock.Call +} + +// ListRepositories is a helper method to define mock.On call +// - ctx context.Context +func (_e *ArgoDB_Expecter) ListRepositories(ctx interface{}) *ArgoDB_ListRepositories_Call { + return &ArgoDB_ListRepositories_Call{Call: _e.mock.On("ListRepositories", ctx)} +} + +func (_c *ArgoDB_ListRepositories_Call) Run(run func(ctx context.Context)) *ArgoDB_ListRepositories_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ArgoDB_ListRepositories_Call) Return(_a0 []*v1alpha1.Repository, _a1 error) *ArgoDB_ListRepositories_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_ListRepositories_Call) RunAndReturn(run func(context.Context) ([]*v1alpha1.Repository, error)) *ArgoDB_ListRepositories_Call { + _c.Call.Return(run) + return _c +} + // ListRepositoryCredentials provides a mock function with given fields: ctx func (_m *ArgoDB) ListRepositoryCredentials(ctx context.Context) ([]string, error) { ret := _m.Called(ctx) @@ -841,6 +1686,34 @@ func (_m *ArgoDB) ListRepositoryCredentials(ctx context.Context) ([]string, erro return r0, r1 } +// ArgoDB_ListRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRepositoryCredentials' +type ArgoDB_ListRepositoryCredentials_Call struct { + *mock.Call +} + +// ListRepositoryCredentials is a helper method to define mock.On call +// - ctx context.Context +func (_e *ArgoDB_Expecter) ListRepositoryCredentials(ctx interface{}) *ArgoDB_ListRepositoryCredentials_Call { + return &ArgoDB_ListRepositoryCredentials_Call{Call: _e.mock.On("ListRepositoryCredentials", ctx)} +} + +func (_c *ArgoDB_ListRepositoryCredentials_Call) Run(run func(ctx context.Context)) *ArgoDB_ListRepositoryCredentials_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ArgoDB_ListRepositoryCredentials_Call) Return(_a0 []string, _a1 error) *ArgoDB_ListRepositoryCredentials_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_ListRepositoryCredentials_Call) RunAndReturn(run func(context.Context) ([]string, error)) *ArgoDB_ListRepositoryCredentials_Call { + _c.Call.Return(run) + return _c +} + // ListWriteRepositories provides a mock function with given fields: ctx func (_m *ArgoDB) ListWriteRepositories(ctx context.Context) ([]*v1alpha1.Repository, error) { ret := _m.Called(ctx) @@ -871,6 +1744,34 @@ func (_m *ArgoDB) ListWriteRepositories(ctx context.Context) ([]*v1alpha1.Reposi return r0, r1 } +// ArgoDB_ListWriteRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListWriteRepositories' +type ArgoDB_ListWriteRepositories_Call struct { + *mock.Call +} + +// ListWriteRepositories is a helper method to define mock.On call +// - ctx context.Context +func (_e *ArgoDB_Expecter) ListWriteRepositories(ctx interface{}) *ArgoDB_ListWriteRepositories_Call { + return &ArgoDB_ListWriteRepositories_Call{Call: _e.mock.On("ListWriteRepositories", ctx)} +} + +func (_c *ArgoDB_ListWriteRepositories_Call) Run(run func(ctx context.Context)) *ArgoDB_ListWriteRepositories_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ArgoDB_ListWriteRepositories_Call) Return(_a0 []*v1alpha1.Repository, _a1 error) *ArgoDB_ListWriteRepositories_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_ListWriteRepositories_Call) RunAndReturn(run func(context.Context) ([]*v1alpha1.Repository, error)) *ArgoDB_ListWriteRepositories_Call { + _c.Call.Return(run) + return _c +} + // ListWriteRepositoryCredentials provides a mock function with given fields: ctx func (_m *ArgoDB) ListWriteRepositoryCredentials(ctx context.Context) ([]string, error) { ret := _m.Called(ctx) @@ -901,6 +1802,34 @@ func (_m *ArgoDB) ListWriteRepositoryCredentials(ctx context.Context) ([]string, return r0, r1 } +// ArgoDB_ListWriteRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListWriteRepositoryCredentials' +type ArgoDB_ListWriteRepositoryCredentials_Call struct { + *mock.Call +} + +// ListWriteRepositoryCredentials is a helper method to define mock.On call +// - ctx context.Context +func (_e *ArgoDB_Expecter) ListWriteRepositoryCredentials(ctx interface{}) *ArgoDB_ListWriteRepositoryCredentials_Call { + return &ArgoDB_ListWriteRepositoryCredentials_Call{Call: _e.mock.On("ListWriteRepositoryCredentials", ctx)} +} + +func (_c *ArgoDB_ListWriteRepositoryCredentials_Call) Run(run func(ctx context.Context)) *ArgoDB_ListWriteRepositoryCredentials_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ArgoDB_ListWriteRepositoryCredentials_Call) Return(_a0 []string, _a1 error) *ArgoDB_ListWriteRepositoryCredentials_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_ListWriteRepositoryCredentials_Call) RunAndReturn(run func(context.Context) ([]string, error)) *ArgoDB_ListWriteRepositoryCredentials_Call { + _c.Call.Return(run) + return _c +} + // RemoveRepoCertificates provides a mock function with given fields: ctx, selector func (_m *ArgoDB) RemoveRepoCertificates(ctx context.Context, selector *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error) { ret := _m.Called(ctx, selector) @@ -931,6 +1860,35 @@ func (_m *ArgoDB) RemoveRepoCertificates(ctx context.Context, selector *db.Certi return r0, r1 } +// ArgoDB_RemoveRepoCertificates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveRepoCertificates' +type ArgoDB_RemoveRepoCertificates_Call struct { + *mock.Call +} + +// RemoveRepoCertificates is a helper method to define mock.On call +// - ctx context.Context +// - selector *db.CertificateListSelector +func (_e *ArgoDB_Expecter) RemoveRepoCertificates(ctx interface{}, selector interface{}) *ArgoDB_RemoveRepoCertificates_Call { + return &ArgoDB_RemoveRepoCertificates_Call{Call: _e.mock.On("RemoveRepoCertificates", ctx, selector)} +} + +func (_c *ArgoDB_RemoveRepoCertificates_Call) Run(run func(ctx context.Context, selector *db.CertificateListSelector)) *ArgoDB_RemoveRepoCertificates_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*db.CertificateListSelector)) + }) + return _c +} + +func (_c *ArgoDB_RemoveRepoCertificates_Call) Return(_a0 *v1alpha1.RepositoryCertificateList, _a1 error) *ArgoDB_RemoveRepoCertificates_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_RemoveRepoCertificates_Call) RunAndReturn(run func(context.Context, *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)) *ArgoDB_RemoveRepoCertificates_Call { + _c.Call.Return(run) + return _c +} + // RepositoryExists provides a mock function with given fields: ctx, repoURL, project func (_m *ArgoDB) RepositoryExists(ctx context.Context, repoURL string, project string) (bool, error) { ret := _m.Called(ctx, repoURL, project) @@ -959,6 +1917,36 @@ func (_m *ArgoDB) RepositoryExists(ctx context.Context, repoURL string, project return r0, r1 } +// ArgoDB_RepositoryExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RepositoryExists' +type ArgoDB_RepositoryExists_Call struct { + *mock.Call +} + +// RepositoryExists is a helper method to define mock.On call +// - ctx context.Context +// - repoURL string +// - project string +func (_e *ArgoDB_Expecter) RepositoryExists(ctx interface{}, repoURL interface{}, project interface{}) *ArgoDB_RepositoryExists_Call { + return &ArgoDB_RepositoryExists_Call{Call: _e.mock.On("RepositoryExists", ctx, repoURL, project)} +} + +func (_c *ArgoDB_RepositoryExists_Call) Run(run func(ctx context.Context, repoURL string, project string)) *ArgoDB_RepositoryExists_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *ArgoDB_RepositoryExists_Call) Return(_a0 bool, _a1 error) *ArgoDB_RepositoryExists_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_RepositoryExists_Call) RunAndReturn(run func(context.Context, string, string) (bool, error)) *ArgoDB_RepositoryExists_Call { + _c.Call.Return(run) + return _c +} + // UpdateCluster provides a mock function with given fields: ctx, c func (_m *ArgoDB) UpdateCluster(ctx context.Context, c *v1alpha1.Cluster) (*v1alpha1.Cluster, error) { ret := _m.Called(ctx, c) @@ -989,6 +1977,35 @@ func (_m *ArgoDB) UpdateCluster(ctx context.Context, c *v1alpha1.Cluster) (*v1al return r0, r1 } +// ArgoDB_UpdateCluster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCluster' +type ArgoDB_UpdateCluster_Call struct { + *mock.Call +} + +// UpdateCluster is a helper method to define mock.On call +// - ctx context.Context +// - c *v1alpha1.Cluster +func (_e *ArgoDB_Expecter) UpdateCluster(ctx interface{}, c interface{}) *ArgoDB_UpdateCluster_Call { + return &ArgoDB_UpdateCluster_Call{Call: _e.mock.On("UpdateCluster", ctx, c)} +} + +func (_c *ArgoDB_UpdateCluster_Call) Run(run func(ctx context.Context, c *v1alpha1.Cluster)) *ArgoDB_UpdateCluster_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1alpha1.Cluster)) + }) + return _c +} + +func (_c *ArgoDB_UpdateCluster_Call) Return(_a0 *v1alpha1.Cluster, _a1 error) *ArgoDB_UpdateCluster_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_UpdateCluster_Call) RunAndReturn(run func(context.Context, *v1alpha1.Cluster) (*v1alpha1.Cluster, error)) *ArgoDB_UpdateCluster_Call { + _c.Call.Return(run) + return _c +} + // UpdateRepository provides a mock function with given fields: ctx, r func (_m *ArgoDB) UpdateRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) { ret := _m.Called(ctx, r) @@ -1019,6 +2036,35 @@ func (_m *ArgoDB) UpdateRepository(ctx context.Context, r *v1alpha1.Repository) return r0, r1 } +// ArgoDB_UpdateRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRepository' +type ArgoDB_UpdateRepository_Call struct { + *mock.Call +} + +// UpdateRepository is a helper method to define mock.On call +// - ctx context.Context +// - r *v1alpha1.Repository +func (_e *ArgoDB_Expecter) UpdateRepository(ctx interface{}, r interface{}) *ArgoDB_UpdateRepository_Call { + return &ArgoDB_UpdateRepository_Call{Call: _e.mock.On("UpdateRepository", ctx, r)} +} + +func (_c *ArgoDB_UpdateRepository_Call) Run(run func(ctx context.Context, r *v1alpha1.Repository)) *ArgoDB_UpdateRepository_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1alpha1.Repository)) + }) + return _c +} + +func (_c *ArgoDB_UpdateRepository_Call) Return(_a0 *v1alpha1.Repository, _a1 error) *ArgoDB_UpdateRepository_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_UpdateRepository_Call) RunAndReturn(run func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)) *ArgoDB_UpdateRepository_Call { + _c.Call.Return(run) + return _c +} + // UpdateRepositoryCredentials provides a mock function with given fields: ctx, r func (_m *ArgoDB) UpdateRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) { ret := _m.Called(ctx, r) @@ -1049,6 +2095,35 @@ func (_m *ArgoDB) UpdateRepositoryCredentials(ctx context.Context, r *v1alpha1.R return r0, r1 } +// ArgoDB_UpdateRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRepositoryCredentials' +type ArgoDB_UpdateRepositoryCredentials_Call struct { + *mock.Call +} + +// UpdateRepositoryCredentials is a helper method to define mock.On call +// - ctx context.Context +// - r *v1alpha1.RepoCreds +func (_e *ArgoDB_Expecter) UpdateRepositoryCredentials(ctx interface{}, r interface{}) *ArgoDB_UpdateRepositoryCredentials_Call { + return &ArgoDB_UpdateRepositoryCredentials_Call{Call: _e.mock.On("UpdateRepositoryCredentials", ctx, r)} +} + +func (_c *ArgoDB_UpdateRepositoryCredentials_Call) Run(run func(ctx context.Context, r *v1alpha1.RepoCreds)) *ArgoDB_UpdateRepositoryCredentials_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1alpha1.RepoCreds)) + }) + return _c +} + +func (_c *ArgoDB_UpdateRepositoryCredentials_Call) Return(_a0 *v1alpha1.RepoCreds, _a1 error) *ArgoDB_UpdateRepositoryCredentials_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_UpdateRepositoryCredentials_Call) RunAndReturn(run func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *ArgoDB_UpdateRepositoryCredentials_Call { + _c.Call.Return(run) + return _c +} + // UpdateWriteRepository provides a mock function with given fields: ctx, r func (_m *ArgoDB) UpdateWriteRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) { ret := _m.Called(ctx, r) @@ -1079,6 +2154,35 @@ func (_m *ArgoDB) UpdateWriteRepository(ctx context.Context, r *v1alpha1.Reposit return r0, r1 } +// ArgoDB_UpdateWriteRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateWriteRepository' +type ArgoDB_UpdateWriteRepository_Call struct { + *mock.Call +} + +// UpdateWriteRepository is a helper method to define mock.On call +// - ctx context.Context +// - r *v1alpha1.Repository +func (_e *ArgoDB_Expecter) UpdateWriteRepository(ctx interface{}, r interface{}) *ArgoDB_UpdateWriteRepository_Call { + return &ArgoDB_UpdateWriteRepository_Call{Call: _e.mock.On("UpdateWriteRepository", ctx, r)} +} + +func (_c *ArgoDB_UpdateWriteRepository_Call) Run(run func(ctx context.Context, r *v1alpha1.Repository)) *ArgoDB_UpdateWriteRepository_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1alpha1.Repository)) + }) + return _c +} + +func (_c *ArgoDB_UpdateWriteRepository_Call) Return(_a0 *v1alpha1.Repository, _a1 error) *ArgoDB_UpdateWriteRepository_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_UpdateWriteRepository_Call) RunAndReturn(run func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)) *ArgoDB_UpdateWriteRepository_Call { + _c.Call.Return(run) + return _c +} + // UpdateWriteRepositoryCredentials provides a mock function with given fields: ctx, r func (_m *ArgoDB) UpdateWriteRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) { ret := _m.Called(ctx, r) @@ -1109,6 +2213,35 @@ func (_m *ArgoDB) UpdateWriteRepositoryCredentials(ctx context.Context, r *v1alp return r0, r1 } +// ArgoDB_UpdateWriteRepositoryCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateWriteRepositoryCredentials' +type ArgoDB_UpdateWriteRepositoryCredentials_Call struct { + *mock.Call +} + +// UpdateWriteRepositoryCredentials is a helper method to define mock.On call +// - ctx context.Context +// - r *v1alpha1.RepoCreds +func (_e *ArgoDB_Expecter) UpdateWriteRepositoryCredentials(ctx interface{}, r interface{}) *ArgoDB_UpdateWriteRepositoryCredentials_Call { + return &ArgoDB_UpdateWriteRepositoryCredentials_Call{Call: _e.mock.On("UpdateWriteRepositoryCredentials", ctx, r)} +} + +func (_c *ArgoDB_UpdateWriteRepositoryCredentials_Call) Run(run func(ctx context.Context, r *v1alpha1.RepoCreds)) *ArgoDB_UpdateWriteRepositoryCredentials_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1alpha1.RepoCreds)) + }) + return _c +} + +func (_c *ArgoDB_UpdateWriteRepositoryCredentials_Call) Return(_a0 *v1alpha1.RepoCreds, _a1 error) *ArgoDB_UpdateWriteRepositoryCredentials_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_UpdateWriteRepositoryCredentials_Call) RunAndReturn(run func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *ArgoDB_UpdateWriteRepositoryCredentials_Call { + _c.Call.Return(run) + return _c +} + // WatchClusters provides a mock function with given fields: ctx, handleAddEvent, handleModEvent, handleDeleteEvent func (_m *ArgoDB) WatchClusters(ctx context.Context, handleAddEvent func(*v1alpha1.Cluster), handleModEvent func(*v1alpha1.Cluster, *v1alpha1.Cluster), handleDeleteEvent func(string)) error { ret := _m.Called(ctx, handleAddEvent, handleModEvent, handleDeleteEvent) @@ -1127,6 +2260,37 @@ func (_m *ArgoDB) WatchClusters(ctx context.Context, handleAddEvent func(*v1alph return r0 } +// ArgoDB_WatchClusters_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchClusters' +type ArgoDB_WatchClusters_Call struct { + *mock.Call +} + +// WatchClusters is a helper method to define mock.On call +// - ctx context.Context +// - handleAddEvent func(*v1alpha1.Cluster) +// - handleModEvent func(*v1alpha1.Cluster , *v1alpha1.Cluster) +// - handleDeleteEvent func(string) +func (_e *ArgoDB_Expecter) WatchClusters(ctx interface{}, handleAddEvent interface{}, handleModEvent interface{}, handleDeleteEvent interface{}) *ArgoDB_WatchClusters_Call { + return &ArgoDB_WatchClusters_Call{Call: _e.mock.On("WatchClusters", ctx, handleAddEvent, handleModEvent, handleDeleteEvent)} +} + +func (_c *ArgoDB_WatchClusters_Call) Run(run func(ctx context.Context, handleAddEvent func(*v1alpha1.Cluster), handleModEvent func(*v1alpha1.Cluster, *v1alpha1.Cluster), handleDeleteEvent func(string))) *ArgoDB_WatchClusters_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(func(*v1alpha1.Cluster)), args[2].(func(*v1alpha1.Cluster, *v1alpha1.Cluster)), args[3].(func(string))) + }) + return _c +} + +func (_c *ArgoDB_WatchClusters_Call) Return(_a0 error) *ArgoDB_WatchClusters_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ArgoDB_WatchClusters_Call) RunAndReturn(run func(context.Context, func(*v1alpha1.Cluster), func(*v1alpha1.Cluster, *v1alpha1.Cluster), func(string)) error) *ArgoDB_WatchClusters_Call { + _c.Call.Return(run) + return _c +} + // WriteRepositoryExists provides a mock function with given fields: ctx, repoURL, project func (_m *ArgoDB) WriteRepositoryExists(ctx context.Context, repoURL string, project string) (bool, error) { ret := _m.Called(ctx, repoURL, project) @@ -1155,6 +2319,36 @@ func (_m *ArgoDB) WriteRepositoryExists(ctx context.Context, repoURL string, pro return r0, r1 } +// ArgoDB_WriteRepositoryExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteRepositoryExists' +type ArgoDB_WriteRepositoryExists_Call struct { + *mock.Call +} + +// WriteRepositoryExists is a helper method to define mock.On call +// - ctx context.Context +// - repoURL string +// - project string +func (_e *ArgoDB_Expecter) WriteRepositoryExists(ctx interface{}, repoURL interface{}, project interface{}) *ArgoDB_WriteRepositoryExists_Call { + return &ArgoDB_WriteRepositoryExists_Call{Call: _e.mock.On("WriteRepositoryExists", ctx, repoURL, project)} +} + +func (_c *ArgoDB_WriteRepositoryExists_Call) Run(run func(ctx context.Context, repoURL string, project string)) *ArgoDB_WriteRepositoryExists_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *ArgoDB_WriteRepositoryExists_Call) Return(_a0 bool, _a1 error) *ArgoDB_WriteRepositoryExists_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ArgoDB_WriteRepositoryExists_Call) RunAndReturn(run func(context.Context, string, string) (bool, error)) *ArgoDB_WriteRepositoryExists_Call { + _c.Call.Return(run) + return _c +} + // NewArgoDB creates a new instance of ArgoDB. 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 NewArgoDB(t interface { diff --git a/util/git/mocks/Client.go b/util/git/mocks/Client.go index 0210570e7192c..395bd76e4bec1 100644 --- a/util/git/mocks/Client.go +++ b/util/git/mocks/Client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -12,6 +12,14 @@ type Client struct { mock.Mock } +type Client_Expecter struct { + mock *mock.Mock +} + +func (_m *Client) EXPECT() *Client_Expecter { + return &Client_Expecter{mock: &_m.Mock} +} + // ChangedFiles provides a mock function with given fields: revision, targetRevision func (_m *Client) ChangedFiles(revision string, targetRevision string) ([]string, error) { ret := _m.Called(revision, targetRevision) @@ -42,6 +50,35 @@ func (_m *Client) ChangedFiles(revision string, targetRevision string) ([]string return r0, r1 } +// Client_ChangedFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangedFiles' +type Client_ChangedFiles_Call struct { + *mock.Call +} + +// ChangedFiles is a helper method to define mock.On call +// - revision string +// - targetRevision string +func (_e *Client_Expecter) ChangedFiles(revision interface{}, targetRevision interface{}) *Client_ChangedFiles_Call { + return &Client_ChangedFiles_Call{Call: _e.mock.On("ChangedFiles", revision, targetRevision)} +} + +func (_c *Client_ChangedFiles_Call) Run(run func(revision string, targetRevision string)) *Client_ChangedFiles_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *Client_ChangedFiles_Call) Return(_a0 []string, _a1 error) *Client_ChangedFiles_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_ChangedFiles_Call) RunAndReturn(run func(string, string) ([]string, error)) *Client_ChangedFiles_Call { + _c.Call.Return(run) + return _c +} + // Checkout provides a mock function with given fields: revision, submoduleEnabled func (_m *Client) Checkout(revision string, submoduleEnabled bool) (string, error) { ret := _m.Called(revision, submoduleEnabled) @@ -70,6 +107,35 @@ func (_m *Client) Checkout(revision string, submoduleEnabled bool) (string, erro return r0, r1 } +// Client_Checkout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Checkout' +type Client_Checkout_Call struct { + *mock.Call +} + +// Checkout is a helper method to define mock.On call +// - revision string +// - submoduleEnabled bool +func (_e *Client_Expecter) Checkout(revision interface{}, submoduleEnabled interface{}) *Client_Checkout_Call { + return &Client_Checkout_Call{Call: _e.mock.On("Checkout", revision, submoduleEnabled)} +} + +func (_c *Client_Checkout_Call) Run(run func(revision string, submoduleEnabled bool)) *Client_Checkout_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(bool)) + }) + return _c +} + +func (_c *Client_Checkout_Call) Return(_a0 string, _a1 error) *Client_Checkout_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_Checkout_Call) RunAndReturn(run func(string, bool) (string, error)) *Client_Checkout_Call { + _c.Call.Return(run) + return _c +} + // CheckoutOrNew provides a mock function with given fields: branch, base, submoduleEnabled func (_m *Client) CheckoutOrNew(branch string, base string, submoduleEnabled bool) (string, error) { ret := _m.Called(branch, base, submoduleEnabled) @@ -98,6 +164,36 @@ func (_m *Client) CheckoutOrNew(branch string, base string, submoduleEnabled boo return r0, r1 } +// Client_CheckoutOrNew_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckoutOrNew' +type Client_CheckoutOrNew_Call struct { + *mock.Call +} + +// CheckoutOrNew is a helper method to define mock.On call +// - branch string +// - base string +// - submoduleEnabled bool +func (_e *Client_Expecter) CheckoutOrNew(branch interface{}, base interface{}, submoduleEnabled interface{}) *Client_CheckoutOrNew_Call { + return &Client_CheckoutOrNew_Call{Call: _e.mock.On("CheckoutOrNew", branch, base, submoduleEnabled)} +} + +func (_c *Client_CheckoutOrNew_Call) Run(run func(branch string, base string, submoduleEnabled bool)) *Client_CheckoutOrNew_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(bool)) + }) + return _c +} + +func (_c *Client_CheckoutOrNew_Call) Return(_a0 string, _a1 error) *Client_CheckoutOrNew_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CheckoutOrNew_Call) RunAndReturn(run func(string, string, bool) (string, error)) *Client_CheckoutOrNew_Call { + _c.Call.Return(run) + return _c +} + // CheckoutOrOrphan provides a mock function with given fields: branch, submoduleEnabled func (_m *Client) CheckoutOrOrphan(branch string, submoduleEnabled bool) (string, error) { ret := _m.Called(branch, submoduleEnabled) @@ -126,6 +222,35 @@ func (_m *Client) CheckoutOrOrphan(branch string, submoduleEnabled bool) (string return r0, r1 } +// Client_CheckoutOrOrphan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckoutOrOrphan' +type Client_CheckoutOrOrphan_Call struct { + *mock.Call +} + +// CheckoutOrOrphan is a helper method to define mock.On call +// - branch string +// - submoduleEnabled bool +func (_e *Client_Expecter) CheckoutOrOrphan(branch interface{}, submoduleEnabled interface{}) *Client_CheckoutOrOrphan_Call { + return &Client_CheckoutOrOrphan_Call{Call: _e.mock.On("CheckoutOrOrphan", branch, submoduleEnabled)} +} + +func (_c *Client_CheckoutOrOrphan_Call) Run(run func(branch string, submoduleEnabled bool)) *Client_CheckoutOrOrphan_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(bool)) + }) + return _c +} + +func (_c *Client_CheckoutOrOrphan_Call) Return(_a0 string, _a1 error) *Client_CheckoutOrOrphan_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CheckoutOrOrphan_Call) RunAndReturn(run func(string, bool) (string, error)) *Client_CheckoutOrOrphan_Call { + _c.Call.Return(run) + return _c +} + // CommitAndPush provides a mock function with given fields: branch, message func (_m *Client) CommitAndPush(branch string, message string) (string, error) { ret := _m.Called(branch, message) @@ -154,6 +279,35 @@ func (_m *Client) CommitAndPush(branch string, message string) (string, error) { return r0, r1 } +// Client_CommitAndPush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommitAndPush' +type Client_CommitAndPush_Call struct { + *mock.Call +} + +// CommitAndPush is a helper method to define mock.On call +// - branch string +// - message string +func (_e *Client_Expecter) CommitAndPush(branch interface{}, message interface{}) *Client_CommitAndPush_Call { + return &Client_CommitAndPush_Call{Call: _e.mock.On("CommitAndPush", branch, message)} +} + +func (_c *Client_CommitAndPush_Call) Run(run func(branch string, message string)) *Client_CommitAndPush_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *Client_CommitAndPush_Call) Return(_a0 string, _a1 error) *Client_CommitAndPush_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CommitAndPush_Call) RunAndReturn(run func(string, string) (string, error)) *Client_CommitAndPush_Call { + _c.Call.Return(run) + return _c +} + // CommitSHA provides a mock function with no fields func (_m *Client) CommitSHA() (string, error) { ret := _m.Called() @@ -182,6 +336,33 @@ func (_m *Client) CommitSHA() (string, error) { return r0, r1 } +// Client_CommitSHA_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommitSHA' +type Client_CommitSHA_Call struct { + *mock.Call +} + +// CommitSHA is a helper method to define mock.On call +func (_e *Client_Expecter) CommitSHA() *Client_CommitSHA_Call { + return &Client_CommitSHA_Call{Call: _e.mock.On("CommitSHA")} +} + +func (_c *Client_CommitSHA_Call) Run(run func()) *Client_CommitSHA_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_CommitSHA_Call) Return(_a0 string, _a1 error) *Client_CommitSHA_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CommitSHA_Call) RunAndReturn(run func() (string, error)) *Client_CommitSHA_Call { + _c.Call.Return(run) + return _c +} + // Fetch provides a mock function with given fields: revision func (_m *Client) Fetch(revision string) error { ret := _m.Called(revision) @@ -200,6 +381,34 @@ func (_m *Client) Fetch(revision string) error { return r0 } +// Client_Fetch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fetch' +type Client_Fetch_Call struct { + *mock.Call +} + +// Fetch is a helper method to define mock.On call +// - revision string +func (_e *Client_Expecter) Fetch(revision interface{}) *Client_Fetch_Call { + return &Client_Fetch_Call{Call: _e.mock.On("Fetch", revision)} +} + +func (_c *Client_Fetch_Call) Run(run func(revision string)) *Client_Fetch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *Client_Fetch_Call) Return(_a0 error) *Client_Fetch_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_Fetch_Call) RunAndReturn(run func(string) error) *Client_Fetch_Call { + _c.Call.Return(run) + return _c +} + // Init provides a mock function with no fields func (_m *Client) Init() error { ret := _m.Called() @@ -218,6 +427,33 @@ func (_m *Client) Init() error { return r0 } +// Client_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init' +type Client_Init_Call struct { + *mock.Call +} + +// Init is a helper method to define mock.On call +func (_e *Client_Expecter) Init() *Client_Init_Call { + return &Client_Init_Call{Call: _e.mock.On("Init")} +} + +func (_c *Client_Init_Call) Run(run func()) *Client_Init_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_Init_Call) Return(_a0 error) *Client_Init_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_Init_Call) RunAndReturn(run func() error) *Client_Init_Call { + _c.Call.Return(run) + return _c +} + // IsAnnotatedTag provides a mock function with given fields: _a0 func (_m *Client) IsAnnotatedTag(_a0 string) bool { ret := _m.Called(_a0) @@ -236,6 +472,34 @@ func (_m *Client) IsAnnotatedTag(_a0 string) bool { return r0 } +// Client_IsAnnotatedTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAnnotatedTag' +type Client_IsAnnotatedTag_Call struct { + *mock.Call +} + +// IsAnnotatedTag is a helper method to define mock.On call +// - _a0 string +func (_e *Client_Expecter) IsAnnotatedTag(_a0 interface{}) *Client_IsAnnotatedTag_Call { + return &Client_IsAnnotatedTag_Call{Call: _e.mock.On("IsAnnotatedTag", _a0)} +} + +func (_c *Client_IsAnnotatedTag_Call) Run(run func(_a0 string)) *Client_IsAnnotatedTag_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *Client_IsAnnotatedTag_Call) Return(_a0 bool) *Client_IsAnnotatedTag_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_IsAnnotatedTag_Call) RunAndReturn(run func(string) bool) *Client_IsAnnotatedTag_Call { + _c.Call.Return(run) + return _c +} + // IsRevisionPresent provides a mock function with given fields: revision func (_m *Client) IsRevisionPresent(revision string) bool { ret := _m.Called(revision) @@ -254,6 +518,34 @@ func (_m *Client) IsRevisionPresent(revision string) bool { return r0 } +// Client_IsRevisionPresent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsRevisionPresent' +type Client_IsRevisionPresent_Call struct { + *mock.Call +} + +// IsRevisionPresent is a helper method to define mock.On call +// - revision string +func (_e *Client_Expecter) IsRevisionPresent(revision interface{}) *Client_IsRevisionPresent_Call { + return &Client_IsRevisionPresent_Call{Call: _e.mock.On("IsRevisionPresent", revision)} +} + +func (_c *Client_IsRevisionPresent_Call) Run(run func(revision string)) *Client_IsRevisionPresent_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *Client_IsRevisionPresent_Call) Return(_a0 bool) *Client_IsRevisionPresent_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_IsRevisionPresent_Call) RunAndReturn(run func(string) bool) *Client_IsRevisionPresent_Call { + _c.Call.Return(run) + return _c +} + // LsFiles provides a mock function with given fields: path, enableNewGitFileGlobbing func (_m *Client) LsFiles(path string, enableNewGitFileGlobbing bool) ([]string, error) { ret := _m.Called(path, enableNewGitFileGlobbing) @@ -284,6 +576,35 @@ func (_m *Client) LsFiles(path string, enableNewGitFileGlobbing bool) ([]string, return r0, r1 } +// Client_LsFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LsFiles' +type Client_LsFiles_Call struct { + *mock.Call +} + +// LsFiles is a helper method to define mock.On call +// - path string +// - enableNewGitFileGlobbing bool +func (_e *Client_Expecter) LsFiles(path interface{}, enableNewGitFileGlobbing interface{}) *Client_LsFiles_Call { + return &Client_LsFiles_Call{Call: _e.mock.On("LsFiles", path, enableNewGitFileGlobbing)} +} + +func (_c *Client_LsFiles_Call) Run(run func(path string, enableNewGitFileGlobbing bool)) *Client_LsFiles_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(bool)) + }) + return _c +} + +func (_c *Client_LsFiles_Call) Return(_a0 []string, _a1 error) *Client_LsFiles_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_LsFiles_Call) RunAndReturn(run func(string, bool) ([]string, error)) *Client_LsFiles_Call { + _c.Call.Return(run) + return _c +} + // LsLargeFiles provides a mock function with no fields func (_m *Client) LsLargeFiles() ([]string, error) { ret := _m.Called() @@ -314,6 +635,33 @@ func (_m *Client) LsLargeFiles() ([]string, error) { return r0, r1 } +// Client_LsLargeFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LsLargeFiles' +type Client_LsLargeFiles_Call struct { + *mock.Call +} + +// LsLargeFiles is a helper method to define mock.On call +func (_e *Client_Expecter) LsLargeFiles() *Client_LsLargeFiles_Call { + return &Client_LsLargeFiles_Call{Call: _e.mock.On("LsLargeFiles")} +} + +func (_c *Client_LsLargeFiles_Call) Run(run func()) *Client_LsLargeFiles_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_LsLargeFiles_Call) Return(_a0 []string, _a1 error) *Client_LsLargeFiles_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_LsLargeFiles_Call) RunAndReturn(run func() ([]string, error)) *Client_LsLargeFiles_Call { + _c.Call.Return(run) + return _c +} + // LsRefs provides a mock function with no fields func (_m *Client) LsRefs() (*git.Refs, error) { ret := _m.Called() @@ -344,6 +692,33 @@ func (_m *Client) LsRefs() (*git.Refs, error) { return r0, r1 } +// Client_LsRefs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LsRefs' +type Client_LsRefs_Call struct { + *mock.Call +} + +// LsRefs is a helper method to define mock.On call +func (_e *Client_Expecter) LsRefs() *Client_LsRefs_Call { + return &Client_LsRefs_Call{Call: _e.mock.On("LsRefs")} +} + +func (_c *Client_LsRefs_Call) Run(run func()) *Client_LsRefs_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_LsRefs_Call) Return(_a0 *git.Refs, _a1 error) *Client_LsRefs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_LsRefs_Call) RunAndReturn(run func() (*git.Refs, error)) *Client_LsRefs_Call { + _c.Call.Return(run) + return _c +} + // LsRemote provides a mock function with given fields: revision func (_m *Client) LsRemote(revision string) (string, error) { ret := _m.Called(revision) @@ -372,6 +747,34 @@ func (_m *Client) LsRemote(revision string) (string, error) { return r0, r1 } +// Client_LsRemote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LsRemote' +type Client_LsRemote_Call struct { + *mock.Call +} + +// LsRemote is a helper method to define mock.On call +// - revision string +func (_e *Client_Expecter) LsRemote(revision interface{}) *Client_LsRemote_Call { + return &Client_LsRemote_Call{Call: _e.mock.On("LsRemote", revision)} +} + +func (_c *Client_LsRemote_Call) Run(run func(revision string)) *Client_LsRemote_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *Client_LsRemote_Call) Return(_a0 string, _a1 error) *Client_LsRemote_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_LsRemote_Call) RunAndReturn(run func(string) (string, error)) *Client_LsRemote_Call { + _c.Call.Return(run) + return _c +} + // RemoveContents provides a mock function with no fields func (_m *Client) RemoveContents() (string, error) { ret := _m.Called() @@ -400,6 +803,33 @@ func (_m *Client) RemoveContents() (string, error) { return r0, r1 } +// Client_RemoveContents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveContents' +type Client_RemoveContents_Call struct { + *mock.Call +} + +// RemoveContents is a helper method to define mock.On call +func (_e *Client_Expecter) RemoveContents() *Client_RemoveContents_Call { + return &Client_RemoveContents_Call{Call: _e.mock.On("RemoveContents")} +} + +func (_c *Client_RemoveContents_Call) Run(run func()) *Client_RemoveContents_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_RemoveContents_Call) Return(_a0 string, _a1 error) *Client_RemoveContents_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_RemoveContents_Call) RunAndReturn(run func() (string, error)) *Client_RemoveContents_Call { + _c.Call.Return(run) + return _c +} + // RevisionMetadata provides a mock function with given fields: revision func (_m *Client) RevisionMetadata(revision string) (*git.RevisionMetadata, error) { ret := _m.Called(revision) @@ -430,6 +860,34 @@ func (_m *Client) RevisionMetadata(revision string) (*git.RevisionMetadata, erro return r0, r1 } +// Client_RevisionMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevisionMetadata' +type Client_RevisionMetadata_Call struct { + *mock.Call +} + +// RevisionMetadata is a helper method to define mock.On call +// - revision string +func (_e *Client_Expecter) RevisionMetadata(revision interface{}) *Client_RevisionMetadata_Call { + return &Client_RevisionMetadata_Call{Call: _e.mock.On("RevisionMetadata", revision)} +} + +func (_c *Client_RevisionMetadata_Call) Run(run func(revision string)) *Client_RevisionMetadata_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *Client_RevisionMetadata_Call) Return(_a0 *git.RevisionMetadata, _a1 error) *Client_RevisionMetadata_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_RevisionMetadata_Call) RunAndReturn(run func(string) (*git.RevisionMetadata, error)) *Client_RevisionMetadata_Call { + _c.Call.Return(run) + return _c +} + // Root provides a mock function with no fields func (_m *Client) Root() string { ret := _m.Called() @@ -448,6 +906,33 @@ func (_m *Client) Root() string { return r0 } +// Client_Root_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Root' +type Client_Root_Call struct { + *mock.Call +} + +// Root is a helper method to define mock.On call +func (_e *Client_Expecter) Root() *Client_Root_Call { + return &Client_Root_Call{Call: _e.mock.On("Root")} +} + +func (_c *Client_Root_Call) Run(run func()) *Client_Root_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_Root_Call) Return(_a0 string) *Client_Root_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_Root_Call) RunAndReturn(run func() string) *Client_Root_Call { + _c.Call.Return(run) + return _c +} + // SetAuthor provides a mock function with given fields: name, email func (_m *Client) SetAuthor(name string, email string) (string, error) { ret := _m.Called(name, email) @@ -476,6 +961,35 @@ func (_m *Client) SetAuthor(name string, email string) (string, error) { return r0, r1 } +// Client_SetAuthor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAuthor' +type Client_SetAuthor_Call struct { + *mock.Call +} + +// SetAuthor is a helper method to define mock.On call +// - name string +// - email string +func (_e *Client_Expecter) SetAuthor(name interface{}, email interface{}) *Client_SetAuthor_Call { + return &Client_SetAuthor_Call{Call: _e.mock.On("SetAuthor", name, email)} +} + +func (_c *Client_SetAuthor_Call) Run(run func(name string, email string)) *Client_SetAuthor_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *Client_SetAuthor_Call) Return(_a0 string, _a1 error) *Client_SetAuthor_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_SetAuthor_Call) RunAndReturn(run func(string, string) (string, error)) *Client_SetAuthor_Call { + _c.Call.Return(run) + return _c +} + // Submodule provides a mock function with no fields func (_m *Client) Submodule() error { ret := _m.Called() @@ -494,6 +1008,33 @@ func (_m *Client) Submodule() error { return r0 } +// Client_Submodule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Submodule' +type Client_Submodule_Call struct { + *mock.Call +} + +// Submodule is a helper method to define mock.On call +func (_e *Client_Expecter) Submodule() *Client_Submodule_Call { + return &Client_Submodule_Call{Call: _e.mock.On("Submodule")} +} + +func (_c *Client_Submodule_Call) Run(run func()) *Client_Submodule_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_Submodule_Call) Return(_a0 error) *Client_Submodule_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_Submodule_Call) RunAndReturn(run func() error) *Client_Submodule_Call { + _c.Call.Return(run) + return _c +} + // VerifyCommitSignature provides a mock function with given fields: _a0 func (_m *Client) VerifyCommitSignature(_a0 string) (string, error) { ret := _m.Called(_a0) @@ -522,6 +1063,34 @@ func (_m *Client) VerifyCommitSignature(_a0 string) (string, error) { return r0, r1 } +// Client_VerifyCommitSignature_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyCommitSignature' +type Client_VerifyCommitSignature_Call struct { + *mock.Call +} + +// VerifyCommitSignature is a helper method to define mock.On call +// - _a0 string +func (_e *Client_Expecter) VerifyCommitSignature(_a0 interface{}) *Client_VerifyCommitSignature_Call { + return &Client_VerifyCommitSignature_Call{Call: _e.mock.On("VerifyCommitSignature", _a0)} +} + +func (_c *Client_VerifyCommitSignature_Call) Run(run func(_a0 string)) *Client_VerifyCommitSignature_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *Client_VerifyCommitSignature_Call) Return(_a0 string, _a1 error) *Client_VerifyCommitSignature_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_VerifyCommitSignature_Call) RunAndReturn(run func(string) (string, error)) *Client_VerifyCommitSignature_Call { + _c.Call.Return(run) + return _c +} + // NewClient creates a new instance of Client. 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 NewClient(t interface { diff --git a/util/helm/mocks/Client.go b/util/helm/mocks/Client.go index 0133a048ccccb..8ea30673fa01e 100644 --- a/util/helm/mocks/Client.go +++ b/util/helm/mocks/Client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type Client struct { mock.Mock } +type Client_Expecter struct { + mock *mock.Mock +} + +func (_m *Client) EXPECT() *Client_Expecter { + return &Client_Expecter{mock: &_m.Mock} +} + // CleanChartCache provides a mock function with given fields: chart, version func (_m *Client) CleanChartCache(chart string, version string) error { ret := _m.Called(chart, version) @@ -32,6 +40,35 @@ func (_m *Client) CleanChartCache(chart string, version string) error { return r0 } +// Client_CleanChartCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CleanChartCache' +type Client_CleanChartCache_Call struct { + *mock.Call +} + +// CleanChartCache is a helper method to define mock.On call +// - chart string +// - version string +func (_e *Client_Expecter) CleanChartCache(chart interface{}, version interface{}) *Client_CleanChartCache_Call { + return &Client_CleanChartCache_Call{Call: _e.mock.On("CleanChartCache", chart, version)} +} + +func (_c *Client_CleanChartCache_Call) Run(run func(chart string, version string)) *Client_CleanChartCache_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *Client_CleanChartCache_Call) Return(_a0 error) *Client_CleanChartCache_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_CleanChartCache_Call) RunAndReturn(run func(string, string) error) *Client_CleanChartCache_Call { + _c.Call.Return(run) + return _c +} + // ExtractChart provides a mock function with given fields: chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize func (_m *Client) ExtractChart(chart string, version string, passCredentials bool, manifestMaxExtractedSize int64, disableManifestMaxExtractedSize bool) (string, io.Closer, error) { ret := _m.Called(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize) @@ -69,6 +106,38 @@ func (_m *Client) ExtractChart(chart string, version string, passCredentials boo return r0, r1, r2 } +// Client_ExtractChart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExtractChart' +type Client_ExtractChart_Call struct { + *mock.Call +} + +// ExtractChart is a helper method to define mock.On call +// - chart string +// - version string +// - passCredentials bool +// - manifestMaxExtractedSize int64 +// - disableManifestMaxExtractedSize bool +func (_e *Client_Expecter) ExtractChart(chart interface{}, version interface{}, passCredentials interface{}, manifestMaxExtractedSize interface{}, disableManifestMaxExtractedSize interface{}) *Client_ExtractChart_Call { + return &Client_ExtractChart_Call{Call: _e.mock.On("ExtractChart", chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize)} +} + +func (_c *Client_ExtractChart_Call) Run(run func(chart string, version string, passCredentials bool, manifestMaxExtractedSize int64, disableManifestMaxExtractedSize bool)) *Client_ExtractChart_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string), args[2].(bool), args[3].(int64), args[4].(bool)) + }) + return _c +} + +func (_c *Client_ExtractChart_Call) Return(_a0 string, _a1 io.Closer, _a2 error) *Client_ExtractChart_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *Client_ExtractChart_Call) RunAndReturn(run func(string, string, bool, int64, bool) (string, io.Closer, error)) *Client_ExtractChart_Call { + _c.Call.Return(run) + return _c +} + // GetIndex provides a mock function with given fields: noCache, maxIndexSize func (_m *Client) GetIndex(noCache bool, maxIndexSize int64) (*helm.Index, error) { ret := _m.Called(noCache, maxIndexSize) @@ -99,6 +168,35 @@ func (_m *Client) GetIndex(noCache bool, maxIndexSize int64) (*helm.Index, error return r0, r1 } +// Client_GetIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIndex' +type Client_GetIndex_Call struct { + *mock.Call +} + +// GetIndex is a helper method to define mock.On call +// - noCache bool +// - maxIndexSize int64 +func (_e *Client_Expecter) GetIndex(noCache interface{}, maxIndexSize interface{}) *Client_GetIndex_Call { + return &Client_GetIndex_Call{Call: _e.mock.On("GetIndex", noCache, maxIndexSize)} +} + +func (_c *Client_GetIndex_Call) Run(run func(noCache bool, maxIndexSize int64)) *Client_GetIndex_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bool), args[1].(int64)) + }) + return _c +} + +func (_c *Client_GetIndex_Call) Return(_a0 *helm.Index, _a1 error) *Client_GetIndex_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetIndex_Call) RunAndReturn(run func(bool, int64) (*helm.Index, error)) *Client_GetIndex_Call { + _c.Call.Return(run) + return _c +} + // GetTags provides a mock function with given fields: chart, noCache func (_m *Client) GetTags(chart string, noCache bool) ([]string, error) { ret := _m.Called(chart, noCache) @@ -129,6 +227,35 @@ func (_m *Client) GetTags(chart string, noCache bool) ([]string, error) { return r0, r1 } +// Client_GetTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTags' +type Client_GetTags_Call struct { + *mock.Call +} + +// GetTags is a helper method to define mock.On call +// - chart string +// - noCache bool +func (_e *Client_Expecter) GetTags(chart interface{}, noCache interface{}) *Client_GetTags_Call { + return &Client_GetTags_Call{Call: _e.mock.On("GetTags", chart, noCache)} +} + +func (_c *Client_GetTags_Call) Run(run func(chart string, noCache bool)) *Client_GetTags_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(bool)) + }) + return _c +} + +func (_c *Client_GetTags_Call) Return(_a0 []string, _a1 error) *Client_GetTags_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetTags_Call) RunAndReturn(run func(string, bool) ([]string, error)) *Client_GetTags_Call { + _c.Call.Return(run) + return _c +} + // TestHelmOCI provides a mock function with no fields func (_m *Client) TestHelmOCI() (bool, error) { ret := _m.Called() @@ -157,6 +284,33 @@ func (_m *Client) TestHelmOCI() (bool, error) { return r0, r1 } +// Client_TestHelmOCI_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TestHelmOCI' +type Client_TestHelmOCI_Call struct { + *mock.Call +} + +// TestHelmOCI is a helper method to define mock.On call +func (_e *Client_Expecter) TestHelmOCI() *Client_TestHelmOCI_Call { + return &Client_TestHelmOCI_Call{Call: _e.mock.On("TestHelmOCI")} +} + +func (_c *Client_TestHelmOCI_Call) Run(run func()) *Client_TestHelmOCI_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_TestHelmOCI_Call) Return(_a0 bool, _a1 error) *Client_TestHelmOCI_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_TestHelmOCI_Call) RunAndReturn(run func() (bool, error)) *Client_TestHelmOCI_Call { + _c.Call.Return(run) + return _c +} + // NewClient creates a new instance of Client. 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 NewClient(t interface { diff --git a/util/io/mocks/TempPaths.go b/util/io/mocks/TempPaths.go index be029c27376f8..2d36bb79b4891 100644 --- a/util/io/mocks/TempPaths.go +++ b/util/io/mocks/TempPaths.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -9,11 +9,48 @@ type TempPaths struct { mock.Mock } +type TempPaths_Expecter struct { + mock *mock.Mock +} + +func (_m *TempPaths) EXPECT() *TempPaths_Expecter { + return &TempPaths_Expecter{mock: &_m.Mock} +} + // Add provides a mock function with given fields: key, value func (_m *TempPaths) Add(key string, value string) { _m.Called(key, value) } +// TempPaths_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type TempPaths_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - key string +// - value string +func (_e *TempPaths_Expecter) Add(key interface{}, value interface{}) *TempPaths_Add_Call { + return &TempPaths_Add_Call{Call: _e.mock.On("Add", key, value)} +} + +func (_c *TempPaths_Add_Call) Run(run func(key string, value string)) *TempPaths_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *TempPaths_Add_Call) Return() *TempPaths_Add_Call { + _c.Call.Return() + return _c +} + +func (_c *TempPaths_Add_Call) RunAndReturn(run func(string, string)) *TempPaths_Add_Call { + _c.Run(run) + return _c +} + // GetPath provides a mock function with given fields: key func (_m *TempPaths) GetPath(key string) (string, error) { ret := _m.Called(key) @@ -42,6 +79,34 @@ func (_m *TempPaths) GetPath(key string) (string, error) { return r0, r1 } +// TempPaths_GetPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPath' +type TempPaths_GetPath_Call struct { + *mock.Call +} + +// GetPath is a helper method to define mock.On call +// - key string +func (_e *TempPaths_Expecter) GetPath(key interface{}) *TempPaths_GetPath_Call { + return &TempPaths_GetPath_Call{Call: _e.mock.On("GetPath", key)} +} + +func (_c *TempPaths_GetPath_Call) Run(run func(key string)) *TempPaths_GetPath_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *TempPaths_GetPath_Call) Return(_a0 string, _a1 error) *TempPaths_GetPath_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *TempPaths_GetPath_Call) RunAndReturn(run func(string) (string, error)) *TempPaths_GetPath_Call { + _c.Call.Return(run) + return _c +} + // GetPathIfExists provides a mock function with given fields: key func (_m *TempPaths) GetPathIfExists(key string) string { ret := _m.Called(key) @@ -60,6 +125,34 @@ func (_m *TempPaths) GetPathIfExists(key string) string { return r0 } +// TempPaths_GetPathIfExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPathIfExists' +type TempPaths_GetPathIfExists_Call struct { + *mock.Call +} + +// GetPathIfExists is a helper method to define mock.On call +// - key string +func (_e *TempPaths_Expecter) GetPathIfExists(key interface{}) *TempPaths_GetPathIfExists_Call { + return &TempPaths_GetPathIfExists_Call{Call: _e.mock.On("GetPathIfExists", key)} +} + +func (_c *TempPaths_GetPathIfExists_Call) Run(run func(key string)) *TempPaths_GetPathIfExists_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *TempPaths_GetPathIfExists_Call) Return(_a0 string) *TempPaths_GetPathIfExists_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TempPaths_GetPathIfExists_Call) RunAndReturn(run func(string) string) *TempPaths_GetPathIfExists_Call { + _c.Call.Return(run) + return _c +} + // GetPaths provides a mock function with no fields func (_m *TempPaths) GetPaths() map[string]string { ret := _m.Called() @@ -80,6 +173,33 @@ func (_m *TempPaths) GetPaths() map[string]string { return r0 } +// TempPaths_GetPaths_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPaths' +type TempPaths_GetPaths_Call struct { + *mock.Call +} + +// GetPaths is a helper method to define mock.On call +func (_e *TempPaths_Expecter) GetPaths() *TempPaths_GetPaths_Call { + return &TempPaths_GetPaths_Call{Call: _e.mock.On("GetPaths")} +} + +func (_c *TempPaths_GetPaths_Call) Run(run func()) *TempPaths_GetPaths_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TempPaths_GetPaths_Call) Return(_a0 map[string]string) *TempPaths_GetPaths_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TempPaths_GetPaths_Call) RunAndReturn(run func() map[string]string) *TempPaths_GetPaths_Call { + _c.Call.Return(run) + return _c +} + // NewTempPaths creates a new instance of TempPaths. 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 NewTempPaths(t interface { diff --git a/util/notification/argocd/mocks/Service.go b/util/notification/argocd/mocks/Service.go index 6dd37fd12772a..651a9be7604e3 100644 --- a/util/notification/argocd/mocks/Service.go +++ b/util/notification/argocd/mocks/Service.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type Service struct { mock.Mock } +type Service_Expecter struct { + mock *mock.Mock +} + +func (_m *Service) EXPECT() *Service_Expecter { + return &Service_Expecter{mock: &_m.Mock} +} + // GetAppDetails provides a mock function with given fields: ctx, app func (_m *Service) GetAppDetails(ctx context.Context, app *v1alpha1.Application) (*shared.AppDetail, error) { ret := _m.Called(ctx, app) @@ -47,6 +55,35 @@ func (_m *Service) GetAppDetails(ctx context.Context, app *v1alpha1.Application) return r0, r1 } +// Service_GetAppDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAppDetails' +type Service_GetAppDetails_Call struct { + *mock.Call +} + +// GetAppDetails is a helper method to define mock.On call +// - ctx context.Context +// - app *v1alpha1.Application +func (_e *Service_Expecter) GetAppDetails(ctx interface{}, app interface{}) *Service_GetAppDetails_Call { + return &Service_GetAppDetails_Call{Call: _e.mock.On("GetAppDetails", ctx, app)} +} + +func (_c *Service_GetAppDetails_Call) Run(run func(ctx context.Context, app *v1alpha1.Application)) *Service_GetAppDetails_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1alpha1.Application)) + }) + return _c +} + +func (_c *Service_GetAppDetails_Call) Return(_a0 *shared.AppDetail, _a1 error) *Service_GetAppDetails_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_GetAppDetails_Call) RunAndReturn(run func(context.Context, *v1alpha1.Application) (*shared.AppDetail, error)) *Service_GetAppDetails_Call { + _c.Call.Return(run) + return _c +} + // GetCommitMetadata provides a mock function with given fields: ctx, repoURL, commitSHA, project func (_m *Service) GetCommitMetadata(ctx context.Context, repoURL string, commitSHA string, project string) (*shared.CommitMetadata, error) { ret := _m.Called(ctx, repoURL, commitSHA, project) @@ -77,6 +114,37 @@ func (_m *Service) GetCommitMetadata(ctx context.Context, repoURL string, commit return r0, r1 } +// Service_GetCommitMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCommitMetadata' +type Service_GetCommitMetadata_Call struct { + *mock.Call +} + +// GetCommitMetadata is a helper method to define mock.On call +// - ctx context.Context +// - repoURL string +// - commitSHA string +// - project string +func (_e *Service_Expecter) GetCommitMetadata(ctx interface{}, repoURL interface{}, commitSHA interface{}, project interface{}) *Service_GetCommitMetadata_Call { + return &Service_GetCommitMetadata_Call{Call: _e.mock.On("GetCommitMetadata", ctx, repoURL, commitSHA, project)} +} + +func (_c *Service_GetCommitMetadata_Call) Run(run func(ctx context.Context, repoURL string, commitSHA string, project string)) *Service_GetCommitMetadata_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + }) + return _c +} + +func (_c *Service_GetCommitMetadata_Call) Return(_a0 *shared.CommitMetadata, _a1 error) *Service_GetCommitMetadata_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_GetCommitMetadata_Call) RunAndReturn(run func(context.Context, string, string, string) (*shared.CommitMetadata, error)) *Service_GetCommitMetadata_Call { + _c.Call.Return(run) + return _c +} + // NewService creates a new instance of Service. 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 NewService(t interface { diff --git a/util/workloadidentity/mocks/TokenProvider.go b/util/workloadidentity/mocks/TokenProvider.go index 883e76ade56ce..126073b7a5ab6 100644 --- a/util/workloadidentity/mocks/TokenProvider.go +++ b/util/workloadidentity/mocks/TokenProvider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.52.4. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -9,6 +9,14 @@ type TokenProvider struct { mock.Mock } +type TokenProvider_Expecter struct { + mock *mock.Mock +} + +func (_m *TokenProvider) EXPECT() *TokenProvider_Expecter { + return &TokenProvider_Expecter{mock: &_m.Mock} +} + // GetToken provides a mock function with given fields: scope func (_m *TokenProvider) GetToken(scope string) (string, error) { ret := _m.Called(scope) @@ -37,6 +45,34 @@ func (_m *TokenProvider) GetToken(scope string) (string, error) { return r0, r1 } +// TokenProvider_GetToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetToken' +type TokenProvider_GetToken_Call struct { + *mock.Call +} + +// GetToken is a helper method to define mock.On call +// - scope string +func (_e *TokenProvider_Expecter) GetToken(scope interface{}) *TokenProvider_GetToken_Call { + return &TokenProvider_GetToken_Call{Call: _e.mock.On("GetToken", scope)} +} + +func (_c *TokenProvider_GetToken_Call) Run(run func(scope string)) *TokenProvider_GetToken_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *TokenProvider_GetToken_Call) Return(_a0 string, _a1 error) *TokenProvider_GetToken_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *TokenProvider_GetToken_Call) RunAndReturn(run func(string) (string, error)) *TokenProvider_GetToken_Call { + _c.Call.Return(run) + return _c +} + // NewTokenProvider creates a new instance of TokenProvider. 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 NewTokenProvider(t interface { From 076cac8df84f9cd7acc6e4d81169e75cddcc118b Mon Sep 17 00:00:00 2001 From: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Date: Thu, 15 May 2025 14:19:39 -0400 Subject: [PATCH 2/2] chore(test): upgrade to mockery v3 Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --- .mockery.yaml | 101 +- applicationset/generators/mocks/Generator.go | 114 +- applicationset/services/mocks/Repos.go | 112 +- .../mocks/AWSCodeCommitClient.go | 227 +- .../aws_codecommit/mocks/AWSTaggingClient.go | 85 +- .../azure_devops/git/mocks/Client.go | 4192 ++++++++--------- applicationset/utils/mocks/Renderer.go | 105 +- commitserver/apiclient/mocks/Clientset.go | 66 +- .../apiclient/mocks/CommitServiceClient.go | 73 +- .../commit/mocks/RepoClientFactory.go | 67 +- controller/cache/mocks/LiveStateCache.go | 348 +- hack/generate-mock.sh | 2 +- hack/installers/install-codegen-go-tools.sh | 2 +- .../cluster/mocks/ClusterServiceServer.go | 292 +- .../session/mocks/SessionServiceClient.go | 139 +- .../session/mocks/SessionServiceServer.go | 144 +- .../v1alpha1/mocks/AppProjectInterface.go | 278 +- .../mocks/RepoServerServiceClient.go | 504 +- ...Service_GenerateManifestWithFilesClient.go | 196 +- server/application/mocks/Broadcaster.go | 117 +- server/extension/mocks/ApplicationGetter.go | 64 +- .../mocks/ExtensionMetricsRegistry.go | 72 +- server/extension/mocks/ProjectGetter.go | 90 +- server/extension/mocks/RbacEnforcer.go | 55 +- server/extension/mocks/SettingsGetter.go | 58 +- server/extension/mocks/UserGetter.go | 72 +- util/db/mocks/ArgoDB.go | 1198 +++-- util/git/mocks/Client.go | 540 +-- util/helm/mocks/Client.go | 183 +- util/io/mocks/TempPaths.go | 111 +- util/notification/argocd/mocks/Service.go | 102 +- util/workloadidentity/mocks/TokenProvider.go | 64 +- 32 files changed, 4670 insertions(+), 5103 deletions(-) diff --git a/.mockery.yaml b/.mockery.yaml index b62de07e9b8ad..ca4a28b745206 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -1,85 +1,82 @@ -# global config -filename: "{{.InterfaceName}}.go" -dir: "{{.InterfaceDir}}/mocks" -outpkg: "mocks" -mockname: "{{.InterfaceName}}" -with-expecter: true -resolve-type-alias: false -disable-version-string: true -issue-845-fix: true -# individual interface config +dir: '{{.InterfaceDir}}/mocks' +structname: '{{.InterfaceName}}' +filename: '{{.InterfaceName}}.go' +pkgname: mocks + +template-data: + unroll-variadic: true + packages: github.com/argoproj/argo-cd/v3/applicationset/generators: interfaces: - Generator: + Generator: {} github.com/argoproj/argo-cd/v3/applicationset/services: interfaces: - Repos: + Repos: {} github.com/argoproj/argo-cd/v3/applicationset/services/scm_provider: config: - dir: "applicationset/services/scm_provider/aws_codecommit/mocks" + dir: applicationset/services/scm_provider/aws_codecommit/mocks interfaces: - AWSCodeCommitClient: - AWSTaggingClient: - github.com/microsoft/azure-devops-go-api/azuredevops/v7/git: - config: - dir: "applicationset/services/scm_provider/azure_devops/git/mocks" - interfaces: - Client: + AWSCodeCommitClient: {} + AWSTaggingClient: {} github.com/argoproj/argo-cd/v3/applicationset/utils: interfaces: - Renderer: - github.com/argoproj/argo-cd/v3/commitserver/commit: - interfaces: - RepoClientFactory: + Renderer: {} github.com/argoproj/argo-cd/v3/commitserver/apiclient: interfaces: - CommitServiceClient: - Clientset: + Clientset: {} + CommitServiceClient: {} + github.com/argoproj/argo-cd/v3/commitserver/commit: + interfaces: + RepoClientFactory: {} github.com/argoproj/argo-cd/v3/controller/cache: interfaces: - LiveStateCache: + LiveStateCache: {} + github.com/argoproj/argo-cd/v3/pkg/apiclient/cluster: + interfaces: + ClusterServiceServer: {} + github.com/argoproj/argo-cd/v3/pkg/apiclient/session: + interfaces: + SessionServiceClient: {} + SessionServiceServer: {} + github.com/argoproj/argo-cd/v3/pkg/client/clientset/versioned/typed/application/v1alpha1: + interfaces: + AppProjectInterface: {} github.com/argoproj/argo-cd/v3/reposerver/apiclient: interfaces: - RepoServerServiceClient: - RepoServerService_GenerateManifestWithFilesClient: + RepoServerService_GenerateManifestWithFilesClient: {} + RepoServerServiceClient: {} github.com/argoproj/argo-cd/v3/server/application: interfaces: - Broadcaster: + Broadcaster: {} github.com/argoproj/argo-cd/v3/server/extension: interfaces: - ApplicationGetter: - ExtensionMetricsRegistry: - ProjectGetter: - RbacEnforcer: - SettingsGetter: - UserGetter: + ApplicationGetter: {} + ExtensionMetricsRegistry: {} + ProjectGetter: {} + RbacEnforcer: {} + SettingsGetter: {} + UserGetter: {} github.com/argoproj/argo-cd/v3/util/db: interfaces: - ArgoDB: + ArgoDB: {} github.com/argoproj/argo-cd/v3/util/git: interfaces: - Client: + Client: {} github.com/argoproj/argo-cd/v3/util/helm: interfaces: - Client: + Client: {} github.com/argoproj/argo-cd/v3/util/io: interfaces: - TempPaths: + TempPaths: {} github.com/argoproj/argo-cd/v3/util/notification/argocd: interfaces: - Service: + Service: {} github.com/argoproj/argo-cd/v3/util/workloadidentity: interfaces: - TokenProvider: - # These mocks are not currently used, but they are part of the public API of this package. - github.com/argoproj/argo-cd/v3/pkg/apiclient/session: - interfaces: - SessionServiceServer: - SessionServiceClient: - github.com/argoproj/argo-cd/v3/pkg/apiclient/cluster: - interfaces: - ClusterServiceServer: - github.com/argoproj/argo-cd/v3/pkg/client/clientset/versioned/typed/application/v1alpha1: + TokenProvider: {} + github.com/microsoft/azure-devops-go-api/azuredevops/v7/git: + config: + dir: applicationset/services/scm_provider/azure_devops/git/mocks interfaces: - AppProjectInterface: + Client: {} diff --git a/applicationset/generators/mocks/Generator.go b/applicationset/generators/mocks/Generator.go index d6b4a3564ef9d..712a9ed0edb08 100644 --- a/applicationset/generators/mocks/Generator.go +++ b/applicationset/generators/mocks/Generator.go @@ -1,16 +1,30 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - client "sigs.k8s.io/controller-runtime/pkg/client" + "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) - time "time" + t.Cleanup(func() { mock.AssertExpectations(t) }) - v1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" -) + return mock +} // Generator is an autogenerated mock type for the Generator type type Generator struct { @@ -25,9 +39,9 @@ func (_m *Generator) EXPECT() *Generator_Expecter { return &Generator_Expecter{mock: &_m.Mock} } -// GenerateParams provides a mock function with given fields: appSetGenerator, applicationSetInfo, _a2 -func (_m *Generator) GenerateParams(appSetGenerator *v1alpha1.ApplicationSetGenerator, applicationSetInfo *v1alpha1.ApplicationSet, _a2 client.Client) ([]map[string]any, error) { - ret := _m.Called(appSetGenerator, applicationSetInfo, _a2) +// 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") @@ -35,23 +49,21 @@ func (_m *Generator) GenerateParams(appSetGenerator *v1alpha1.ApplicationSetGene var r0 []map[string]any var r1 error - if rf, ok := ret.Get(0).(func(*v1alpha1.ApplicationSetGenerator, *v1alpha1.ApplicationSet, client.Client) ([]map[string]any, error)); ok { - return rf(appSetGenerator, applicationSetInfo, _a2) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.ApplicationSetGenerator, *v1alpha1.ApplicationSet, client.Client) ([]map[string]any, error)); ok { + return returnFunc(appSetGenerator, applicationSetInfo, client1) } - if rf, ok := ret.Get(0).(func(*v1alpha1.ApplicationSetGenerator, *v1alpha1.ApplicationSet, client.Client) []map[string]any); ok { - r0 = rf(appSetGenerator, applicationSetInfo, _a2) + 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 rf, ok := ret.Get(1).(func(*v1alpha1.ApplicationSetGenerator, *v1alpha1.ApplicationSet, client.Client) error); ok { - r1 = rf(appSetGenerator, applicationSetInfo, _a2) + 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 } @@ -61,45 +73,44 @@ type Generator_GenerateParams_Call struct { } // GenerateParams is a helper method to define mock.On call -// - appSetGenerator *v1alpha1.ApplicationSetGenerator -// - applicationSetInfo *v1alpha1.ApplicationSet -// - _a2 client.Client -func (_e *Generator_Expecter) GenerateParams(appSetGenerator interface{}, applicationSetInfo interface{}, _a2 interface{}) *Generator_GenerateParams_Call { - return &Generator_GenerateParams_Call{Call: _e.mock.On("GenerateParams", appSetGenerator, applicationSetInfo, _a2)} +// - appSetGenerator +// - applicationSetInfo +// - client1 +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, _a2 client.Client)) *Generator_GenerateParams_Call { +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) { run(args[0].(*v1alpha1.ApplicationSetGenerator), args[1].(*v1alpha1.ApplicationSet), args[2].(client.Client)) }) return _c } -func (_c *Generator_GenerateParams_Call) Return(_a0 []map[string]any, _a1 error) *Generator_GenerateParams_Call { - _c.Call.Return(_a0, _a1) +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(*v1alpha1.ApplicationSetGenerator, *v1alpha1.ApplicationSet, client.Client) ([]map[string]any, error)) *Generator_GenerateParams_Call { +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 with given fields: appSetGenerator -func (_m *Generator) GetRequeueAfter(appSetGenerator *v1alpha1.ApplicationSetGenerator) time.Duration { - ret := _m.Called(appSetGenerator) +// 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 rf, ok := ret.Get(0).(func(*v1alpha1.ApplicationSetGenerator) time.Duration); ok { - r0 = rf(appSetGenerator) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.ApplicationSetGenerator) time.Duration); ok { + r0 = returnFunc(appSetGenerator) } else { r0 = ret.Get(0).(time.Duration) } - return r0 } @@ -109,7 +120,7 @@ type Generator_GetRequeueAfter_Call struct { } // GetRequeueAfter is a helper method to define mock.On call -// - appSetGenerator *v1alpha1.ApplicationSetGenerator +// - appSetGenerator func (_e *Generator_Expecter) GetRequeueAfter(appSetGenerator interface{}) *Generator_GetRequeueAfter_Call { return &Generator_GetRequeueAfter_Call{Call: _e.mock.On("GetRequeueAfter", appSetGenerator)} } @@ -121,33 +132,32 @@ func (_c *Generator_GetRequeueAfter_Call) Run(run func(appSetGenerator *v1alpha1 return _c } -func (_c *Generator_GetRequeueAfter_Call) Return(_a0 time.Duration) *Generator_GetRequeueAfter_Call { - _c.Call.Return(_a0) +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(*v1alpha1.ApplicationSetGenerator) time.Duration) *Generator_GetRequeueAfter_Call { +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 with given fields: appSetGenerator -func (_m *Generator) GetTemplate(appSetGenerator *v1alpha1.ApplicationSetGenerator) *v1alpha1.ApplicationSetTemplate { - ret := _m.Called(appSetGenerator) +// 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 rf, ok := ret.Get(0).(func(*v1alpha1.ApplicationSetGenerator) *v1alpha1.ApplicationSetTemplate); ok { - r0 = rf(appSetGenerator) + 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 } @@ -157,7 +167,7 @@ type Generator_GetTemplate_Call struct { } // GetTemplate is a helper method to define mock.On call -// - appSetGenerator *v1alpha1.ApplicationSetGenerator +// - appSetGenerator func (_e *Generator_Expecter) GetTemplate(appSetGenerator interface{}) *Generator_GetTemplate_Call { return &Generator_GetTemplate_Call{Call: _e.mock.On("GetTemplate", appSetGenerator)} } @@ -169,26 +179,12 @@ func (_c *Generator_GetTemplate_Call) Run(run func(appSetGenerator *v1alpha1.App return _c } -func (_c *Generator_GetTemplate_Call) Return(_a0 *v1alpha1.ApplicationSetTemplate) *Generator_GetTemplate_Call { - _c.Call.Return(_a0) +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(*v1alpha1.ApplicationSetGenerator) *v1alpha1.ApplicationSetTemplate) *Generator_GetTemplate_Call { +func (_c *Generator_GetTemplate_Call) RunAndReturn(run func(appSetGenerator *v1alpha1.ApplicationSetGenerator) *v1alpha1.ApplicationSetTemplate) *Generator_GetTemplate_Call { _c.Call.Return(run) return _c } - -// 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 -} diff --git a/applicationset/services/mocks/Repos.go b/applicationset/services/mocks/Repos.go index 7172e21378982..d493bf2da7ccd 100644 --- a/applicationset/services/mocks/Repos.go +++ b/applicationset/services/mocks/Repos.go @@ -1,13 +1,29 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - context "context" + "context" mock "github.com/stretchr/testify/mock" ) +// NewRepos creates a new instance of Repos. 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 NewRepos(t interface { + mock.TestingT + Cleanup(func()) +}) *Repos { + mock := &Repos{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // Repos is an autogenerated mock type for the Repos type type Repos struct { mock.Mock @@ -21,9 +37,9 @@ func (_m *Repos) EXPECT() *Repos_Expecter { return &Repos_Expecter{mock: &_m.Mock} } -// GetDirectories provides a mock function with given fields: ctx, repoURL, revision, project, noRevisionCache, verifyCommit -func (_m *Repos) GetDirectories(ctx context.Context, repoURL string, revision string, project string, noRevisionCache bool, verifyCommit bool) ([]string, error) { - ret := _m.Called(ctx, repoURL, revision, project, noRevisionCache, verifyCommit) +// GetDirectories provides a mock function for the type Repos +func (_mock *Repos) GetDirectories(ctx context.Context, repoURL string, revision string, project string, noRevisionCache bool, verifyCommit bool) ([]string, error) { + ret := _mock.Called(ctx, repoURL, revision, project, noRevisionCache, verifyCommit) if len(ret) == 0 { panic("no return value specified for GetDirectories") @@ -31,23 +47,21 @@ func (_m *Repos) GetDirectories(ctx context.Context, repoURL string, revision st var r0 []string var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, bool, bool) ([]string, error)); ok { - return rf(ctx, repoURL, revision, project, noRevisionCache, verifyCommit) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, bool, bool) ([]string, error)); ok { + return returnFunc(ctx, repoURL, revision, project, noRevisionCache, verifyCommit) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, bool, bool) []string); ok { - r0 = rf(ctx, repoURL, revision, project, noRevisionCache, verifyCommit) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, bool, bool) []string); ok { + r0 = returnFunc(ctx, repoURL, revision, project, noRevisionCache, verifyCommit) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, bool, bool) error); ok { - r1 = rf(ctx, repoURL, revision, project, noRevisionCache, verifyCommit) + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string, bool, bool) error); ok { + r1 = returnFunc(ctx, repoURL, revision, project, noRevisionCache, verifyCommit) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -57,12 +71,12 @@ type Repos_GetDirectories_Call struct { } // GetDirectories is a helper method to define mock.On call -// - ctx context.Context -// - repoURL string -// - revision string -// - project string -// - noRevisionCache bool -// - verifyCommit bool +// - ctx +// - repoURL +// - revision +// - project +// - noRevisionCache +// - verifyCommit func (_e *Repos_Expecter) GetDirectories(ctx interface{}, repoURL interface{}, revision interface{}, project interface{}, noRevisionCache interface{}, verifyCommit interface{}) *Repos_GetDirectories_Call { return &Repos_GetDirectories_Call{Call: _e.mock.On("GetDirectories", ctx, repoURL, revision, project, noRevisionCache, verifyCommit)} } @@ -74,19 +88,19 @@ func (_c *Repos_GetDirectories_Call) Run(run func(ctx context.Context, repoURL s return _c } -func (_c *Repos_GetDirectories_Call) Return(_a0 []string, _a1 error) *Repos_GetDirectories_Call { - _c.Call.Return(_a0, _a1) +func (_c *Repos_GetDirectories_Call) Return(strings []string, err error) *Repos_GetDirectories_Call { + _c.Call.Return(strings, err) return _c } -func (_c *Repos_GetDirectories_Call) RunAndReturn(run func(context.Context, string, string, string, bool, bool) ([]string, error)) *Repos_GetDirectories_Call { +func (_c *Repos_GetDirectories_Call) RunAndReturn(run func(ctx context.Context, repoURL string, revision string, project string, noRevisionCache bool, verifyCommit bool) ([]string, error)) *Repos_GetDirectories_Call { _c.Call.Return(run) return _c } -// GetFiles provides a mock function with given fields: ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit -func (_m *Repos) GetFiles(ctx context.Context, repoURL string, revision string, project string, pattern string, noRevisionCache bool, verifyCommit bool) (map[string][]byte, error) { - ret := _m.Called(ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit) +// GetFiles provides a mock function for the type Repos +func (_mock *Repos) GetFiles(ctx context.Context, repoURL string, revision string, project string, pattern string, noRevisionCache bool, verifyCommit bool) (map[string][]byte, error) { + ret := _mock.Called(ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit) if len(ret) == 0 { panic("no return value specified for GetFiles") @@ -94,23 +108,21 @@ func (_m *Repos) GetFiles(ctx context.Context, repoURL string, revision string, var r0 map[string][]byte var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, bool, bool) (map[string][]byte, error)); ok { - return rf(ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, string, bool, bool) (map[string][]byte, error)); ok { + return returnFunc(ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, bool, bool) map[string][]byte); ok { - r0 = rf(ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, string, bool, bool) map[string][]byte); ok { + r0 = returnFunc(ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[string][]byte) } } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, bool, bool) error); ok { - r1 = rf(ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit) + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string, string, bool, bool) error); ok { + r1 = returnFunc(ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -120,13 +132,13 @@ type Repos_GetFiles_Call struct { } // GetFiles is a helper method to define mock.On call -// - ctx context.Context -// - repoURL string -// - revision string -// - project string -// - pattern string -// - noRevisionCache bool -// - verifyCommit bool +// - ctx +// - repoURL +// - revision +// - project +// - pattern +// - noRevisionCache +// - verifyCommit func (_e *Repos_Expecter) GetFiles(ctx interface{}, repoURL interface{}, revision interface{}, project interface{}, pattern interface{}, noRevisionCache interface{}, verifyCommit interface{}) *Repos_GetFiles_Call { return &Repos_GetFiles_Call{Call: _e.mock.On("GetFiles", ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit)} } @@ -138,26 +150,12 @@ func (_c *Repos_GetFiles_Call) Run(run func(ctx context.Context, repoURL string, return _c } -func (_c *Repos_GetFiles_Call) Return(_a0 map[string][]byte, _a1 error) *Repos_GetFiles_Call { - _c.Call.Return(_a0, _a1) +func (_c *Repos_GetFiles_Call) Return(stringToBytes map[string][]byte, err error) *Repos_GetFiles_Call { + _c.Call.Return(stringToBytes, err) return _c } -func (_c *Repos_GetFiles_Call) RunAndReturn(run func(context.Context, string, string, string, string, bool, bool) (map[string][]byte, error)) *Repos_GetFiles_Call { +func (_c *Repos_GetFiles_Call) RunAndReturn(run func(ctx context.Context, repoURL string, revision string, project string, pattern string, noRevisionCache bool, verifyCommit bool) (map[string][]byte, error)) *Repos_GetFiles_Call { _c.Call.Return(run) return _c } - -// NewRepos creates a new instance of Repos. 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 NewRepos(t interface { - mock.TestingT - Cleanup(func()) -}) *Repos { - mock := &Repos{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/applicationset/services/scm_provider/aws_codecommit/mocks/AWSCodeCommitClient.go b/applicationset/services/scm_provider/aws_codecommit/mocks/AWSCodeCommitClient.go index 2187cf926e2b1..a410802bc2984 100644 --- a/applicationset/services/scm_provider/aws_codecommit/mocks/AWSCodeCommitClient.go +++ b/applicationset/services/scm_provider/aws_codecommit/mocks/AWSCodeCommitClient.go @@ -1,15 +1,30 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - aws "github.com/aws/aws-sdk-go/aws" - codecommit "github.com/aws/aws-sdk-go/service/codecommit" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/service/codecommit" mock "github.com/stretchr/testify/mock" - - request "github.com/aws/aws-sdk-go/aws/request" ) +// NewAWSCodeCommitClient creates a new instance of AWSCodeCommitClient. 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 NewAWSCodeCommitClient(t interface { + mock.TestingT + Cleanup(func()) +}) *AWSCodeCommitClient { + mock := &AWSCodeCommitClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // AWSCodeCommitClient is an autogenerated mock type for the AWSCodeCommitClient type type AWSCodeCommitClient struct { mock.Mock @@ -23,16 +38,17 @@ func (_m *AWSCodeCommitClient) EXPECT() *AWSCodeCommitClient_Expecter { return &AWSCodeCommitClient_Expecter{mock: &_m.Mock} } -// GetFolderWithContext provides a mock function with given fields: _a0, _a1, _a2 -func (_m *AWSCodeCommitClient) GetFolderWithContext(_a0 aws.Context, _a1 *codecommit.GetFolderInput, _a2 ...request.Option) (*codecommit.GetFolderOutput, error) { - _va := make([]interface{}, len(_a2)) - for _i := range _a2 { - _va[_i] = _a2[_i] +// GetFolderWithContext provides a mock function for the type AWSCodeCommitClient +func (_mock *AWSCodeCommitClient) GetFolderWithContext(v aws.Context, getFolderInput *codecommit.GetFolderInput, options ...request.Option) (*codecommit.GetFolderOutput, error) { + // request.Option + _va := make([]interface{}, len(options)) + for _i := range options { + _va[_i] = options[_i] } var _ca []interface{} - _ca = append(_ca, _a0, _a1) + _ca = append(_ca, v, getFolderInput) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for GetFolderWithContext") @@ -40,23 +56,21 @@ func (_m *AWSCodeCommitClient) GetFolderWithContext(_a0 aws.Context, _a1 *codeco var r0 *codecommit.GetFolderOutput var r1 error - if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.GetFolderInput, ...request.Option) (*codecommit.GetFolderOutput, error)); ok { - return rf(_a0, _a1, _a2...) + if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.GetFolderInput, ...request.Option) (*codecommit.GetFolderOutput, error)); ok { + return returnFunc(v, getFolderInput, options...) } - if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.GetFolderInput, ...request.Option) *codecommit.GetFolderOutput); ok { - r0 = rf(_a0, _a1, _a2...) + if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.GetFolderInput, ...request.Option) *codecommit.GetFolderOutput); ok { + r0 = returnFunc(v, getFolderInput, options...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*codecommit.GetFolderOutput) } } - - if rf, ok := ret.Get(1).(func(aws.Context, *codecommit.GetFolderInput, ...request.Option) error); ok { - r1 = rf(_a0, _a1, _a2...) + if returnFunc, ok := ret.Get(1).(func(aws.Context, *codecommit.GetFolderInput, ...request.Option) error); ok { + r1 = returnFunc(v, getFolderInput, options...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -66,15 +80,15 @@ type AWSCodeCommitClient_GetFolderWithContext_Call struct { } // GetFolderWithContext is a helper method to define mock.On call -// - _a0 aws.Context -// - _a1 *codecommit.GetFolderInput -// - _a2 ...request.Option -func (_e *AWSCodeCommitClient_Expecter) GetFolderWithContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *AWSCodeCommitClient_GetFolderWithContext_Call { +// - v +// - getFolderInput +// - options +func (_e *AWSCodeCommitClient_Expecter) GetFolderWithContext(v interface{}, getFolderInput interface{}, options ...interface{}) *AWSCodeCommitClient_GetFolderWithContext_Call { return &AWSCodeCommitClient_GetFolderWithContext_Call{Call: _e.mock.On("GetFolderWithContext", - append([]interface{}{_a0, _a1}, _a2...)...)} + append([]interface{}{v, getFolderInput}, options...)...)} } -func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) Run(run func(_a0 aws.Context, _a1 *codecommit.GetFolderInput, _a2 ...request.Option)) *AWSCodeCommitClient_GetFolderWithContext_Call { +func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) Run(run func(v aws.Context, getFolderInput *codecommit.GetFolderInput, options ...request.Option)) *AWSCodeCommitClient_GetFolderWithContext_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]request.Option, len(args)-2) for i, a := range args[2:] { @@ -87,26 +101,27 @@ func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) Run(run func(_a0 aws.Co return _c } -func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) Return(_a0 *codecommit.GetFolderOutput, _a1 error) *AWSCodeCommitClient_GetFolderWithContext_Call { - _c.Call.Return(_a0, _a1) +func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) Return(getFolderOutput *codecommit.GetFolderOutput, err error) *AWSCodeCommitClient_GetFolderWithContext_Call { + _c.Call.Return(getFolderOutput, err) return _c } -func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) RunAndReturn(run func(aws.Context, *codecommit.GetFolderInput, ...request.Option) (*codecommit.GetFolderOutput, error)) *AWSCodeCommitClient_GetFolderWithContext_Call { +func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) RunAndReturn(run func(v aws.Context, getFolderInput *codecommit.GetFolderInput, options ...request.Option) (*codecommit.GetFolderOutput, error)) *AWSCodeCommitClient_GetFolderWithContext_Call { _c.Call.Return(run) return _c } -// GetRepositoryWithContext provides a mock function with given fields: _a0, _a1, _a2 -func (_m *AWSCodeCommitClient) GetRepositoryWithContext(_a0 aws.Context, _a1 *codecommit.GetRepositoryInput, _a2 ...request.Option) (*codecommit.GetRepositoryOutput, error) { - _va := make([]interface{}, len(_a2)) - for _i := range _a2 { - _va[_i] = _a2[_i] +// GetRepositoryWithContext provides a mock function for the type AWSCodeCommitClient +func (_mock *AWSCodeCommitClient) GetRepositoryWithContext(v aws.Context, getRepositoryInput *codecommit.GetRepositoryInput, options ...request.Option) (*codecommit.GetRepositoryOutput, error) { + // request.Option + _va := make([]interface{}, len(options)) + for _i := range options { + _va[_i] = options[_i] } var _ca []interface{} - _ca = append(_ca, _a0, _a1) + _ca = append(_ca, v, getRepositoryInput) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for GetRepositoryWithContext") @@ -114,23 +129,21 @@ func (_m *AWSCodeCommitClient) GetRepositoryWithContext(_a0 aws.Context, _a1 *co var r0 *codecommit.GetRepositoryOutput var r1 error - if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) (*codecommit.GetRepositoryOutput, error)); ok { - return rf(_a0, _a1, _a2...) + if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) (*codecommit.GetRepositoryOutput, error)); ok { + return returnFunc(v, getRepositoryInput, options...) } - if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) *codecommit.GetRepositoryOutput); ok { - r0 = rf(_a0, _a1, _a2...) + if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) *codecommit.GetRepositoryOutput); ok { + r0 = returnFunc(v, getRepositoryInput, options...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*codecommit.GetRepositoryOutput) } } - - if rf, ok := ret.Get(1).(func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) error); ok { - r1 = rf(_a0, _a1, _a2...) + if returnFunc, ok := ret.Get(1).(func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) error); ok { + r1 = returnFunc(v, getRepositoryInput, options...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -140,15 +153,15 @@ type AWSCodeCommitClient_GetRepositoryWithContext_Call struct { } // GetRepositoryWithContext is a helper method to define mock.On call -// - _a0 aws.Context -// - _a1 *codecommit.GetRepositoryInput -// - _a2 ...request.Option -func (_e *AWSCodeCommitClient_Expecter) GetRepositoryWithContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *AWSCodeCommitClient_GetRepositoryWithContext_Call { +// - v +// - getRepositoryInput +// - options +func (_e *AWSCodeCommitClient_Expecter) GetRepositoryWithContext(v interface{}, getRepositoryInput interface{}, options ...interface{}) *AWSCodeCommitClient_GetRepositoryWithContext_Call { return &AWSCodeCommitClient_GetRepositoryWithContext_Call{Call: _e.mock.On("GetRepositoryWithContext", - append([]interface{}{_a0, _a1}, _a2...)...)} + append([]interface{}{v, getRepositoryInput}, options...)...)} } -func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) Run(run func(_a0 aws.Context, _a1 *codecommit.GetRepositoryInput, _a2 ...request.Option)) *AWSCodeCommitClient_GetRepositoryWithContext_Call { +func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) Run(run func(v aws.Context, getRepositoryInput *codecommit.GetRepositoryInput, options ...request.Option)) *AWSCodeCommitClient_GetRepositoryWithContext_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]request.Option, len(args)-2) for i, a := range args[2:] { @@ -161,26 +174,27 @@ func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) Run(run func(_a0 aw return _c } -func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) Return(_a0 *codecommit.GetRepositoryOutput, _a1 error) *AWSCodeCommitClient_GetRepositoryWithContext_Call { - _c.Call.Return(_a0, _a1) +func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) Return(getRepositoryOutput *codecommit.GetRepositoryOutput, err error) *AWSCodeCommitClient_GetRepositoryWithContext_Call { + _c.Call.Return(getRepositoryOutput, err) return _c } -func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) RunAndReturn(run func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) (*codecommit.GetRepositoryOutput, error)) *AWSCodeCommitClient_GetRepositoryWithContext_Call { +func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) RunAndReturn(run func(v aws.Context, getRepositoryInput *codecommit.GetRepositoryInput, options ...request.Option) (*codecommit.GetRepositoryOutput, error)) *AWSCodeCommitClient_GetRepositoryWithContext_Call { _c.Call.Return(run) return _c } -// ListBranchesWithContext provides a mock function with given fields: _a0, _a1, _a2 -func (_m *AWSCodeCommitClient) ListBranchesWithContext(_a0 aws.Context, _a1 *codecommit.ListBranchesInput, _a2 ...request.Option) (*codecommit.ListBranchesOutput, error) { - _va := make([]interface{}, len(_a2)) - for _i := range _a2 { - _va[_i] = _a2[_i] +// ListBranchesWithContext provides a mock function for the type AWSCodeCommitClient +func (_mock *AWSCodeCommitClient) ListBranchesWithContext(v aws.Context, listBranchesInput *codecommit.ListBranchesInput, options ...request.Option) (*codecommit.ListBranchesOutput, error) { + // request.Option + _va := make([]interface{}, len(options)) + for _i := range options { + _va[_i] = options[_i] } var _ca []interface{} - _ca = append(_ca, _a0, _a1) + _ca = append(_ca, v, listBranchesInput) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for ListBranchesWithContext") @@ -188,23 +202,21 @@ func (_m *AWSCodeCommitClient) ListBranchesWithContext(_a0 aws.Context, _a1 *cod var r0 *codecommit.ListBranchesOutput var r1 error - if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) (*codecommit.ListBranchesOutput, error)); ok { - return rf(_a0, _a1, _a2...) + if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) (*codecommit.ListBranchesOutput, error)); ok { + return returnFunc(v, listBranchesInput, options...) } - if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) *codecommit.ListBranchesOutput); ok { - r0 = rf(_a0, _a1, _a2...) + if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) *codecommit.ListBranchesOutput); ok { + r0 = returnFunc(v, listBranchesInput, options...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*codecommit.ListBranchesOutput) } } - - if rf, ok := ret.Get(1).(func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) error); ok { - r1 = rf(_a0, _a1, _a2...) + if returnFunc, ok := ret.Get(1).(func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) error); ok { + r1 = returnFunc(v, listBranchesInput, options...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -214,15 +226,15 @@ type AWSCodeCommitClient_ListBranchesWithContext_Call struct { } // ListBranchesWithContext is a helper method to define mock.On call -// - _a0 aws.Context -// - _a1 *codecommit.ListBranchesInput -// - _a2 ...request.Option -func (_e *AWSCodeCommitClient_Expecter) ListBranchesWithContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *AWSCodeCommitClient_ListBranchesWithContext_Call { +// - v +// - listBranchesInput +// - options +func (_e *AWSCodeCommitClient_Expecter) ListBranchesWithContext(v interface{}, listBranchesInput interface{}, options ...interface{}) *AWSCodeCommitClient_ListBranchesWithContext_Call { return &AWSCodeCommitClient_ListBranchesWithContext_Call{Call: _e.mock.On("ListBranchesWithContext", - append([]interface{}{_a0, _a1}, _a2...)...)} + append([]interface{}{v, listBranchesInput}, options...)...)} } -func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) Run(run func(_a0 aws.Context, _a1 *codecommit.ListBranchesInput, _a2 ...request.Option)) *AWSCodeCommitClient_ListBranchesWithContext_Call { +func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) Run(run func(v aws.Context, listBranchesInput *codecommit.ListBranchesInput, options ...request.Option)) *AWSCodeCommitClient_ListBranchesWithContext_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]request.Option, len(args)-2) for i, a := range args[2:] { @@ -235,26 +247,27 @@ func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) Run(run func(_a0 aws return _c } -func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) Return(_a0 *codecommit.ListBranchesOutput, _a1 error) *AWSCodeCommitClient_ListBranchesWithContext_Call { - _c.Call.Return(_a0, _a1) +func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) Return(listBranchesOutput *codecommit.ListBranchesOutput, err error) *AWSCodeCommitClient_ListBranchesWithContext_Call { + _c.Call.Return(listBranchesOutput, err) return _c } -func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) RunAndReturn(run func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) (*codecommit.ListBranchesOutput, error)) *AWSCodeCommitClient_ListBranchesWithContext_Call { +func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) RunAndReturn(run func(v aws.Context, listBranchesInput *codecommit.ListBranchesInput, options ...request.Option) (*codecommit.ListBranchesOutput, error)) *AWSCodeCommitClient_ListBranchesWithContext_Call { _c.Call.Return(run) return _c } -// ListRepositoriesWithContext provides a mock function with given fields: _a0, _a1, _a2 -func (_m *AWSCodeCommitClient) ListRepositoriesWithContext(_a0 aws.Context, _a1 *codecommit.ListRepositoriesInput, _a2 ...request.Option) (*codecommit.ListRepositoriesOutput, error) { - _va := make([]interface{}, len(_a2)) - for _i := range _a2 { - _va[_i] = _a2[_i] +// ListRepositoriesWithContext provides a mock function for the type AWSCodeCommitClient +func (_mock *AWSCodeCommitClient) ListRepositoriesWithContext(v aws.Context, listRepositoriesInput *codecommit.ListRepositoriesInput, options ...request.Option) (*codecommit.ListRepositoriesOutput, error) { + // request.Option + _va := make([]interface{}, len(options)) + for _i := range options { + _va[_i] = options[_i] } var _ca []interface{} - _ca = append(_ca, _a0, _a1) + _ca = append(_ca, v, listRepositoriesInput) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for ListRepositoriesWithContext") @@ -262,23 +275,21 @@ func (_m *AWSCodeCommitClient) ListRepositoriesWithContext(_a0 aws.Context, _a1 var r0 *codecommit.ListRepositoriesOutput var r1 error - if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) (*codecommit.ListRepositoriesOutput, error)); ok { - return rf(_a0, _a1, _a2...) + if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) (*codecommit.ListRepositoriesOutput, error)); ok { + return returnFunc(v, listRepositoriesInput, options...) } - if rf, ok := ret.Get(0).(func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) *codecommit.ListRepositoriesOutput); ok { - r0 = rf(_a0, _a1, _a2...) + if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) *codecommit.ListRepositoriesOutput); ok { + r0 = returnFunc(v, listRepositoriesInput, options...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*codecommit.ListRepositoriesOutput) } } - - if rf, ok := ret.Get(1).(func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) error); ok { - r1 = rf(_a0, _a1, _a2...) + if returnFunc, ok := ret.Get(1).(func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) error); ok { + r1 = returnFunc(v, listRepositoriesInput, options...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -288,15 +299,15 @@ type AWSCodeCommitClient_ListRepositoriesWithContext_Call struct { } // ListRepositoriesWithContext is a helper method to define mock.On call -// - _a0 aws.Context -// - _a1 *codecommit.ListRepositoriesInput -// - _a2 ...request.Option -func (_e *AWSCodeCommitClient_Expecter) ListRepositoriesWithContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { +// - v +// - listRepositoriesInput +// - options +func (_e *AWSCodeCommitClient_Expecter) ListRepositoriesWithContext(v interface{}, listRepositoriesInput interface{}, options ...interface{}) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { return &AWSCodeCommitClient_ListRepositoriesWithContext_Call{Call: _e.mock.On("ListRepositoriesWithContext", - append([]interface{}{_a0, _a1}, _a2...)...)} + append([]interface{}{v, listRepositoriesInput}, options...)...)} } -func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) Run(run func(_a0 aws.Context, _a1 *codecommit.ListRepositoriesInput, _a2 ...request.Option)) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { +func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) Run(run func(v aws.Context, listRepositoriesInput *codecommit.ListRepositoriesInput, options ...request.Option)) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]request.Option, len(args)-2) for i, a := range args[2:] { @@ -309,26 +320,12 @@ func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) Run(run func(_a0 return _c } -func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) Return(_a0 *codecommit.ListRepositoriesOutput, _a1 error) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { - _c.Call.Return(_a0, _a1) +func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) Return(listRepositoriesOutput *codecommit.ListRepositoriesOutput, err error) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { + _c.Call.Return(listRepositoriesOutput, err) return _c } -func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) RunAndReturn(run func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) (*codecommit.ListRepositoriesOutput, error)) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { +func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) RunAndReturn(run func(v aws.Context, listRepositoriesInput *codecommit.ListRepositoriesInput, options ...request.Option) (*codecommit.ListRepositoriesOutput, error)) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { _c.Call.Return(run) return _c } - -// NewAWSCodeCommitClient creates a new instance of AWSCodeCommitClient. 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 NewAWSCodeCommitClient(t interface { - mock.TestingT - Cleanup(func()) -}) *AWSCodeCommitClient { - mock := &AWSCodeCommitClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/applicationset/services/scm_provider/aws_codecommit/mocks/AWSTaggingClient.go b/applicationset/services/scm_provider/aws_codecommit/mocks/AWSTaggingClient.go index 62318552bde08..5e9cbc714f9d9 100644 --- a/applicationset/services/scm_provider/aws_codecommit/mocks/AWSTaggingClient.go +++ b/applicationset/services/scm_provider/aws_codecommit/mocks/AWSTaggingClient.go @@ -1,15 +1,29 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - aws "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi" mock "github.com/stretchr/testify/mock" +) - request "github.com/aws/aws-sdk-go/aws/request" +// NewAWSTaggingClient creates a new instance of AWSTaggingClient. 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 NewAWSTaggingClient(t interface { + mock.TestingT + Cleanup(func()) +}) *AWSTaggingClient { + mock := &AWSTaggingClient{} + mock.Mock.Test(t) - resourcegroupstaggingapi "github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi" -) + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} // AWSTaggingClient is an autogenerated mock type for the AWSTaggingClient type type AWSTaggingClient struct { @@ -24,16 +38,17 @@ func (_m *AWSTaggingClient) EXPECT() *AWSTaggingClient_Expecter { return &AWSTaggingClient_Expecter{mock: &_m.Mock} } -// GetResourcesWithContext provides a mock function with given fields: _a0, _a1, _a2 -func (_m *AWSTaggingClient) GetResourcesWithContext(_a0 aws.Context, _a1 *resourcegroupstaggingapi.GetResourcesInput, _a2 ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error) { - _va := make([]interface{}, len(_a2)) - for _i := range _a2 { - _va[_i] = _a2[_i] +// GetResourcesWithContext provides a mock function for the type AWSTaggingClient +func (_mock *AWSTaggingClient) GetResourcesWithContext(v aws.Context, getResourcesInput *resourcegroupstaggingapi.GetResourcesInput, options ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error) { + // request.Option + _va := make([]interface{}, len(options)) + for _i := range options { + _va[_i] = options[_i] } var _ca []interface{} - _ca = append(_ca, _a0, _a1) + _ca = append(_ca, v, getResourcesInput) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for GetResourcesWithContext") @@ -41,23 +56,21 @@ func (_m *AWSTaggingClient) GetResourcesWithContext(_a0 aws.Context, _a1 *resour var r0 *resourcegroupstaggingapi.GetResourcesOutput var r1 error - if rf, ok := ret.Get(0).(func(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error)); ok { - return rf(_a0, _a1, _a2...) + if returnFunc, ok := ret.Get(0).(func(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error)); ok { + return returnFunc(v, getResourcesInput, options...) } - if rf, ok := ret.Get(0).(func(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) *resourcegroupstaggingapi.GetResourcesOutput); ok { - r0 = rf(_a0, _a1, _a2...) + if returnFunc, ok := ret.Get(0).(func(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) *resourcegroupstaggingapi.GetResourcesOutput); ok { + r0 = returnFunc(v, getResourcesInput, options...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*resourcegroupstaggingapi.GetResourcesOutput) } } - - if rf, ok := ret.Get(1).(func(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) error); ok { - r1 = rf(_a0, _a1, _a2...) + if returnFunc, ok := ret.Get(1).(func(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) error); ok { + r1 = returnFunc(v, getResourcesInput, options...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -67,15 +80,15 @@ type AWSTaggingClient_GetResourcesWithContext_Call struct { } // GetResourcesWithContext is a helper method to define mock.On call -// - _a0 aws.Context -// - _a1 *resourcegroupstaggingapi.GetResourcesInput -// - _a2 ...request.Option -func (_e *AWSTaggingClient_Expecter) GetResourcesWithContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *AWSTaggingClient_GetResourcesWithContext_Call { +// - v +// - getResourcesInput +// - options +func (_e *AWSTaggingClient_Expecter) GetResourcesWithContext(v interface{}, getResourcesInput interface{}, options ...interface{}) *AWSTaggingClient_GetResourcesWithContext_Call { return &AWSTaggingClient_GetResourcesWithContext_Call{Call: _e.mock.On("GetResourcesWithContext", - append([]interface{}{_a0, _a1}, _a2...)...)} + append([]interface{}{v, getResourcesInput}, options...)...)} } -func (_c *AWSTaggingClient_GetResourcesWithContext_Call) Run(run func(_a0 aws.Context, _a1 *resourcegroupstaggingapi.GetResourcesInput, _a2 ...request.Option)) *AWSTaggingClient_GetResourcesWithContext_Call { +func (_c *AWSTaggingClient_GetResourcesWithContext_Call) Run(run func(v aws.Context, getResourcesInput *resourcegroupstaggingapi.GetResourcesInput, options ...request.Option)) *AWSTaggingClient_GetResourcesWithContext_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]request.Option, len(args)-2) for i, a := range args[2:] { @@ -88,26 +101,12 @@ func (_c *AWSTaggingClient_GetResourcesWithContext_Call) Run(run func(_a0 aws.Co return _c } -func (_c *AWSTaggingClient_GetResourcesWithContext_Call) Return(_a0 *resourcegroupstaggingapi.GetResourcesOutput, _a1 error) *AWSTaggingClient_GetResourcesWithContext_Call { - _c.Call.Return(_a0, _a1) +func (_c *AWSTaggingClient_GetResourcesWithContext_Call) Return(getResourcesOutput *resourcegroupstaggingapi.GetResourcesOutput, err error) *AWSTaggingClient_GetResourcesWithContext_Call { + _c.Call.Return(getResourcesOutput, err) return _c } -func (_c *AWSTaggingClient_GetResourcesWithContext_Call) RunAndReturn(run func(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error)) *AWSTaggingClient_GetResourcesWithContext_Call { +func (_c *AWSTaggingClient_GetResourcesWithContext_Call) RunAndReturn(run func(v aws.Context, getResourcesInput *resourcegroupstaggingapi.GetResourcesInput, options ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error)) *AWSTaggingClient_GetResourcesWithContext_Call { _c.Call.Return(run) return _c } - -// NewAWSTaggingClient creates a new instance of AWSTaggingClient. 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 NewAWSTaggingClient(t interface { - mock.TestingT - Cleanup(func()) -}) *AWSTaggingClient { - mock := &AWSTaggingClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/applicationset/services/scm_provider/azure_devops/git/mocks/Client.go b/applicationset/services/scm_provider/azure_devops/git/mocks/Client.go index b1df4142bcf56..9bec031656563 100644 --- a/applicationset/services/scm_provider/azure_devops/git/mocks/Client.go +++ b/applicationset/services/scm_provider/azure_devops/git/mocks/Client.go @@ -1,19 +1,32 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - context "context" + "context" + "io" - core "github.com/microsoft/azure-devops-go-api/azuredevops/v7/core" - git "github.com/microsoft/azure-devops-go-api/azuredevops/v7/git" + "github.com/microsoft/azure-devops-go-api/azuredevops/v7/core" + "github.com/microsoft/azure-devops-go-api/azuredevops/v7/git" + "github.com/microsoft/azure-devops-go-api/azuredevops/v7/webapi" + mock "github.com/stretchr/testify/mock" +) - io "io" +// NewClient creates a new instance of Client. 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 NewClient(t interface { + mock.TestingT + Cleanup(func()) +}) *Client { + mock := &Client{} + mock.Mock.Test(t) - mock "github.com/stretchr/testify/mock" + t.Cleanup(func() { mock.AssertExpectations(t) }) - webapi "github.com/microsoft/azure-devops-go-api/azuredevops/v7/webapi" -) + return mock +} // Client is an autogenerated mock type for the Client type type Client struct { @@ -28,9 +41,9 @@ func (_m *Client) EXPECT() *Client_Expecter { return &Client_Expecter{mock: &_m.Mock} } -// CreateAnnotatedTag provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreateAnnotatedTag(_a0 context.Context, _a1 git.CreateAnnotatedTagArgs) (*git.GitAnnotatedTag, error) { - ret := _m.Called(_a0, _a1) +// CreateAnnotatedTag provides a mock function for the type Client +func (_mock *Client) CreateAnnotatedTag(context1 context.Context, createAnnotatedTagArgs git.CreateAnnotatedTagArgs) (*git.GitAnnotatedTag, error) { + ret := _mock.Called(context1, createAnnotatedTagArgs) if len(ret) == 0 { panic("no return value specified for CreateAnnotatedTag") @@ -38,23 +51,21 @@ func (_m *Client) CreateAnnotatedTag(_a0 context.Context, _a1 git.CreateAnnotate var r0 *git.GitAnnotatedTag var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreateAnnotatedTagArgs) (*git.GitAnnotatedTag, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateAnnotatedTagArgs) (*git.GitAnnotatedTag, error)); ok { + return returnFunc(context1, createAnnotatedTagArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreateAnnotatedTagArgs) *git.GitAnnotatedTag); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateAnnotatedTagArgs) *git.GitAnnotatedTag); ok { + r0 = returnFunc(context1, createAnnotatedTagArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitAnnotatedTag) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreateAnnotatedTagArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreateAnnotatedTagArgs) error); ok { + r1 = returnFunc(context1, createAnnotatedTagArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -64,32 +75,32 @@ type Client_CreateAnnotatedTag_Call struct { } // CreateAnnotatedTag is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreateAnnotatedTagArgs -func (_e *Client_Expecter) CreateAnnotatedTag(_a0 interface{}, _a1 interface{}) *Client_CreateAnnotatedTag_Call { - return &Client_CreateAnnotatedTag_Call{Call: _e.mock.On("CreateAnnotatedTag", _a0, _a1)} +// - context1 +// - createAnnotatedTagArgs +func (_e *Client_Expecter) CreateAnnotatedTag(context1 interface{}, createAnnotatedTagArgs interface{}) *Client_CreateAnnotatedTag_Call { + return &Client_CreateAnnotatedTag_Call{Call: _e.mock.On("CreateAnnotatedTag", context1, createAnnotatedTagArgs)} } -func (_c *Client_CreateAnnotatedTag_Call) Run(run func(_a0 context.Context, _a1 git.CreateAnnotatedTagArgs)) *Client_CreateAnnotatedTag_Call { +func (_c *Client_CreateAnnotatedTag_Call) Run(run func(context1 context.Context, createAnnotatedTagArgs git.CreateAnnotatedTagArgs)) *Client_CreateAnnotatedTag_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreateAnnotatedTagArgs)) }) return _c } -func (_c *Client_CreateAnnotatedTag_Call) Return(_a0 *git.GitAnnotatedTag, _a1 error) *Client_CreateAnnotatedTag_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreateAnnotatedTag_Call) Return(gitAnnotatedTag *git.GitAnnotatedTag, err error) *Client_CreateAnnotatedTag_Call { + _c.Call.Return(gitAnnotatedTag, err) return _c } -func (_c *Client_CreateAnnotatedTag_Call) RunAndReturn(run func(context.Context, git.CreateAnnotatedTagArgs) (*git.GitAnnotatedTag, error)) *Client_CreateAnnotatedTag_Call { +func (_c *Client_CreateAnnotatedTag_Call) RunAndReturn(run func(context1 context.Context, createAnnotatedTagArgs git.CreateAnnotatedTagArgs) (*git.GitAnnotatedTag, error)) *Client_CreateAnnotatedTag_Call { _c.Call.Return(run) return _c } -// CreateAttachment provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreateAttachment(_a0 context.Context, _a1 git.CreateAttachmentArgs) (*git.Attachment, error) { - ret := _m.Called(_a0, _a1) +// CreateAttachment provides a mock function for the type Client +func (_mock *Client) CreateAttachment(context1 context.Context, createAttachmentArgs git.CreateAttachmentArgs) (*git.Attachment, error) { + ret := _mock.Called(context1, createAttachmentArgs) if len(ret) == 0 { panic("no return value specified for CreateAttachment") @@ -97,23 +108,21 @@ func (_m *Client) CreateAttachment(_a0 context.Context, _a1 git.CreateAttachment var r0 *git.Attachment var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreateAttachmentArgs) (*git.Attachment, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateAttachmentArgs) (*git.Attachment, error)); ok { + return returnFunc(context1, createAttachmentArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreateAttachmentArgs) *git.Attachment); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateAttachmentArgs) *git.Attachment); ok { + r0 = returnFunc(context1, createAttachmentArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.Attachment) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreateAttachmentArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreateAttachmentArgs) error); ok { + r1 = returnFunc(context1, createAttachmentArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -123,32 +132,32 @@ type Client_CreateAttachment_Call struct { } // CreateAttachment is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreateAttachmentArgs -func (_e *Client_Expecter) CreateAttachment(_a0 interface{}, _a1 interface{}) *Client_CreateAttachment_Call { - return &Client_CreateAttachment_Call{Call: _e.mock.On("CreateAttachment", _a0, _a1)} +// - context1 +// - createAttachmentArgs +func (_e *Client_Expecter) CreateAttachment(context1 interface{}, createAttachmentArgs interface{}) *Client_CreateAttachment_Call { + return &Client_CreateAttachment_Call{Call: _e.mock.On("CreateAttachment", context1, createAttachmentArgs)} } -func (_c *Client_CreateAttachment_Call) Run(run func(_a0 context.Context, _a1 git.CreateAttachmentArgs)) *Client_CreateAttachment_Call { +func (_c *Client_CreateAttachment_Call) Run(run func(context1 context.Context, createAttachmentArgs git.CreateAttachmentArgs)) *Client_CreateAttachment_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreateAttachmentArgs)) }) return _c } -func (_c *Client_CreateAttachment_Call) Return(_a0 *git.Attachment, _a1 error) *Client_CreateAttachment_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreateAttachment_Call) Return(attachment *git.Attachment, err error) *Client_CreateAttachment_Call { + _c.Call.Return(attachment, err) return _c } -func (_c *Client_CreateAttachment_Call) RunAndReturn(run func(context.Context, git.CreateAttachmentArgs) (*git.Attachment, error)) *Client_CreateAttachment_Call { +func (_c *Client_CreateAttachment_Call) RunAndReturn(run func(context1 context.Context, createAttachmentArgs git.CreateAttachmentArgs) (*git.Attachment, error)) *Client_CreateAttachment_Call { _c.Call.Return(run) return _c } -// CreateCherryPick provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreateCherryPick(_a0 context.Context, _a1 git.CreateCherryPickArgs) (*git.GitCherryPick, error) { - ret := _m.Called(_a0, _a1) +// CreateCherryPick provides a mock function for the type Client +func (_mock *Client) CreateCherryPick(context1 context.Context, createCherryPickArgs git.CreateCherryPickArgs) (*git.GitCherryPick, error) { + ret := _mock.Called(context1, createCherryPickArgs) if len(ret) == 0 { panic("no return value specified for CreateCherryPick") @@ -156,23 +165,21 @@ func (_m *Client) CreateCherryPick(_a0 context.Context, _a1 git.CreateCherryPick var r0 *git.GitCherryPick var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreateCherryPickArgs) (*git.GitCherryPick, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateCherryPickArgs) (*git.GitCherryPick, error)); ok { + return returnFunc(context1, createCherryPickArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreateCherryPickArgs) *git.GitCherryPick); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateCherryPickArgs) *git.GitCherryPick); ok { + r0 = returnFunc(context1, createCherryPickArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitCherryPick) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreateCherryPickArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreateCherryPickArgs) error); ok { + r1 = returnFunc(context1, createCherryPickArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -182,32 +189,32 @@ type Client_CreateCherryPick_Call struct { } // CreateCherryPick is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreateCherryPickArgs -func (_e *Client_Expecter) CreateCherryPick(_a0 interface{}, _a1 interface{}) *Client_CreateCherryPick_Call { - return &Client_CreateCherryPick_Call{Call: _e.mock.On("CreateCherryPick", _a0, _a1)} +// - context1 +// - createCherryPickArgs +func (_e *Client_Expecter) CreateCherryPick(context1 interface{}, createCherryPickArgs interface{}) *Client_CreateCherryPick_Call { + return &Client_CreateCherryPick_Call{Call: _e.mock.On("CreateCherryPick", context1, createCherryPickArgs)} } -func (_c *Client_CreateCherryPick_Call) Run(run func(_a0 context.Context, _a1 git.CreateCherryPickArgs)) *Client_CreateCherryPick_Call { +func (_c *Client_CreateCherryPick_Call) Run(run func(context1 context.Context, createCherryPickArgs git.CreateCherryPickArgs)) *Client_CreateCherryPick_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreateCherryPickArgs)) }) return _c } -func (_c *Client_CreateCherryPick_Call) Return(_a0 *git.GitCherryPick, _a1 error) *Client_CreateCherryPick_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreateCherryPick_Call) Return(gitCherryPick *git.GitCherryPick, err error) *Client_CreateCherryPick_Call { + _c.Call.Return(gitCherryPick, err) return _c } -func (_c *Client_CreateCherryPick_Call) RunAndReturn(run func(context.Context, git.CreateCherryPickArgs) (*git.GitCherryPick, error)) *Client_CreateCherryPick_Call { +func (_c *Client_CreateCherryPick_Call) RunAndReturn(run func(context1 context.Context, createCherryPickArgs git.CreateCherryPickArgs) (*git.GitCherryPick, error)) *Client_CreateCherryPick_Call { _c.Call.Return(run) return _c } -// CreateComment provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreateComment(_a0 context.Context, _a1 git.CreateCommentArgs) (*git.Comment, error) { - ret := _m.Called(_a0, _a1) +// CreateComment provides a mock function for the type Client +func (_mock *Client) CreateComment(context1 context.Context, createCommentArgs git.CreateCommentArgs) (*git.Comment, error) { + ret := _mock.Called(context1, createCommentArgs) if len(ret) == 0 { panic("no return value specified for CreateComment") @@ -215,23 +222,21 @@ func (_m *Client) CreateComment(_a0 context.Context, _a1 git.CreateCommentArgs) var r0 *git.Comment var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreateCommentArgs) (*git.Comment, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateCommentArgs) (*git.Comment, error)); ok { + return returnFunc(context1, createCommentArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreateCommentArgs) *git.Comment); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateCommentArgs) *git.Comment); ok { + r0 = returnFunc(context1, createCommentArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.Comment) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreateCommentArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreateCommentArgs) error); ok { + r1 = returnFunc(context1, createCommentArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -241,32 +246,32 @@ type Client_CreateComment_Call struct { } // CreateComment is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreateCommentArgs -func (_e *Client_Expecter) CreateComment(_a0 interface{}, _a1 interface{}) *Client_CreateComment_Call { - return &Client_CreateComment_Call{Call: _e.mock.On("CreateComment", _a0, _a1)} +// - context1 +// - createCommentArgs +func (_e *Client_Expecter) CreateComment(context1 interface{}, createCommentArgs interface{}) *Client_CreateComment_Call { + return &Client_CreateComment_Call{Call: _e.mock.On("CreateComment", context1, createCommentArgs)} } -func (_c *Client_CreateComment_Call) Run(run func(_a0 context.Context, _a1 git.CreateCommentArgs)) *Client_CreateComment_Call { +func (_c *Client_CreateComment_Call) Run(run func(context1 context.Context, createCommentArgs git.CreateCommentArgs)) *Client_CreateComment_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreateCommentArgs)) }) return _c } -func (_c *Client_CreateComment_Call) Return(_a0 *git.Comment, _a1 error) *Client_CreateComment_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreateComment_Call) Return(comment *git.Comment, err error) *Client_CreateComment_Call { + _c.Call.Return(comment, err) return _c } -func (_c *Client_CreateComment_Call) RunAndReturn(run func(context.Context, git.CreateCommentArgs) (*git.Comment, error)) *Client_CreateComment_Call { +func (_c *Client_CreateComment_Call) RunAndReturn(run func(context1 context.Context, createCommentArgs git.CreateCommentArgs) (*git.Comment, error)) *Client_CreateComment_Call { _c.Call.Return(run) return _c } -// CreateCommitStatus provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreateCommitStatus(_a0 context.Context, _a1 git.CreateCommitStatusArgs) (*git.GitStatus, error) { - ret := _m.Called(_a0, _a1) +// CreateCommitStatus provides a mock function for the type Client +func (_mock *Client) CreateCommitStatus(context1 context.Context, createCommitStatusArgs git.CreateCommitStatusArgs) (*git.GitStatus, error) { + ret := _mock.Called(context1, createCommitStatusArgs) if len(ret) == 0 { panic("no return value specified for CreateCommitStatus") @@ -274,23 +279,21 @@ func (_m *Client) CreateCommitStatus(_a0 context.Context, _a1 git.CreateCommitSt var r0 *git.GitStatus var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreateCommitStatusArgs) (*git.GitStatus, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateCommitStatusArgs) (*git.GitStatus, error)); ok { + return returnFunc(context1, createCommitStatusArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreateCommitStatusArgs) *git.GitStatus); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateCommitStatusArgs) *git.GitStatus); ok { + r0 = returnFunc(context1, createCommitStatusArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitStatus) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreateCommitStatusArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreateCommitStatusArgs) error); ok { + r1 = returnFunc(context1, createCommitStatusArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -300,32 +303,32 @@ type Client_CreateCommitStatus_Call struct { } // CreateCommitStatus is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreateCommitStatusArgs -func (_e *Client_Expecter) CreateCommitStatus(_a0 interface{}, _a1 interface{}) *Client_CreateCommitStatus_Call { - return &Client_CreateCommitStatus_Call{Call: _e.mock.On("CreateCommitStatus", _a0, _a1)} +// - context1 +// - createCommitStatusArgs +func (_e *Client_Expecter) CreateCommitStatus(context1 interface{}, createCommitStatusArgs interface{}) *Client_CreateCommitStatus_Call { + return &Client_CreateCommitStatus_Call{Call: _e.mock.On("CreateCommitStatus", context1, createCommitStatusArgs)} } -func (_c *Client_CreateCommitStatus_Call) Run(run func(_a0 context.Context, _a1 git.CreateCommitStatusArgs)) *Client_CreateCommitStatus_Call { +func (_c *Client_CreateCommitStatus_Call) Run(run func(context1 context.Context, createCommitStatusArgs git.CreateCommitStatusArgs)) *Client_CreateCommitStatus_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreateCommitStatusArgs)) }) return _c } -func (_c *Client_CreateCommitStatus_Call) Return(_a0 *git.GitStatus, _a1 error) *Client_CreateCommitStatus_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreateCommitStatus_Call) Return(gitStatus *git.GitStatus, err error) *Client_CreateCommitStatus_Call { + _c.Call.Return(gitStatus, err) return _c } -func (_c *Client_CreateCommitStatus_Call) RunAndReturn(run func(context.Context, git.CreateCommitStatusArgs) (*git.GitStatus, error)) *Client_CreateCommitStatus_Call { +func (_c *Client_CreateCommitStatus_Call) RunAndReturn(run func(context1 context.Context, createCommitStatusArgs git.CreateCommitStatusArgs) (*git.GitStatus, error)) *Client_CreateCommitStatus_Call { _c.Call.Return(run) return _c } -// CreateFavorite provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreateFavorite(_a0 context.Context, _a1 git.CreateFavoriteArgs) (*git.GitRefFavorite, error) { - ret := _m.Called(_a0, _a1) +// CreateFavorite provides a mock function for the type Client +func (_mock *Client) CreateFavorite(context1 context.Context, createFavoriteArgs git.CreateFavoriteArgs) (*git.GitRefFavorite, error) { + ret := _mock.Called(context1, createFavoriteArgs) if len(ret) == 0 { panic("no return value specified for CreateFavorite") @@ -333,23 +336,21 @@ func (_m *Client) CreateFavorite(_a0 context.Context, _a1 git.CreateFavoriteArgs var r0 *git.GitRefFavorite var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreateFavoriteArgs) (*git.GitRefFavorite, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateFavoriteArgs) (*git.GitRefFavorite, error)); ok { + return returnFunc(context1, createFavoriteArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreateFavoriteArgs) *git.GitRefFavorite); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateFavoriteArgs) *git.GitRefFavorite); ok { + r0 = returnFunc(context1, createFavoriteArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitRefFavorite) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreateFavoriteArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreateFavoriteArgs) error); ok { + r1 = returnFunc(context1, createFavoriteArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -359,32 +360,32 @@ type Client_CreateFavorite_Call struct { } // CreateFavorite is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreateFavoriteArgs -func (_e *Client_Expecter) CreateFavorite(_a0 interface{}, _a1 interface{}) *Client_CreateFavorite_Call { - return &Client_CreateFavorite_Call{Call: _e.mock.On("CreateFavorite", _a0, _a1)} +// - context1 +// - createFavoriteArgs +func (_e *Client_Expecter) CreateFavorite(context1 interface{}, createFavoriteArgs interface{}) *Client_CreateFavorite_Call { + return &Client_CreateFavorite_Call{Call: _e.mock.On("CreateFavorite", context1, createFavoriteArgs)} } -func (_c *Client_CreateFavorite_Call) Run(run func(_a0 context.Context, _a1 git.CreateFavoriteArgs)) *Client_CreateFavorite_Call { +func (_c *Client_CreateFavorite_Call) Run(run func(context1 context.Context, createFavoriteArgs git.CreateFavoriteArgs)) *Client_CreateFavorite_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreateFavoriteArgs)) }) return _c } -func (_c *Client_CreateFavorite_Call) Return(_a0 *git.GitRefFavorite, _a1 error) *Client_CreateFavorite_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreateFavorite_Call) Return(gitRefFavorite *git.GitRefFavorite, err error) *Client_CreateFavorite_Call { + _c.Call.Return(gitRefFavorite, err) return _c } -func (_c *Client_CreateFavorite_Call) RunAndReturn(run func(context.Context, git.CreateFavoriteArgs) (*git.GitRefFavorite, error)) *Client_CreateFavorite_Call { +func (_c *Client_CreateFavorite_Call) RunAndReturn(run func(context1 context.Context, createFavoriteArgs git.CreateFavoriteArgs) (*git.GitRefFavorite, error)) *Client_CreateFavorite_Call { _c.Call.Return(run) return _c } -// CreateForkSyncRequest provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreateForkSyncRequest(_a0 context.Context, _a1 git.CreateForkSyncRequestArgs) (*git.GitForkSyncRequest, error) { - ret := _m.Called(_a0, _a1) +// CreateForkSyncRequest provides a mock function for the type Client +func (_mock *Client) CreateForkSyncRequest(context1 context.Context, createForkSyncRequestArgs git.CreateForkSyncRequestArgs) (*git.GitForkSyncRequest, error) { + ret := _mock.Called(context1, createForkSyncRequestArgs) if len(ret) == 0 { panic("no return value specified for CreateForkSyncRequest") @@ -392,23 +393,21 @@ func (_m *Client) CreateForkSyncRequest(_a0 context.Context, _a1 git.CreateForkS var r0 *git.GitForkSyncRequest var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreateForkSyncRequestArgs) (*git.GitForkSyncRequest, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateForkSyncRequestArgs) (*git.GitForkSyncRequest, error)); ok { + return returnFunc(context1, createForkSyncRequestArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreateForkSyncRequestArgs) *git.GitForkSyncRequest); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateForkSyncRequestArgs) *git.GitForkSyncRequest); ok { + r0 = returnFunc(context1, createForkSyncRequestArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitForkSyncRequest) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreateForkSyncRequestArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreateForkSyncRequestArgs) error); ok { + r1 = returnFunc(context1, createForkSyncRequestArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -418,32 +417,32 @@ type Client_CreateForkSyncRequest_Call struct { } // CreateForkSyncRequest is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreateForkSyncRequestArgs -func (_e *Client_Expecter) CreateForkSyncRequest(_a0 interface{}, _a1 interface{}) *Client_CreateForkSyncRequest_Call { - return &Client_CreateForkSyncRequest_Call{Call: _e.mock.On("CreateForkSyncRequest", _a0, _a1)} +// - context1 +// - createForkSyncRequestArgs +func (_e *Client_Expecter) CreateForkSyncRequest(context1 interface{}, createForkSyncRequestArgs interface{}) *Client_CreateForkSyncRequest_Call { + return &Client_CreateForkSyncRequest_Call{Call: _e.mock.On("CreateForkSyncRequest", context1, createForkSyncRequestArgs)} } -func (_c *Client_CreateForkSyncRequest_Call) Run(run func(_a0 context.Context, _a1 git.CreateForkSyncRequestArgs)) *Client_CreateForkSyncRequest_Call { +func (_c *Client_CreateForkSyncRequest_Call) Run(run func(context1 context.Context, createForkSyncRequestArgs git.CreateForkSyncRequestArgs)) *Client_CreateForkSyncRequest_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreateForkSyncRequestArgs)) }) return _c } -func (_c *Client_CreateForkSyncRequest_Call) Return(_a0 *git.GitForkSyncRequest, _a1 error) *Client_CreateForkSyncRequest_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreateForkSyncRequest_Call) Return(gitForkSyncRequest *git.GitForkSyncRequest, err error) *Client_CreateForkSyncRequest_Call { + _c.Call.Return(gitForkSyncRequest, err) return _c } -func (_c *Client_CreateForkSyncRequest_Call) RunAndReturn(run func(context.Context, git.CreateForkSyncRequestArgs) (*git.GitForkSyncRequest, error)) *Client_CreateForkSyncRequest_Call { +func (_c *Client_CreateForkSyncRequest_Call) RunAndReturn(run func(context1 context.Context, createForkSyncRequestArgs git.CreateForkSyncRequestArgs) (*git.GitForkSyncRequest, error)) *Client_CreateForkSyncRequest_Call { _c.Call.Return(run) return _c } -// CreateImportRequest provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreateImportRequest(_a0 context.Context, _a1 git.CreateImportRequestArgs) (*git.GitImportRequest, error) { - ret := _m.Called(_a0, _a1) +// CreateImportRequest provides a mock function for the type Client +func (_mock *Client) CreateImportRequest(context1 context.Context, createImportRequestArgs git.CreateImportRequestArgs) (*git.GitImportRequest, error) { + ret := _mock.Called(context1, createImportRequestArgs) if len(ret) == 0 { panic("no return value specified for CreateImportRequest") @@ -451,23 +450,21 @@ func (_m *Client) CreateImportRequest(_a0 context.Context, _a1 git.CreateImportR var r0 *git.GitImportRequest var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreateImportRequestArgs) (*git.GitImportRequest, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateImportRequestArgs) (*git.GitImportRequest, error)); ok { + return returnFunc(context1, createImportRequestArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreateImportRequestArgs) *git.GitImportRequest); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateImportRequestArgs) *git.GitImportRequest); ok { + r0 = returnFunc(context1, createImportRequestArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitImportRequest) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreateImportRequestArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreateImportRequestArgs) error); ok { + r1 = returnFunc(context1, createImportRequestArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -477,44 +474,43 @@ type Client_CreateImportRequest_Call struct { } // CreateImportRequest is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreateImportRequestArgs -func (_e *Client_Expecter) CreateImportRequest(_a0 interface{}, _a1 interface{}) *Client_CreateImportRequest_Call { - return &Client_CreateImportRequest_Call{Call: _e.mock.On("CreateImportRequest", _a0, _a1)} +// - context1 +// - createImportRequestArgs +func (_e *Client_Expecter) CreateImportRequest(context1 interface{}, createImportRequestArgs interface{}) *Client_CreateImportRequest_Call { + return &Client_CreateImportRequest_Call{Call: _e.mock.On("CreateImportRequest", context1, createImportRequestArgs)} } -func (_c *Client_CreateImportRequest_Call) Run(run func(_a0 context.Context, _a1 git.CreateImportRequestArgs)) *Client_CreateImportRequest_Call { +func (_c *Client_CreateImportRequest_Call) Run(run func(context1 context.Context, createImportRequestArgs git.CreateImportRequestArgs)) *Client_CreateImportRequest_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreateImportRequestArgs)) }) return _c } -func (_c *Client_CreateImportRequest_Call) Return(_a0 *git.GitImportRequest, _a1 error) *Client_CreateImportRequest_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreateImportRequest_Call) Return(gitImportRequest *git.GitImportRequest, err error) *Client_CreateImportRequest_Call { + _c.Call.Return(gitImportRequest, err) return _c } -func (_c *Client_CreateImportRequest_Call) RunAndReturn(run func(context.Context, git.CreateImportRequestArgs) (*git.GitImportRequest, error)) *Client_CreateImportRequest_Call { +func (_c *Client_CreateImportRequest_Call) RunAndReturn(run func(context1 context.Context, createImportRequestArgs git.CreateImportRequestArgs) (*git.GitImportRequest, error)) *Client_CreateImportRequest_Call { _c.Call.Return(run) return _c } -// CreateLike provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreateLike(_a0 context.Context, _a1 git.CreateLikeArgs) error { - ret := _m.Called(_a0, _a1) +// CreateLike provides a mock function for the type Client +func (_mock *Client) CreateLike(context1 context.Context, createLikeArgs git.CreateLikeArgs) error { + ret := _mock.Called(context1, createLikeArgs) if len(ret) == 0 { panic("no return value specified for CreateLike") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreateLikeArgs) error); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateLikeArgs) error); ok { + r0 = returnFunc(context1, createLikeArgs) } else { r0 = ret.Error(0) } - return r0 } @@ -524,32 +520,32 @@ type Client_CreateLike_Call struct { } // CreateLike is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreateLikeArgs -func (_e *Client_Expecter) CreateLike(_a0 interface{}, _a1 interface{}) *Client_CreateLike_Call { - return &Client_CreateLike_Call{Call: _e.mock.On("CreateLike", _a0, _a1)} +// - context1 +// - createLikeArgs +func (_e *Client_Expecter) CreateLike(context1 interface{}, createLikeArgs interface{}) *Client_CreateLike_Call { + return &Client_CreateLike_Call{Call: _e.mock.On("CreateLike", context1, createLikeArgs)} } -func (_c *Client_CreateLike_Call) Run(run func(_a0 context.Context, _a1 git.CreateLikeArgs)) *Client_CreateLike_Call { +func (_c *Client_CreateLike_Call) Run(run func(context1 context.Context, createLikeArgs git.CreateLikeArgs)) *Client_CreateLike_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreateLikeArgs)) }) return _c } -func (_c *Client_CreateLike_Call) Return(_a0 error) *Client_CreateLike_Call { - _c.Call.Return(_a0) +func (_c *Client_CreateLike_Call) Return(err error) *Client_CreateLike_Call { + _c.Call.Return(err) return _c } -func (_c *Client_CreateLike_Call) RunAndReturn(run func(context.Context, git.CreateLikeArgs) error) *Client_CreateLike_Call { +func (_c *Client_CreateLike_Call) RunAndReturn(run func(context1 context.Context, createLikeArgs git.CreateLikeArgs) error) *Client_CreateLike_Call { _c.Call.Return(run) return _c } -// CreateMergeRequest provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreateMergeRequest(_a0 context.Context, _a1 git.CreateMergeRequestArgs) (*git.GitMerge, error) { - ret := _m.Called(_a0, _a1) +// CreateMergeRequest provides a mock function for the type Client +func (_mock *Client) CreateMergeRequest(context1 context.Context, createMergeRequestArgs git.CreateMergeRequestArgs) (*git.GitMerge, error) { + ret := _mock.Called(context1, createMergeRequestArgs) if len(ret) == 0 { panic("no return value specified for CreateMergeRequest") @@ -557,23 +553,21 @@ func (_m *Client) CreateMergeRequest(_a0 context.Context, _a1 git.CreateMergeReq var r0 *git.GitMerge var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreateMergeRequestArgs) (*git.GitMerge, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateMergeRequestArgs) (*git.GitMerge, error)); ok { + return returnFunc(context1, createMergeRequestArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreateMergeRequestArgs) *git.GitMerge); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateMergeRequestArgs) *git.GitMerge); ok { + r0 = returnFunc(context1, createMergeRequestArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitMerge) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreateMergeRequestArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreateMergeRequestArgs) error); ok { + r1 = returnFunc(context1, createMergeRequestArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -583,32 +577,32 @@ type Client_CreateMergeRequest_Call struct { } // CreateMergeRequest is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreateMergeRequestArgs -func (_e *Client_Expecter) CreateMergeRequest(_a0 interface{}, _a1 interface{}) *Client_CreateMergeRequest_Call { - return &Client_CreateMergeRequest_Call{Call: _e.mock.On("CreateMergeRequest", _a0, _a1)} +// - context1 +// - createMergeRequestArgs +func (_e *Client_Expecter) CreateMergeRequest(context1 interface{}, createMergeRequestArgs interface{}) *Client_CreateMergeRequest_Call { + return &Client_CreateMergeRequest_Call{Call: _e.mock.On("CreateMergeRequest", context1, createMergeRequestArgs)} } -func (_c *Client_CreateMergeRequest_Call) Run(run func(_a0 context.Context, _a1 git.CreateMergeRequestArgs)) *Client_CreateMergeRequest_Call { +func (_c *Client_CreateMergeRequest_Call) Run(run func(context1 context.Context, createMergeRequestArgs git.CreateMergeRequestArgs)) *Client_CreateMergeRequest_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreateMergeRequestArgs)) }) return _c } -func (_c *Client_CreateMergeRequest_Call) Return(_a0 *git.GitMerge, _a1 error) *Client_CreateMergeRequest_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreateMergeRequest_Call) Return(gitMerge *git.GitMerge, err error) *Client_CreateMergeRequest_Call { + _c.Call.Return(gitMerge, err) return _c } -func (_c *Client_CreateMergeRequest_Call) RunAndReturn(run func(context.Context, git.CreateMergeRequestArgs) (*git.GitMerge, error)) *Client_CreateMergeRequest_Call { +func (_c *Client_CreateMergeRequest_Call) RunAndReturn(run func(context1 context.Context, createMergeRequestArgs git.CreateMergeRequestArgs) (*git.GitMerge, error)) *Client_CreateMergeRequest_Call { _c.Call.Return(run) return _c } -// CreatePullRequest provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreatePullRequest(_a0 context.Context, _a1 git.CreatePullRequestArgs) (*git.GitPullRequest, error) { - ret := _m.Called(_a0, _a1) +// CreatePullRequest provides a mock function for the type Client +func (_mock *Client) CreatePullRequest(context1 context.Context, createPullRequestArgs git.CreatePullRequestArgs) (*git.GitPullRequest, error) { + ret := _mock.Called(context1, createPullRequestArgs) if len(ret) == 0 { panic("no return value specified for CreatePullRequest") @@ -616,23 +610,21 @@ func (_m *Client) CreatePullRequest(_a0 context.Context, _a1 git.CreatePullReque var r0 *git.GitPullRequest var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestArgs) (*git.GitPullRequest, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestArgs) (*git.GitPullRequest, error)); ok { + return returnFunc(context1, createPullRequestArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestArgs) *git.GitPullRequest); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestArgs) *git.GitPullRequest); ok { + r0 = returnFunc(context1, createPullRequestArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPullRequest) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreatePullRequestArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreatePullRequestArgs) error); ok { + r1 = returnFunc(context1, createPullRequestArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -642,32 +634,32 @@ type Client_CreatePullRequest_Call struct { } // CreatePullRequest is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreatePullRequestArgs -func (_e *Client_Expecter) CreatePullRequest(_a0 interface{}, _a1 interface{}) *Client_CreatePullRequest_Call { - return &Client_CreatePullRequest_Call{Call: _e.mock.On("CreatePullRequest", _a0, _a1)} +// - context1 +// - createPullRequestArgs +func (_e *Client_Expecter) CreatePullRequest(context1 interface{}, createPullRequestArgs interface{}) *Client_CreatePullRequest_Call { + return &Client_CreatePullRequest_Call{Call: _e.mock.On("CreatePullRequest", context1, createPullRequestArgs)} } -func (_c *Client_CreatePullRequest_Call) Run(run func(_a0 context.Context, _a1 git.CreatePullRequestArgs)) *Client_CreatePullRequest_Call { +func (_c *Client_CreatePullRequest_Call) Run(run func(context1 context.Context, createPullRequestArgs git.CreatePullRequestArgs)) *Client_CreatePullRequest_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreatePullRequestArgs)) }) return _c } -func (_c *Client_CreatePullRequest_Call) Return(_a0 *git.GitPullRequest, _a1 error) *Client_CreatePullRequest_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreatePullRequest_Call) Return(gitPullRequest *git.GitPullRequest, err error) *Client_CreatePullRequest_Call { + _c.Call.Return(gitPullRequest, err) return _c } -func (_c *Client_CreatePullRequest_Call) RunAndReturn(run func(context.Context, git.CreatePullRequestArgs) (*git.GitPullRequest, error)) *Client_CreatePullRequest_Call { +func (_c *Client_CreatePullRequest_Call) RunAndReturn(run func(context1 context.Context, createPullRequestArgs git.CreatePullRequestArgs) (*git.GitPullRequest, error)) *Client_CreatePullRequest_Call { _c.Call.Return(run) return _c } -// CreatePullRequestIterationStatus provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreatePullRequestIterationStatus(_a0 context.Context, _a1 git.CreatePullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error) { - ret := _m.Called(_a0, _a1) +// CreatePullRequestIterationStatus provides a mock function for the type Client +func (_mock *Client) CreatePullRequestIterationStatus(context1 context.Context, createPullRequestIterationStatusArgs git.CreatePullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error) { + ret := _mock.Called(context1, createPullRequestIterationStatusArgs) if len(ret) == 0 { panic("no return value specified for CreatePullRequestIterationStatus") @@ -675,23 +667,21 @@ func (_m *Client) CreatePullRequestIterationStatus(_a0 context.Context, _a1 git. var r0 *git.GitPullRequestStatus var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error)); ok { + return returnFunc(context1, createPullRequestIterationStatusArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestIterationStatusArgs) *git.GitPullRequestStatus); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestIterationStatusArgs) *git.GitPullRequestStatus); ok { + r0 = returnFunc(context1, createPullRequestIterationStatusArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPullRequestStatus) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreatePullRequestIterationStatusArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreatePullRequestIterationStatusArgs) error); ok { + r1 = returnFunc(context1, createPullRequestIterationStatusArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -701,32 +691,32 @@ type Client_CreatePullRequestIterationStatus_Call struct { } // CreatePullRequestIterationStatus is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreatePullRequestIterationStatusArgs -func (_e *Client_Expecter) CreatePullRequestIterationStatus(_a0 interface{}, _a1 interface{}) *Client_CreatePullRequestIterationStatus_Call { - return &Client_CreatePullRequestIterationStatus_Call{Call: _e.mock.On("CreatePullRequestIterationStatus", _a0, _a1)} +// - context1 +// - createPullRequestIterationStatusArgs +func (_e *Client_Expecter) CreatePullRequestIterationStatus(context1 interface{}, createPullRequestIterationStatusArgs interface{}) *Client_CreatePullRequestIterationStatus_Call { + return &Client_CreatePullRequestIterationStatus_Call{Call: _e.mock.On("CreatePullRequestIterationStatus", context1, createPullRequestIterationStatusArgs)} } -func (_c *Client_CreatePullRequestIterationStatus_Call) Run(run func(_a0 context.Context, _a1 git.CreatePullRequestIterationStatusArgs)) *Client_CreatePullRequestIterationStatus_Call { +func (_c *Client_CreatePullRequestIterationStatus_Call) Run(run func(context1 context.Context, createPullRequestIterationStatusArgs git.CreatePullRequestIterationStatusArgs)) *Client_CreatePullRequestIterationStatus_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreatePullRequestIterationStatusArgs)) }) return _c } -func (_c *Client_CreatePullRequestIterationStatus_Call) Return(_a0 *git.GitPullRequestStatus, _a1 error) *Client_CreatePullRequestIterationStatus_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreatePullRequestIterationStatus_Call) Return(gitPullRequestStatus *git.GitPullRequestStatus, err error) *Client_CreatePullRequestIterationStatus_Call { + _c.Call.Return(gitPullRequestStatus, err) return _c } -func (_c *Client_CreatePullRequestIterationStatus_Call) RunAndReturn(run func(context.Context, git.CreatePullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error)) *Client_CreatePullRequestIterationStatus_Call { +func (_c *Client_CreatePullRequestIterationStatus_Call) RunAndReturn(run func(context1 context.Context, createPullRequestIterationStatusArgs git.CreatePullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error)) *Client_CreatePullRequestIterationStatus_Call { _c.Call.Return(run) return _c } -// CreatePullRequestLabel provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreatePullRequestLabel(_a0 context.Context, _a1 git.CreatePullRequestLabelArgs) (*core.WebApiTagDefinition, error) { - ret := _m.Called(_a0, _a1) +// CreatePullRequestLabel provides a mock function for the type Client +func (_mock *Client) CreatePullRequestLabel(context1 context.Context, createPullRequestLabelArgs git.CreatePullRequestLabelArgs) (*core.WebApiTagDefinition, error) { + ret := _mock.Called(context1, createPullRequestLabelArgs) if len(ret) == 0 { panic("no return value specified for CreatePullRequestLabel") @@ -734,23 +724,21 @@ func (_m *Client) CreatePullRequestLabel(_a0 context.Context, _a1 git.CreatePull var r0 *core.WebApiTagDefinition var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestLabelArgs) (*core.WebApiTagDefinition, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestLabelArgs) (*core.WebApiTagDefinition, error)); ok { + return returnFunc(context1, createPullRequestLabelArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestLabelArgs) *core.WebApiTagDefinition); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestLabelArgs) *core.WebApiTagDefinition); ok { + r0 = returnFunc(context1, createPullRequestLabelArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*core.WebApiTagDefinition) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreatePullRequestLabelArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreatePullRequestLabelArgs) error); ok { + r1 = returnFunc(context1, createPullRequestLabelArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -760,32 +748,32 @@ type Client_CreatePullRequestLabel_Call struct { } // CreatePullRequestLabel is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreatePullRequestLabelArgs -func (_e *Client_Expecter) CreatePullRequestLabel(_a0 interface{}, _a1 interface{}) *Client_CreatePullRequestLabel_Call { - return &Client_CreatePullRequestLabel_Call{Call: _e.mock.On("CreatePullRequestLabel", _a0, _a1)} +// - context1 +// - createPullRequestLabelArgs +func (_e *Client_Expecter) CreatePullRequestLabel(context1 interface{}, createPullRequestLabelArgs interface{}) *Client_CreatePullRequestLabel_Call { + return &Client_CreatePullRequestLabel_Call{Call: _e.mock.On("CreatePullRequestLabel", context1, createPullRequestLabelArgs)} } -func (_c *Client_CreatePullRequestLabel_Call) Run(run func(_a0 context.Context, _a1 git.CreatePullRequestLabelArgs)) *Client_CreatePullRequestLabel_Call { +func (_c *Client_CreatePullRequestLabel_Call) Run(run func(context1 context.Context, createPullRequestLabelArgs git.CreatePullRequestLabelArgs)) *Client_CreatePullRequestLabel_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreatePullRequestLabelArgs)) }) return _c } -func (_c *Client_CreatePullRequestLabel_Call) Return(_a0 *core.WebApiTagDefinition, _a1 error) *Client_CreatePullRequestLabel_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreatePullRequestLabel_Call) Return(webApiTagDefinition *core.WebApiTagDefinition, err error) *Client_CreatePullRequestLabel_Call { + _c.Call.Return(webApiTagDefinition, err) return _c } -func (_c *Client_CreatePullRequestLabel_Call) RunAndReturn(run func(context.Context, git.CreatePullRequestLabelArgs) (*core.WebApiTagDefinition, error)) *Client_CreatePullRequestLabel_Call { +func (_c *Client_CreatePullRequestLabel_Call) RunAndReturn(run func(context1 context.Context, createPullRequestLabelArgs git.CreatePullRequestLabelArgs) (*core.WebApiTagDefinition, error)) *Client_CreatePullRequestLabel_Call { _c.Call.Return(run) return _c } -// CreatePullRequestReviewer provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreatePullRequestReviewer(_a0 context.Context, _a1 git.CreatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error) { - ret := _m.Called(_a0, _a1) +// CreatePullRequestReviewer provides a mock function for the type Client +func (_mock *Client) CreatePullRequestReviewer(context1 context.Context, createPullRequestReviewerArgs git.CreatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error) { + ret := _mock.Called(context1, createPullRequestReviewerArgs) if len(ret) == 0 { panic("no return value specified for CreatePullRequestReviewer") @@ -793,23 +781,21 @@ func (_m *Client) CreatePullRequestReviewer(_a0 context.Context, _a1 git.CreateP var r0 *git.IdentityRefWithVote var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error)); ok { + return returnFunc(context1, createPullRequestReviewerArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestReviewerArgs) *git.IdentityRefWithVote); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestReviewerArgs) *git.IdentityRefWithVote); ok { + r0 = returnFunc(context1, createPullRequestReviewerArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.IdentityRefWithVote) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreatePullRequestReviewerArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreatePullRequestReviewerArgs) error); ok { + r1 = returnFunc(context1, createPullRequestReviewerArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -819,32 +805,32 @@ type Client_CreatePullRequestReviewer_Call struct { } // CreatePullRequestReviewer is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreatePullRequestReviewerArgs -func (_e *Client_Expecter) CreatePullRequestReviewer(_a0 interface{}, _a1 interface{}) *Client_CreatePullRequestReviewer_Call { - return &Client_CreatePullRequestReviewer_Call{Call: _e.mock.On("CreatePullRequestReviewer", _a0, _a1)} +// - context1 +// - createPullRequestReviewerArgs +func (_e *Client_Expecter) CreatePullRequestReviewer(context1 interface{}, createPullRequestReviewerArgs interface{}) *Client_CreatePullRequestReviewer_Call { + return &Client_CreatePullRequestReviewer_Call{Call: _e.mock.On("CreatePullRequestReviewer", context1, createPullRequestReviewerArgs)} } -func (_c *Client_CreatePullRequestReviewer_Call) Run(run func(_a0 context.Context, _a1 git.CreatePullRequestReviewerArgs)) *Client_CreatePullRequestReviewer_Call { +func (_c *Client_CreatePullRequestReviewer_Call) Run(run func(context1 context.Context, createPullRequestReviewerArgs git.CreatePullRequestReviewerArgs)) *Client_CreatePullRequestReviewer_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreatePullRequestReviewerArgs)) }) return _c } -func (_c *Client_CreatePullRequestReviewer_Call) Return(_a0 *git.IdentityRefWithVote, _a1 error) *Client_CreatePullRequestReviewer_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreatePullRequestReviewer_Call) Return(identityRefWithVote *git.IdentityRefWithVote, err error) *Client_CreatePullRequestReviewer_Call { + _c.Call.Return(identityRefWithVote, err) return _c } -func (_c *Client_CreatePullRequestReviewer_Call) RunAndReturn(run func(context.Context, git.CreatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error)) *Client_CreatePullRequestReviewer_Call { +func (_c *Client_CreatePullRequestReviewer_Call) RunAndReturn(run func(context1 context.Context, createPullRequestReviewerArgs git.CreatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error)) *Client_CreatePullRequestReviewer_Call { _c.Call.Return(run) return _c } -// CreatePullRequestReviewers provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreatePullRequestReviewers(_a0 context.Context, _a1 git.CreatePullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error) { - ret := _m.Called(_a0, _a1) +// CreatePullRequestReviewers provides a mock function for the type Client +func (_mock *Client) CreatePullRequestReviewers(context1 context.Context, createPullRequestReviewersArgs git.CreatePullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error) { + ret := _mock.Called(context1, createPullRequestReviewersArgs) if len(ret) == 0 { panic("no return value specified for CreatePullRequestReviewers") @@ -852,23 +838,21 @@ func (_m *Client) CreatePullRequestReviewers(_a0 context.Context, _a1 git.Create var r0 *[]git.IdentityRefWithVote var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error)); ok { + return returnFunc(context1, createPullRequestReviewersArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestReviewersArgs) *[]git.IdentityRefWithVote); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestReviewersArgs) *[]git.IdentityRefWithVote); ok { + r0 = returnFunc(context1, createPullRequestReviewersArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.IdentityRefWithVote) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreatePullRequestReviewersArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreatePullRequestReviewersArgs) error); ok { + r1 = returnFunc(context1, createPullRequestReviewersArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -878,32 +862,32 @@ type Client_CreatePullRequestReviewers_Call struct { } // CreatePullRequestReviewers is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreatePullRequestReviewersArgs -func (_e *Client_Expecter) CreatePullRequestReviewers(_a0 interface{}, _a1 interface{}) *Client_CreatePullRequestReviewers_Call { - return &Client_CreatePullRequestReviewers_Call{Call: _e.mock.On("CreatePullRequestReviewers", _a0, _a1)} +// - context1 +// - createPullRequestReviewersArgs +func (_e *Client_Expecter) CreatePullRequestReviewers(context1 interface{}, createPullRequestReviewersArgs interface{}) *Client_CreatePullRequestReviewers_Call { + return &Client_CreatePullRequestReviewers_Call{Call: _e.mock.On("CreatePullRequestReviewers", context1, createPullRequestReviewersArgs)} } -func (_c *Client_CreatePullRequestReviewers_Call) Run(run func(_a0 context.Context, _a1 git.CreatePullRequestReviewersArgs)) *Client_CreatePullRequestReviewers_Call { +func (_c *Client_CreatePullRequestReviewers_Call) Run(run func(context1 context.Context, createPullRequestReviewersArgs git.CreatePullRequestReviewersArgs)) *Client_CreatePullRequestReviewers_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreatePullRequestReviewersArgs)) }) return _c } -func (_c *Client_CreatePullRequestReviewers_Call) Return(_a0 *[]git.IdentityRefWithVote, _a1 error) *Client_CreatePullRequestReviewers_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreatePullRequestReviewers_Call) Return(identityRefWithVotes *[]git.IdentityRefWithVote, err error) *Client_CreatePullRequestReviewers_Call { + _c.Call.Return(identityRefWithVotes, err) return _c } -func (_c *Client_CreatePullRequestReviewers_Call) RunAndReturn(run func(context.Context, git.CreatePullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error)) *Client_CreatePullRequestReviewers_Call { +func (_c *Client_CreatePullRequestReviewers_Call) RunAndReturn(run func(context1 context.Context, createPullRequestReviewersArgs git.CreatePullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error)) *Client_CreatePullRequestReviewers_Call { _c.Call.Return(run) return _c } -// CreatePullRequestStatus provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreatePullRequestStatus(_a0 context.Context, _a1 git.CreatePullRequestStatusArgs) (*git.GitPullRequestStatus, error) { - ret := _m.Called(_a0, _a1) +// CreatePullRequestStatus provides a mock function for the type Client +func (_mock *Client) CreatePullRequestStatus(context1 context.Context, createPullRequestStatusArgs git.CreatePullRequestStatusArgs) (*git.GitPullRequestStatus, error) { + ret := _mock.Called(context1, createPullRequestStatusArgs) if len(ret) == 0 { panic("no return value specified for CreatePullRequestStatus") @@ -911,23 +895,21 @@ func (_m *Client) CreatePullRequestStatus(_a0 context.Context, _a1 git.CreatePul var r0 *git.GitPullRequestStatus var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestStatusArgs) (*git.GitPullRequestStatus, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestStatusArgs) (*git.GitPullRequestStatus, error)); ok { + return returnFunc(context1, createPullRequestStatusArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestStatusArgs) *git.GitPullRequestStatus); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreatePullRequestStatusArgs) *git.GitPullRequestStatus); ok { + r0 = returnFunc(context1, createPullRequestStatusArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPullRequestStatus) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreatePullRequestStatusArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreatePullRequestStatusArgs) error); ok { + r1 = returnFunc(context1, createPullRequestStatusArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -937,32 +919,32 @@ type Client_CreatePullRequestStatus_Call struct { } // CreatePullRequestStatus is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreatePullRequestStatusArgs -func (_e *Client_Expecter) CreatePullRequestStatus(_a0 interface{}, _a1 interface{}) *Client_CreatePullRequestStatus_Call { - return &Client_CreatePullRequestStatus_Call{Call: _e.mock.On("CreatePullRequestStatus", _a0, _a1)} +// - context1 +// - createPullRequestStatusArgs +func (_e *Client_Expecter) CreatePullRequestStatus(context1 interface{}, createPullRequestStatusArgs interface{}) *Client_CreatePullRequestStatus_Call { + return &Client_CreatePullRequestStatus_Call{Call: _e.mock.On("CreatePullRequestStatus", context1, createPullRequestStatusArgs)} } -func (_c *Client_CreatePullRequestStatus_Call) Run(run func(_a0 context.Context, _a1 git.CreatePullRequestStatusArgs)) *Client_CreatePullRequestStatus_Call { +func (_c *Client_CreatePullRequestStatus_Call) Run(run func(context1 context.Context, createPullRequestStatusArgs git.CreatePullRequestStatusArgs)) *Client_CreatePullRequestStatus_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreatePullRequestStatusArgs)) }) return _c } -func (_c *Client_CreatePullRequestStatus_Call) Return(_a0 *git.GitPullRequestStatus, _a1 error) *Client_CreatePullRequestStatus_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreatePullRequestStatus_Call) Return(gitPullRequestStatus *git.GitPullRequestStatus, err error) *Client_CreatePullRequestStatus_Call { + _c.Call.Return(gitPullRequestStatus, err) return _c } -func (_c *Client_CreatePullRequestStatus_Call) RunAndReturn(run func(context.Context, git.CreatePullRequestStatusArgs) (*git.GitPullRequestStatus, error)) *Client_CreatePullRequestStatus_Call { +func (_c *Client_CreatePullRequestStatus_Call) RunAndReturn(run func(context1 context.Context, createPullRequestStatusArgs git.CreatePullRequestStatusArgs) (*git.GitPullRequestStatus, error)) *Client_CreatePullRequestStatus_Call { _c.Call.Return(run) return _c } -// CreatePush provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreatePush(_a0 context.Context, _a1 git.CreatePushArgs) (*git.GitPush, error) { - ret := _m.Called(_a0, _a1) +// CreatePush provides a mock function for the type Client +func (_mock *Client) CreatePush(context1 context.Context, createPushArgs git.CreatePushArgs) (*git.GitPush, error) { + ret := _mock.Called(context1, createPushArgs) if len(ret) == 0 { panic("no return value specified for CreatePush") @@ -970,23 +952,21 @@ func (_m *Client) CreatePush(_a0 context.Context, _a1 git.CreatePushArgs) (*git. var r0 *git.GitPush var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreatePushArgs) (*git.GitPush, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreatePushArgs) (*git.GitPush, error)); ok { + return returnFunc(context1, createPushArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreatePushArgs) *git.GitPush); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreatePushArgs) *git.GitPush); ok { + r0 = returnFunc(context1, createPushArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPush) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreatePushArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreatePushArgs) error); ok { + r1 = returnFunc(context1, createPushArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -996,32 +976,32 @@ type Client_CreatePush_Call struct { } // CreatePush is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreatePushArgs -func (_e *Client_Expecter) CreatePush(_a0 interface{}, _a1 interface{}) *Client_CreatePush_Call { - return &Client_CreatePush_Call{Call: _e.mock.On("CreatePush", _a0, _a1)} +// - context1 +// - createPushArgs +func (_e *Client_Expecter) CreatePush(context1 interface{}, createPushArgs interface{}) *Client_CreatePush_Call { + return &Client_CreatePush_Call{Call: _e.mock.On("CreatePush", context1, createPushArgs)} } -func (_c *Client_CreatePush_Call) Run(run func(_a0 context.Context, _a1 git.CreatePushArgs)) *Client_CreatePush_Call { +func (_c *Client_CreatePush_Call) Run(run func(context1 context.Context, createPushArgs git.CreatePushArgs)) *Client_CreatePush_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreatePushArgs)) }) return _c } -func (_c *Client_CreatePush_Call) Return(_a0 *git.GitPush, _a1 error) *Client_CreatePush_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreatePush_Call) Return(gitPush *git.GitPush, err error) *Client_CreatePush_Call { + _c.Call.Return(gitPush, err) return _c } -func (_c *Client_CreatePush_Call) RunAndReturn(run func(context.Context, git.CreatePushArgs) (*git.GitPush, error)) *Client_CreatePush_Call { +func (_c *Client_CreatePush_Call) RunAndReturn(run func(context1 context.Context, createPushArgs git.CreatePushArgs) (*git.GitPush, error)) *Client_CreatePush_Call { _c.Call.Return(run) return _c } -// CreateRepository provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreateRepository(_a0 context.Context, _a1 git.CreateRepositoryArgs) (*git.GitRepository, error) { - ret := _m.Called(_a0, _a1) +// CreateRepository provides a mock function for the type Client +func (_mock *Client) CreateRepository(context1 context.Context, createRepositoryArgs git.CreateRepositoryArgs) (*git.GitRepository, error) { + ret := _mock.Called(context1, createRepositoryArgs) if len(ret) == 0 { panic("no return value specified for CreateRepository") @@ -1029,23 +1009,21 @@ func (_m *Client) CreateRepository(_a0 context.Context, _a1 git.CreateRepository var r0 *git.GitRepository var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreateRepositoryArgs) (*git.GitRepository, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateRepositoryArgs) (*git.GitRepository, error)); ok { + return returnFunc(context1, createRepositoryArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreateRepositoryArgs) *git.GitRepository); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateRepositoryArgs) *git.GitRepository); ok { + r0 = returnFunc(context1, createRepositoryArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitRepository) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreateRepositoryArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreateRepositoryArgs) error); ok { + r1 = returnFunc(context1, createRepositoryArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1055,32 +1033,32 @@ type Client_CreateRepository_Call struct { } // CreateRepository is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreateRepositoryArgs -func (_e *Client_Expecter) CreateRepository(_a0 interface{}, _a1 interface{}) *Client_CreateRepository_Call { - return &Client_CreateRepository_Call{Call: _e.mock.On("CreateRepository", _a0, _a1)} +// - context1 +// - createRepositoryArgs +func (_e *Client_Expecter) CreateRepository(context1 interface{}, createRepositoryArgs interface{}) *Client_CreateRepository_Call { + return &Client_CreateRepository_Call{Call: _e.mock.On("CreateRepository", context1, createRepositoryArgs)} } -func (_c *Client_CreateRepository_Call) Run(run func(_a0 context.Context, _a1 git.CreateRepositoryArgs)) *Client_CreateRepository_Call { +func (_c *Client_CreateRepository_Call) Run(run func(context1 context.Context, createRepositoryArgs git.CreateRepositoryArgs)) *Client_CreateRepository_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreateRepositoryArgs)) }) return _c } -func (_c *Client_CreateRepository_Call) Return(_a0 *git.GitRepository, _a1 error) *Client_CreateRepository_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreateRepository_Call) Return(gitRepository *git.GitRepository, err error) *Client_CreateRepository_Call { + _c.Call.Return(gitRepository, err) return _c } -func (_c *Client_CreateRepository_Call) RunAndReturn(run func(context.Context, git.CreateRepositoryArgs) (*git.GitRepository, error)) *Client_CreateRepository_Call { +func (_c *Client_CreateRepository_Call) RunAndReturn(run func(context1 context.Context, createRepositoryArgs git.CreateRepositoryArgs) (*git.GitRepository, error)) *Client_CreateRepository_Call { _c.Call.Return(run) return _c } -// CreateRevert provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreateRevert(_a0 context.Context, _a1 git.CreateRevertArgs) (*git.GitRevert, error) { - ret := _m.Called(_a0, _a1) +// CreateRevert provides a mock function for the type Client +func (_mock *Client) CreateRevert(context1 context.Context, createRevertArgs git.CreateRevertArgs) (*git.GitRevert, error) { + ret := _mock.Called(context1, createRevertArgs) if len(ret) == 0 { panic("no return value specified for CreateRevert") @@ -1088,23 +1066,21 @@ func (_m *Client) CreateRevert(_a0 context.Context, _a1 git.CreateRevertArgs) (* var r0 *git.GitRevert var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreateRevertArgs) (*git.GitRevert, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateRevertArgs) (*git.GitRevert, error)); ok { + return returnFunc(context1, createRevertArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreateRevertArgs) *git.GitRevert); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateRevertArgs) *git.GitRevert); ok { + r0 = returnFunc(context1, createRevertArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitRevert) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreateRevertArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreateRevertArgs) error); ok { + r1 = returnFunc(context1, createRevertArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1114,32 +1090,32 @@ type Client_CreateRevert_Call struct { } // CreateRevert is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreateRevertArgs -func (_e *Client_Expecter) CreateRevert(_a0 interface{}, _a1 interface{}) *Client_CreateRevert_Call { - return &Client_CreateRevert_Call{Call: _e.mock.On("CreateRevert", _a0, _a1)} +// - context1 +// - createRevertArgs +func (_e *Client_Expecter) CreateRevert(context1 interface{}, createRevertArgs interface{}) *Client_CreateRevert_Call { + return &Client_CreateRevert_Call{Call: _e.mock.On("CreateRevert", context1, createRevertArgs)} } -func (_c *Client_CreateRevert_Call) Run(run func(_a0 context.Context, _a1 git.CreateRevertArgs)) *Client_CreateRevert_Call { +func (_c *Client_CreateRevert_Call) Run(run func(context1 context.Context, createRevertArgs git.CreateRevertArgs)) *Client_CreateRevert_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreateRevertArgs)) }) return _c } -func (_c *Client_CreateRevert_Call) Return(_a0 *git.GitRevert, _a1 error) *Client_CreateRevert_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreateRevert_Call) Return(gitRevert *git.GitRevert, err error) *Client_CreateRevert_Call { + _c.Call.Return(gitRevert, err) return _c } -func (_c *Client_CreateRevert_Call) RunAndReturn(run func(context.Context, git.CreateRevertArgs) (*git.GitRevert, error)) *Client_CreateRevert_Call { +func (_c *Client_CreateRevert_Call) RunAndReturn(run func(context1 context.Context, createRevertArgs git.CreateRevertArgs) (*git.GitRevert, error)) *Client_CreateRevert_Call { _c.Call.Return(run) return _c } -// CreateThread provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreateThread(_a0 context.Context, _a1 git.CreateThreadArgs) (*git.GitPullRequestCommentThread, error) { - ret := _m.Called(_a0, _a1) +// CreateThread provides a mock function for the type Client +func (_mock *Client) CreateThread(context1 context.Context, createThreadArgs git.CreateThreadArgs) (*git.GitPullRequestCommentThread, error) { + ret := _mock.Called(context1, createThreadArgs) if len(ret) == 0 { panic("no return value specified for CreateThread") @@ -1147,23 +1123,21 @@ func (_m *Client) CreateThread(_a0 context.Context, _a1 git.CreateThreadArgs) (* var r0 *git.GitPullRequestCommentThread var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreateThreadArgs) (*git.GitPullRequestCommentThread, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateThreadArgs) (*git.GitPullRequestCommentThread, error)); ok { + return returnFunc(context1, createThreadArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreateThreadArgs) *git.GitPullRequestCommentThread); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateThreadArgs) *git.GitPullRequestCommentThread); ok { + r0 = returnFunc(context1, createThreadArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPullRequestCommentThread) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreateThreadArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreateThreadArgs) error); ok { + r1 = returnFunc(context1, createThreadArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1173,32 +1147,32 @@ type Client_CreateThread_Call struct { } // CreateThread is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreateThreadArgs -func (_e *Client_Expecter) CreateThread(_a0 interface{}, _a1 interface{}) *Client_CreateThread_Call { - return &Client_CreateThread_Call{Call: _e.mock.On("CreateThread", _a0, _a1)} +// - context1 +// - createThreadArgs +func (_e *Client_Expecter) CreateThread(context1 interface{}, createThreadArgs interface{}) *Client_CreateThread_Call { + return &Client_CreateThread_Call{Call: _e.mock.On("CreateThread", context1, createThreadArgs)} } -func (_c *Client_CreateThread_Call) Run(run func(_a0 context.Context, _a1 git.CreateThreadArgs)) *Client_CreateThread_Call { +func (_c *Client_CreateThread_Call) Run(run func(context1 context.Context, createThreadArgs git.CreateThreadArgs)) *Client_CreateThread_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreateThreadArgs)) }) return _c } -func (_c *Client_CreateThread_Call) Return(_a0 *git.GitPullRequestCommentThread, _a1 error) *Client_CreateThread_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreateThread_Call) Return(gitPullRequestCommentThread *git.GitPullRequestCommentThread, err error) *Client_CreateThread_Call { + _c.Call.Return(gitPullRequestCommentThread, err) return _c } -func (_c *Client_CreateThread_Call) RunAndReturn(run func(context.Context, git.CreateThreadArgs) (*git.GitPullRequestCommentThread, error)) *Client_CreateThread_Call { +func (_c *Client_CreateThread_Call) RunAndReturn(run func(context1 context.Context, createThreadArgs git.CreateThreadArgs) (*git.GitPullRequestCommentThread, error)) *Client_CreateThread_Call { _c.Call.Return(run) return _c } -// CreateUnmaterializedPullRequestReviewer provides a mock function with given fields: _a0, _a1 -func (_m *Client) CreateUnmaterializedPullRequestReviewer(_a0 context.Context, _a1 git.CreateUnmaterializedPullRequestReviewerArgs) (*git.IdentityRefWithVote, error) { - ret := _m.Called(_a0, _a1) +// CreateUnmaterializedPullRequestReviewer provides a mock function for the type Client +func (_mock *Client) CreateUnmaterializedPullRequestReviewer(context1 context.Context, createUnmaterializedPullRequestReviewerArgs git.CreateUnmaterializedPullRequestReviewerArgs) (*git.IdentityRefWithVote, error) { + ret := _mock.Called(context1, createUnmaterializedPullRequestReviewerArgs) if len(ret) == 0 { panic("no return value specified for CreateUnmaterializedPullRequestReviewer") @@ -1206,23 +1180,21 @@ func (_m *Client) CreateUnmaterializedPullRequestReviewer(_a0 context.Context, _ var r0 *git.IdentityRefWithVote var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.CreateUnmaterializedPullRequestReviewerArgs) (*git.IdentityRefWithVote, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateUnmaterializedPullRequestReviewerArgs) (*git.IdentityRefWithVote, error)); ok { + return returnFunc(context1, createUnmaterializedPullRequestReviewerArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.CreateUnmaterializedPullRequestReviewerArgs) *git.IdentityRefWithVote); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.CreateUnmaterializedPullRequestReviewerArgs) *git.IdentityRefWithVote); ok { + r0 = returnFunc(context1, createUnmaterializedPullRequestReviewerArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.IdentityRefWithVote) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.CreateUnmaterializedPullRequestReviewerArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.CreateUnmaterializedPullRequestReviewerArgs) error); ok { + r1 = returnFunc(context1, createUnmaterializedPullRequestReviewerArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1232,44 +1204,43 @@ type Client_CreateUnmaterializedPullRequestReviewer_Call struct { } // CreateUnmaterializedPullRequestReviewer is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.CreateUnmaterializedPullRequestReviewerArgs -func (_e *Client_Expecter) CreateUnmaterializedPullRequestReviewer(_a0 interface{}, _a1 interface{}) *Client_CreateUnmaterializedPullRequestReviewer_Call { - return &Client_CreateUnmaterializedPullRequestReviewer_Call{Call: _e.mock.On("CreateUnmaterializedPullRequestReviewer", _a0, _a1)} +// - context1 +// - createUnmaterializedPullRequestReviewerArgs +func (_e *Client_Expecter) CreateUnmaterializedPullRequestReviewer(context1 interface{}, createUnmaterializedPullRequestReviewerArgs interface{}) *Client_CreateUnmaterializedPullRequestReviewer_Call { + return &Client_CreateUnmaterializedPullRequestReviewer_Call{Call: _e.mock.On("CreateUnmaterializedPullRequestReviewer", context1, createUnmaterializedPullRequestReviewerArgs)} } -func (_c *Client_CreateUnmaterializedPullRequestReviewer_Call) Run(run func(_a0 context.Context, _a1 git.CreateUnmaterializedPullRequestReviewerArgs)) *Client_CreateUnmaterializedPullRequestReviewer_Call { +func (_c *Client_CreateUnmaterializedPullRequestReviewer_Call) Run(run func(context1 context.Context, createUnmaterializedPullRequestReviewerArgs git.CreateUnmaterializedPullRequestReviewerArgs)) *Client_CreateUnmaterializedPullRequestReviewer_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.CreateUnmaterializedPullRequestReviewerArgs)) }) return _c } -func (_c *Client_CreateUnmaterializedPullRequestReviewer_Call) Return(_a0 *git.IdentityRefWithVote, _a1 error) *Client_CreateUnmaterializedPullRequestReviewer_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CreateUnmaterializedPullRequestReviewer_Call) Return(identityRefWithVote *git.IdentityRefWithVote, err error) *Client_CreateUnmaterializedPullRequestReviewer_Call { + _c.Call.Return(identityRefWithVote, err) return _c } -func (_c *Client_CreateUnmaterializedPullRequestReviewer_Call) RunAndReturn(run func(context.Context, git.CreateUnmaterializedPullRequestReviewerArgs) (*git.IdentityRefWithVote, error)) *Client_CreateUnmaterializedPullRequestReviewer_Call { +func (_c *Client_CreateUnmaterializedPullRequestReviewer_Call) RunAndReturn(run func(context1 context.Context, createUnmaterializedPullRequestReviewerArgs git.CreateUnmaterializedPullRequestReviewerArgs) (*git.IdentityRefWithVote, error)) *Client_CreateUnmaterializedPullRequestReviewer_Call { _c.Call.Return(run) return _c } -// DeleteAttachment provides a mock function with given fields: _a0, _a1 -func (_m *Client) DeleteAttachment(_a0 context.Context, _a1 git.DeleteAttachmentArgs) error { - ret := _m.Called(_a0, _a1) +// DeleteAttachment provides a mock function for the type Client +func (_mock *Client) DeleteAttachment(context1 context.Context, deleteAttachmentArgs git.DeleteAttachmentArgs) error { + ret := _mock.Called(context1, deleteAttachmentArgs) if len(ret) == 0 { panic("no return value specified for DeleteAttachment") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, git.DeleteAttachmentArgs) error); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.DeleteAttachmentArgs) error); ok { + r0 = returnFunc(context1, deleteAttachmentArgs) } else { r0 = ret.Error(0) } - return r0 } @@ -1279,44 +1250,43 @@ type Client_DeleteAttachment_Call struct { } // DeleteAttachment is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.DeleteAttachmentArgs -func (_e *Client_Expecter) DeleteAttachment(_a0 interface{}, _a1 interface{}) *Client_DeleteAttachment_Call { - return &Client_DeleteAttachment_Call{Call: _e.mock.On("DeleteAttachment", _a0, _a1)} +// - context1 +// - deleteAttachmentArgs +func (_e *Client_Expecter) DeleteAttachment(context1 interface{}, deleteAttachmentArgs interface{}) *Client_DeleteAttachment_Call { + return &Client_DeleteAttachment_Call{Call: _e.mock.On("DeleteAttachment", context1, deleteAttachmentArgs)} } -func (_c *Client_DeleteAttachment_Call) Run(run func(_a0 context.Context, _a1 git.DeleteAttachmentArgs)) *Client_DeleteAttachment_Call { +func (_c *Client_DeleteAttachment_Call) Run(run func(context1 context.Context, deleteAttachmentArgs git.DeleteAttachmentArgs)) *Client_DeleteAttachment_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.DeleteAttachmentArgs)) }) return _c } -func (_c *Client_DeleteAttachment_Call) Return(_a0 error) *Client_DeleteAttachment_Call { - _c.Call.Return(_a0) +func (_c *Client_DeleteAttachment_Call) Return(err error) *Client_DeleteAttachment_Call { + _c.Call.Return(err) return _c } -func (_c *Client_DeleteAttachment_Call) RunAndReturn(run func(context.Context, git.DeleteAttachmentArgs) error) *Client_DeleteAttachment_Call { +func (_c *Client_DeleteAttachment_Call) RunAndReturn(run func(context1 context.Context, deleteAttachmentArgs git.DeleteAttachmentArgs) error) *Client_DeleteAttachment_Call { _c.Call.Return(run) return _c } -// DeleteComment provides a mock function with given fields: _a0, _a1 -func (_m *Client) DeleteComment(_a0 context.Context, _a1 git.DeleteCommentArgs) error { - ret := _m.Called(_a0, _a1) +// DeleteComment provides a mock function for the type Client +func (_mock *Client) DeleteComment(context1 context.Context, deleteCommentArgs git.DeleteCommentArgs) error { + ret := _mock.Called(context1, deleteCommentArgs) if len(ret) == 0 { panic("no return value specified for DeleteComment") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, git.DeleteCommentArgs) error); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.DeleteCommentArgs) error); ok { + r0 = returnFunc(context1, deleteCommentArgs) } else { r0 = ret.Error(0) } - return r0 } @@ -1326,44 +1296,43 @@ type Client_DeleteComment_Call struct { } // DeleteComment is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.DeleteCommentArgs -func (_e *Client_Expecter) DeleteComment(_a0 interface{}, _a1 interface{}) *Client_DeleteComment_Call { - return &Client_DeleteComment_Call{Call: _e.mock.On("DeleteComment", _a0, _a1)} +// - context1 +// - deleteCommentArgs +func (_e *Client_Expecter) DeleteComment(context1 interface{}, deleteCommentArgs interface{}) *Client_DeleteComment_Call { + return &Client_DeleteComment_Call{Call: _e.mock.On("DeleteComment", context1, deleteCommentArgs)} } -func (_c *Client_DeleteComment_Call) Run(run func(_a0 context.Context, _a1 git.DeleteCommentArgs)) *Client_DeleteComment_Call { +func (_c *Client_DeleteComment_Call) Run(run func(context1 context.Context, deleteCommentArgs git.DeleteCommentArgs)) *Client_DeleteComment_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.DeleteCommentArgs)) }) return _c } -func (_c *Client_DeleteComment_Call) Return(_a0 error) *Client_DeleteComment_Call { - _c.Call.Return(_a0) +func (_c *Client_DeleteComment_Call) Return(err error) *Client_DeleteComment_Call { + _c.Call.Return(err) return _c } -func (_c *Client_DeleteComment_Call) RunAndReturn(run func(context.Context, git.DeleteCommentArgs) error) *Client_DeleteComment_Call { +func (_c *Client_DeleteComment_Call) RunAndReturn(run func(context1 context.Context, deleteCommentArgs git.DeleteCommentArgs) error) *Client_DeleteComment_Call { _c.Call.Return(run) return _c } -// DeleteLike provides a mock function with given fields: _a0, _a1 -func (_m *Client) DeleteLike(_a0 context.Context, _a1 git.DeleteLikeArgs) error { - ret := _m.Called(_a0, _a1) +// DeleteLike provides a mock function for the type Client +func (_mock *Client) DeleteLike(context1 context.Context, deleteLikeArgs git.DeleteLikeArgs) error { + ret := _mock.Called(context1, deleteLikeArgs) if len(ret) == 0 { panic("no return value specified for DeleteLike") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, git.DeleteLikeArgs) error); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.DeleteLikeArgs) error); ok { + r0 = returnFunc(context1, deleteLikeArgs) } else { r0 = ret.Error(0) } - return r0 } @@ -1373,44 +1342,43 @@ type Client_DeleteLike_Call struct { } // DeleteLike is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.DeleteLikeArgs -func (_e *Client_Expecter) DeleteLike(_a0 interface{}, _a1 interface{}) *Client_DeleteLike_Call { - return &Client_DeleteLike_Call{Call: _e.mock.On("DeleteLike", _a0, _a1)} +// - context1 +// - deleteLikeArgs +func (_e *Client_Expecter) DeleteLike(context1 interface{}, deleteLikeArgs interface{}) *Client_DeleteLike_Call { + return &Client_DeleteLike_Call{Call: _e.mock.On("DeleteLike", context1, deleteLikeArgs)} } -func (_c *Client_DeleteLike_Call) Run(run func(_a0 context.Context, _a1 git.DeleteLikeArgs)) *Client_DeleteLike_Call { +func (_c *Client_DeleteLike_Call) Run(run func(context1 context.Context, deleteLikeArgs git.DeleteLikeArgs)) *Client_DeleteLike_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.DeleteLikeArgs)) }) return _c } -func (_c *Client_DeleteLike_Call) Return(_a0 error) *Client_DeleteLike_Call { - _c.Call.Return(_a0) +func (_c *Client_DeleteLike_Call) Return(err error) *Client_DeleteLike_Call { + _c.Call.Return(err) return _c } -func (_c *Client_DeleteLike_Call) RunAndReturn(run func(context.Context, git.DeleteLikeArgs) error) *Client_DeleteLike_Call { +func (_c *Client_DeleteLike_Call) RunAndReturn(run func(context1 context.Context, deleteLikeArgs git.DeleteLikeArgs) error) *Client_DeleteLike_Call { _c.Call.Return(run) return _c } -// DeletePullRequestIterationStatus provides a mock function with given fields: _a0, _a1 -func (_m *Client) DeletePullRequestIterationStatus(_a0 context.Context, _a1 git.DeletePullRequestIterationStatusArgs) error { - ret := _m.Called(_a0, _a1) +// DeletePullRequestIterationStatus provides a mock function for the type Client +func (_mock *Client) DeletePullRequestIterationStatus(context1 context.Context, deletePullRequestIterationStatusArgs git.DeletePullRequestIterationStatusArgs) error { + ret := _mock.Called(context1, deletePullRequestIterationStatusArgs) if len(ret) == 0 { panic("no return value specified for DeletePullRequestIterationStatus") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, git.DeletePullRequestIterationStatusArgs) error); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.DeletePullRequestIterationStatusArgs) error); ok { + r0 = returnFunc(context1, deletePullRequestIterationStatusArgs) } else { r0 = ret.Error(0) } - return r0 } @@ -1420,44 +1388,43 @@ type Client_DeletePullRequestIterationStatus_Call struct { } // DeletePullRequestIterationStatus is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.DeletePullRequestIterationStatusArgs -func (_e *Client_Expecter) DeletePullRequestIterationStatus(_a0 interface{}, _a1 interface{}) *Client_DeletePullRequestIterationStatus_Call { - return &Client_DeletePullRequestIterationStatus_Call{Call: _e.mock.On("DeletePullRequestIterationStatus", _a0, _a1)} +// - context1 +// - deletePullRequestIterationStatusArgs +func (_e *Client_Expecter) DeletePullRequestIterationStatus(context1 interface{}, deletePullRequestIterationStatusArgs interface{}) *Client_DeletePullRequestIterationStatus_Call { + return &Client_DeletePullRequestIterationStatus_Call{Call: _e.mock.On("DeletePullRequestIterationStatus", context1, deletePullRequestIterationStatusArgs)} } -func (_c *Client_DeletePullRequestIterationStatus_Call) Run(run func(_a0 context.Context, _a1 git.DeletePullRequestIterationStatusArgs)) *Client_DeletePullRequestIterationStatus_Call { +func (_c *Client_DeletePullRequestIterationStatus_Call) Run(run func(context1 context.Context, deletePullRequestIterationStatusArgs git.DeletePullRequestIterationStatusArgs)) *Client_DeletePullRequestIterationStatus_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.DeletePullRequestIterationStatusArgs)) }) return _c } -func (_c *Client_DeletePullRequestIterationStatus_Call) Return(_a0 error) *Client_DeletePullRequestIterationStatus_Call { - _c.Call.Return(_a0) +func (_c *Client_DeletePullRequestIterationStatus_Call) Return(err error) *Client_DeletePullRequestIterationStatus_Call { + _c.Call.Return(err) return _c } -func (_c *Client_DeletePullRequestIterationStatus_Call) RunAndReturn(run func(context.Context, git.DeletePullRequestIterationStatusArgs) error) *Client_DeletePullRequestIterationStatus_Call { +func (_c *Client_DeletePullRequestIterationStatus_Call) RunAndReturn(run func(context1 context.Context, deletePullRequestIterationStatusArgs git.DeletePullRequestIterationStatusArgs) error) *Client_DeletePullRequestIterationStatus_Call { _c.Call.Return(run) return _c } -// DeletePullRequestLabels provides a mock function with given fields: _a0, _a1 -func (_m *Client) DeletePullRequestLabels(_a0 context.Context, _a1 git.DeletePullRequestLabelsArgs) error { - ret := _m.Called(_a0, _a1) +// DeletePullRequestLabels provides a mock function for the type Client +func (_mock *Client) DeletePullRequestLabels(context1 context.Context, deletePullRequestLabelsArgs git.DeletePullRequestLabelsArgs) error { + ret := _mock.Called(context1, deletePullRequestLabelsArgs) if len(ret) == 0 { panic("no return value specified for DeletePullRequestLabels") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, git.DeletePullRequestLabelsArgs) error); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.DeletePullRequestLabelsArgs) error); ok { + r0 = returnFunc(context1, deletePullRequestLabelsArgs) } else { r0 = ret.Error(0) } - return r0 } @@ -1467,44 +1434,43 @@ type Client_DeletePullRequestLabels_Call struct { } // DeletePullRequestLabels is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.DeletePullRequestLabelsArgs -func (_e *Client_Expecter) DeletePullRequestLabels(_a0 interface{}, _a1 interface{}) *Client_DeletePullRequestLabels_Call { - return &Client_DeletePullRequestLabels_Call{Call: _e.mock.On("DeletePullRequestLabels", _a0, _a1)} +// - context1 +// - deletePullRequestLabelsArgs +func (_e *Client_Expecter) DeletePullRequestLabels(context1 interface{}, deletePullRequestLabelsArgs interface{}) *Client_DeletePullRequestLabels_Call { + return &Client_DeletePullRequestLabels_Call{Call: _e.mock.On("DeletePullRequestLabels", context1, deletePullRequestLabelsArgs)} } -func (_c *Client_DeletePullRequestLabels_Call) Run(run func(_a0 context.Context, _a1 git.DeletePullRequestLabelsArgs)) *Client_DeletePullRequestLabels_Call { +func (_c *Client_DeletePullRequestLabels_Call) Run(run func(context1 context.Context, deletePullRequestLabelsArgs git.DeletePullRequestLabelsArgs)) *Client_DeletePullRequestLabels_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.DeletePullRequestLabelsArgs)) }) return _c } -func (_c *Client_DeletePullRequestLabels_Call) Return(_a0 error) *Client_DeletePullRequestLabels_Call { - _c.Call.Return(_a0) +func (_c *Client_DeletePullRequestLabels_Call) Return(err error) *Client_DeletePullRequestLabels_Call { + _c.Call.Return(err) return _c } -func (_c *Client_DeletePullRequestLabels_Call) RunAndReturn(run func(context.Context, git.DeletePullRequestLabelsArgs) error) *Client_DeletePullRequestLabels_Call { +func (_c *Client_DeletePullRequestLabels_Call) RunAndReturn(run func(context1 context.Context, deletePullRequestLabelsArgs git.DeletePullRequestLabelsArgs) error) *Client_DeletePullRequestLabels_Call { _c.Call.Return(run) return _c } -// DeletePullRequestReviewer provides a mock function with given fields: _a0, _a1 -func (_m *Client) DeletePullRequestReviewer(_a0 context.Context, _a1 git.DeletePullRequestReviewerArgs) error { - ret := _m.Called(_a0, _a1) +// DeletePullRequestReviewer provides a mock function for the type Client +func (_mock *Client) DeletePullRequestReviewer(context1 context.Context, deletePullRequestReviewerArgs git.DeletePullRequestReviewerArgs) error { + ret := _mock.Called(context1, deletePullRequestReviewerArgs) if len(ret) == 0 { panic("no return value specified for DeletePullRequestReviewer") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, git.DeletePullRequestReviewerArgs) error); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.DeletePullRequestReviewerArgs) error); ok { + r0 = returnFunc(context1, deletePullRequestReviewerArgs) } else { r0 = ret.Error(0) } - return r0 } @@ -1514,44 +1480,43 @@ type Client_DeletePullRequestReviewer_Call struct { } // DeletePullRequestReviewer is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.DeletePullRequestReviewerArgs -func (_e *Client_Expecter) DeletePullRequestReviewer(_a0 interface{}, _a1 interface{}) *Client_DeletePullRequestReviewer_Call { - return &Client_DeletePullRequestReviewer_Call{Call: _e.mock.On("DeletePullRequestReviewer", _a0, _a1)} +// - context1 +// - deletePullRequestReviewerArgs +func (_e *Client_Expecter) DeletePullRequestReviewer(context1 interface{}, deletePullRequestReviewerArgs interface{}) *Client_DeletePullRequestReviewer_Call { + return &Client_DeletePullRequestReviewer_Call{Call: _e.mock.On("DeletePullRequestReviewer", context1, deletePullRequestReviewerArgs)} } -func (_c *Client_DeletePullRequestReviewer_Call) Run(run func(_a0 context.Context, _a1 git.DeletePullRequestReviewerArgs)) *Client_DeletePullRequestReviewer_Call { +func (_c *Client_DeletePullRequestReviewer_Call) Run(run func(context1 context.Context, deletePullRequestReviewerArgs git.DeletePullRequestReviewerArgs)) *Client_DeletePullRequestReviewer_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.DeletePullRequestReviewerArgs)) }) return _c } -func (_c *Client_DeletePullRequestReviewer_Call) Return(_a0 error) *Client_DeletePullRequestReviewer_Call { - _c.Call.Return(_a0) +func (_c *Client_DeletePullRequestReviewer_Call) Return(err error) *Client_DeletePullRequestReviewer_Call { + _c.Call.Return(err) return _c } -func (_c *Client_DeletePullRequestReviewer_Call) RunAndReturn(run func(context.Context, git.DeletePullRequestReviewerArgs) error) *Client_DeletePullRequestReviewer_Call { +func (_c *Client_DeletePullRequestReviewer_Call) RunAndReturn(run func(context1 context.Context, deletePullRequestReviewerArgs git.DeletePullRequestReviewerArgs) error) *Client_DeletePullRequestReviewer_Call { _c.Call.Return(run) return _c } -// DeletePullRequestStatus provides a mock function with given fields: _a0, _a1 -func (_m *Client) DeletePullRequestStatus(_a0 context.Context, _a1 git.DeletePullRequestStatusArgs) error { - ret := _m.Called(_a0, _a1) +// DeletePullRequestStatus provides a mock function for the type Client +func (_mock *Client) DeletePullRequestStatus(context1 context.Context, deletePullRequestStatusArgs git.DeletePullRequestStatusArgs) error { + ret := _mock.Called(context1, deletePullRequestStatusArgs) if len(ret) == 0 { panic("no return value specified for DeletePullRequestStatus") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, git.DeletePullRequestStatusArgs) error); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.DeletePullRequestStatusArgs) error); ok { + r0 = returnFunc(context1, deletePullRequestStatusArgs) } else { r0 = ret.Error(0) } - return r0 } @@ -1561,44 +1526,43 @@ type Client_DeletePullRequestStatus_Call struct { } // DeletePullRequestStatus is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.DeletePullRequestStatusArgs -func (_e *Client_Expecter) DeletePullRequestStatus(_a0 interface{}, _a1 interface{}) *Client_DeletePullRequestStatus_Call { - return &Client_DeletePullRequestStatus_Call{Call: _e.mock.On("DeletePullRequestStatus", _a0, _a1)} +// - context1 +// - deletePullRequestStatusArgs +func (_e *Client_Expecter) DeletePullRequestStatus(context1 interface{}, deletePullRequestStatusArgs interface{}) *Client_DeletePullRequestStatus_Call { + return &Client_DeletePullRequestStatus_Call{Call: _e.mock.On("DeletePullRequestStatus", context1, deletePullRequestStatusArgs)} } -func (_c *Client_DeletePullRequestStatus_Call) Run(run func(_a0 context.Context, _a1 git.DeletePullRequestStatusArgs)) *Client_DeletePullRequestStatus_Call { +func (_c *Client_DeletePullRequestStatus_Call) Run(run func(context1 context.Context, deletePullRequestStatusArgs git.DeletePullRequestStatusArgs)) *Client_DeletePullRequestStatus_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.DeletePullRequestStatusArgs)) }) return _c } -func (_c *Client_DeletePullRequestStatus_Call) Return(_a0 error) *Client_DeletePullRequestStatus_Call { - _c.Call.Return(_a0) +func (_c *Client_DeletePullRequestStatus_Call) Return(err error) *Client_DeletePullRequestStatus_Call { + _c.Call.Return(err) return _c } -func (_c *Client_DeletePullRequestStatus_Call) RunAndReturn(run func(context.Context, git.DeletePullRequestStatusArgs) error) *Client_DeletePullRequestStatus_Call { +func (_c *Client_DeletePullRequestStatus_Call) RunAndReturn(run func(context1 context.Context, deletePullRequestStatusArgs git.DeletePullRequestStatusArgs) error) *Client_DeletePullRequestStatus_Call { _c.Call.Return(run) return _c } -// DeleteRefFavorite provides a mock function with given fields: _a0, _a1 -func (_m *Client) DeleteRefFavorite(_a0 context.Context, _a1 git.DeleteRefFavoriteArgs) error { - ret := _m.Called(_a0, _a1) +// DeleteRefFavorite provides a mock function for the type Client +func (_mock *Client) DeleteRefFavorite(context1 context.Context, deleteRefFavoriteArgs git.DeleteRefFavoriteArgs) error { + ret := _mock.Called(context1, deleteRefFavoriteArgs) if len(ret) == 0 { panic("no return value specified for DeleteRefFavorite") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, git.DeleteRefFavoriteArgs) error); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.DeleteRefFavoriteArgs) error); ok { + r0 = returnFunc(context1, deleteRefFavoriteArgs) } else { r0 = ret.Error(0) } - return r0 } @@ -1608,44 +1572,43 @@ type Client_DeleteRefFavorite_Call struct { } // DeleteRefFavorite is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.DeleteRefFavoriteArgs -func (_e *Client_Expecter) DeleteRefFavorite(_a0 interface{}, _a1 interface{}) *Client_DeleteRefFavorite_Call { - return &Client_DeleteRefFavorite_Call{Call: _e.mock.On("DeleteRefFavorite", _a0, _a1)} +// - context1 +// - deleteRefFavoriteArgs +func (_e *Client_Expecter) DeleteRefFavorite(context1 interface{}, deleteRefFavoriteArgs interface{}) *Client_DeleteRefFavorite_Call { + return &Client_DeleteRefFavorite_Call{Call: _e.mock.On("DeleteRefFavorite", context1, deleteRefFavoriteArgs)} } -func (_c *Client_DeleteRefFavorite_Call) Run(run func(_a0 context.Context, _a1 git.DeleteRefFavoriteArgs)) *Client_DeleteRefFavorite_Call { +func (_c *Client_DeleteRefFavorite_Call) Run(run func(context1 context.Context, deleteRefFavoriteArgs git.DeleteRefFavoriteArgs)) *Client_DeleteRefFavorite_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.DeleteRefFavoriteArgs)) }) return _c } -func (_c *Client_DeleteRefFavorite_Call) Return(_a0 error) *Client_DeleteRefFavorite_Call { - _c.Call.Return(_a0) +func (_c *Client_DeleteRefFavorite_Call) Return(err error) *Client_DeleteRefFavorite_Call { + _c.Call.Return(err) return _c } -func (_c *Client_DeleteRefFavorite_Call) RunAndReturn(run func(context.Context, git.DeleteRefFavoriteArgs) error) *Client_DeleteRefFavorite_Call { +func (_c *Client_DeleteRefFavorite_Call) RunAndReturn(run func(context1 context.Context, deleteRefFavoriteArgs git.DeleteRefFavoriteArgs) error) *Client_DeleteRefFavorite_Call { _c.Call.Return(run) return _c } -// DeleteRepository provides a mock function with given fields: _a0, _a1 -func (_m *Client) DeleteRepository(_a0 context.Context, _a1 git.DeleteRepositoryArgs) error { - ret := _m.Called(_a0, _a1) +// DeleteRepository provides a mock function for the type Client +func (_mock *Client) DeleteRepository(context1 context.Context, deleteRepositoryArgs git.DeleteRepositoryArgs) error { + ret := _mock.Called(context1, deleteRepositoryArgs) if len(ret) == 0 { panic("no return value specified for DeleteRepository") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, git.DeleteRepositoryArgs) error); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.DeleteRepositoryArgs) error); ok { + r0 = returnFunc(context1, deleteRepositoryArgs) } else { r0 = ret.Error(0) } - return r0 } @@ -1655,44 +1618,43 @@ type Client_DeleteRepository_Call struct { } // DeleteRepository is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.DeleteRepositoryArgs -func (_e *Client_Expecter) DeleteRepository(_a0 interface{}, _a1 interface{}) *Client_DeleteRepository_Call { - return &Client_DeleteRepository_Call{Call: _e.mock.On("DeleteRepository", _a0, _a1)} +// - context1 +// - deleteRepositoryArgs +func (_e *Client_Expecter) DeleteRepository(context1 interface{}, deleteRepositoryArgs interface{}) *Client_DeleteRepository_Call { + return &Client_DeleteRepository_Call{Call: _e.mock.On("DeleteRepository", context1, deleteRepositoryArgs)} } -func (_c *Client_DeleteRepository_Call) Run(run func(_a0 context.Context, _a1 git.DeleteRepositoryArgs)) *Client_DeleteRepository_Call { +func (_c *Client_DeleteRepository_Call) Run(run func(context1 context.Context, deleteRepositoryArgs git.DeleteRepositoryArgs)) *Client_DeleteRepository_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.DeleteRepositoryArgs)) }) return _c } -func (_c *Client_DeleteRepository_Call) Return(_a0 error) *Client_DeleteRepository_Call { - _c.Call.Return(_a0) +func (_c *Client_DeleteRepository_Call) Return(err error) *Client_DeleteRepository_Call { + _c.Call.Return(err) return _c } -func (_c *Client_DeleteRepository_Call) RunAndReturn(run func(context.Context, git.DeleteRepositoryArgs) error) *Client_DeleteRepository_Call { +func (_c *Client_DeleteRepository_Call) RunAndReturn(run func(context1 context.Context, deleteRepositoryArgs git.DeleteRepositoryArgs) error) *Client_DeleteRepository_Call { _c.Call.Return(run) return _c } -// DeleteRepositoryFromRecycleBin provides a mock function with given fields: _a0, _a1 -func (_m *Client) DeleteRepositoryFromRecycleBin(_a0 context.Context, _a1 git.DeleteRepositoryFromRecycleBinArgs) error { - ret := _m.Called(_a0, _a1) +// DeleteRepositoryFromRecycleBin provides a mock function for the type Client +func (_mock *Client) DeleteRepositoryFromRecycleBin(context1 context.Context, deleteRepositoryFromRecycleBinArgs git.DeleteRepositoryFromRecycleBinArgs) error { + ret := _mock.Called(context1, deleteRepositoryFromRecycleBinArgs) if len(ret) == 0 { panic("no return value specified for DeleteRepositoryFromRecycleBin") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, git.DeleteRepositoryFromRecycleBinArgs) error); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.DeleteRepositoryFromRecycleBinArgs) error); ok { + r0 = returnFunc(context1, deleteRepositoryFromRecycleBinArgs) } else { r0 = ret.Error(0) } - return r0 } @@ -1702,32 +1664,32 @@ type Client_DeleteRepositoryFromRecycleBin_Call struct { } // DeleteRepositoryFromRecycleBin is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.DeleteRepositoryFromRecycleBinArgs -func (_e *Client_Expecter) DeleteRepositoryFromRecycleBin(_a0 interface{}, _a1 interface{}) *Client_DeleteRepositoryFromRecycleBin_Call { - return &Client_DeleteRepositoryFromRecycleBin_Call{Call: _e.mock.On("DeleteRepositoryFromRecycleBin", _a0, _a1)} +// - context1 +// - deleteRepositoryFromRecycleBinArgs +func (_e *Client_Expecter) DeleteRepositoryFromRecycleBin(context1 interface{}, deleteRepositoryFromRecycleBinArgs interface{}) *Client_DeleteRepositoryFromRecycleBin_Call { + return &Client_DeleteRepositoryFromRecycleBin_Call{Call: _e.mock.On("DeleteRepositoryFromRecycleBin", context1, deleteRepositoryFromRecycleBinArgs)} } -func (_c *Client_DeleteRepositoryFromRecycleBin_Call) Run(run func(_a0 context.Context, _a1 git.DeleteRepositoryFromRecycleBinArgs)) *Client_DeleteRepositoryFromRecycleBin_Call { +func (_c *Client_DeleteRepositoryFromRecycleBin_Call) Run(run func(context1 context.Context, deleteRepositoryFromRecycleBinArgs git.DeleteRepositoryFromRecycleBinArgs)) *Client_DeleteRepositoryFromRecycleBin_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.DeleteRepositoryFromRecycleBinArgs)) }) return _c } -func (_c *Client_DeleteRepositoryFromRecycleBin_Call) Return(_a0 error) *Client_DeleteRepositoryFromRecycleBin_Call { - _c.Call.Return(_a0) +func (_c *Client_DeleteRepositoryFromRecycleBin_Call) Return(err error) *Client_DeleteRepositoryFromRecycleBin_Call { + _c.Call.Return(err) return _c } -func (_c *Client_DeleteRepositoryFromRecycleBin_Call) RunAndReturn(run func(context.Context, git.DeleteRepositoryFromRecycleBinArgs) error) *Client_DeleteRepositoryFromRecycleBin_Call { +func (_c *Client_DeleteRepositoryFromRecycleBin_Call) RunAndReturn(run func(context1 context.Context, deleteRepositoryFromRecycleBinArgs git.DeleteRepositoryFromRecycleBinArgs) error) *Client_DeleteRepositoryFromRecycleBin_Call { _c.Call.Return(run) return _c } -// GetAnnotatedTag provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetAnnotatedTag(_a0 context.Context, _a1 git.GetAnnotatedTagArgs) (*git.GitAnnotatedTag, error) { - ret := _m.Called(_a0, _a1) +// GetAnnotatedTag provides a mock function for the type Client +func (_mock *Client) GetAnnotatedTag(context1 context.Context, getAnnotatedTagArgs git.GetAnnotatedTagArgs) (*git.GitAnnotatedTag, error) { + ret := _mock.Called(context1, getAnnotatedTagArgs) if len(ret) == 0 { panic("no return value specified for GetAnnotatedTag") @@ -1735,23 +1697,21 @@ func (_m *Client) GetAnnotatedTag(_a0 context.Context, _a1 git.GetAnnotatedTagAr var r0 *git.GitAnnotatedTag var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetAnnotatedTagArgs) (*git.GitAnnotatedTag, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetAnnotatedTagArgs) (*git.GitAnnotatedTag, error)); ok { + return returnFunc(context1, getAnnotatedTagArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetAnnotatedTagArgs) *git.GitAnnotatedTag); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetAnnotatedTagArgs) *git.GitAnnotatedTag); ok { + r0 = returnFunc(context1, getAnnotatedTagArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitAnnotatedTag) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetAnnotatedTagArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetAnnotatedTagArgs) error); ok { + r1 = returnFunc(context1, getAnnotatedTagArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1761,32 +1721,32 @@ type Client_GetAnnotatedTag_Call struct { } // GetAnnotatedTag is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetAnnotatedTagArgs -func (_e *Client_Expecter) GetAnnotatedTag(_a0 interface{}, _a1 interface{}) *Client_GetAnnotatedTag_Call { - return &Client_GetAnnotatedTag_Call{Call: _e.mock.On("GetAnnotatedTag", _a0, _a1)} +// - context1 +// - getAnnotatedTagArgs +func (_e *Client_Expecter) GetAnnotatedTag(context1 interface{}, getAnnotatedTagArgs interface{}) *Client_GetAnnotatedTag_Call { + return &Client_GetAnnotatedTag_Call{Call: _e.mock.On("GetAnnotatedTag", context1, getAnnotatedTagArgs)} } -func (_c *Client_GetAnnotatedTag_Call) Run(run func(_a0 context.Context, _a1 git.GetAnnotatedTagArgs)) *Client_GetAnnotatedTag_Call { +func (_c *Client_GetAnnotatedTag_Call) Run(run func(context1 context.Context, getAnnotatedTagArgs git.GetAnnotatedTagArgs)) *Client_GetAnnotatedTag_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetAnnotatedTagArgs)) }) return _c } -func (_c *Client_GetAnnotatedTag_Call) Return(_a0 *git.GitAnnotatedTag, _a1 error) *Client_GetAnnotatedTag_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetAnnotatedTag_Call) Return(gitAnnotatedTag *git.GitAnnotatedTag, err error) *Client_GetAnnotatedTag_Call { + _c.Call.Return(gitAnnotatedTag, err) return _c } -func (_c *Client_GetAnnotatedTag_Call) RunAndReturn(run func(context.Context, git.GetAnnotatedTagArgs) (*git.GitAnnotatedTag, error)) *Client_GetAnnotatedTag_Call { +func (_c *Client_GetAnnotatedTag_Call) RunAndReturn(run func(context1 context.Context, getAnnotatedTagArgs git.GetAnnotatedTagArgs) (*git.GitAnnotatedTag, error)) *Client_GetAnnotatedTag_Call { _c.Call.Return(run) return _c } -// GetAttachmentContent provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetAttachmentContent(_a0 context.Context, _a1 git.GetAttachmentContentArgs) (io.ReadCloser, error) { - ret := _m.Called(_a0, _a1) +// GetAttachmentContent provides a mock function for the type Client +func (_mock *Client) GetAttachmentContent(context1 context.Context, getAttachmentContentArgs git.GetAttachmentContentArgs) (io.ReadCloser, error) { + ret := _mock.Called(context1, getAttachmentContentArgs) if len(ret) == 0 { panic("no return value specified for GetAttachmentContent") @@ -1794,23 +1754,21 @@ func (_m *Client) GetAttachmentContent(_a0 context.Context, _a1 git.GetAttachmen var r0 io.ReadCloser var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetAttachmentContentArgs) (io.ReadCloser, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetAttachmentContentArgs) (io.ReadCloser, error)); ok { + return returnFunc(context1, getAttachmentContentArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetAttachmentContentArgs) io.ReadCloser); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetAttachmentContentArgs) io.ReadCloser); ok { + r0 = returnFunc(context1, getAttachmentContentArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(io.ReadCloser) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetAttachmentContentArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetAttachmentContentArgs) error); ok { + r1 = returnFunc(context1, getAttachmentContentArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1820,32 +1778,32 @@ type Client_GetAttachmentContent_Call struct { } // GetAttachmentContent is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetAttachmentContentArgs -func (_e *Client_Expecter) GetAttachmentContent(_a0 interface{}, _a1 interface{}) *Client_GetAttachmentContent_Call { - return &Client_GetAttachmentContent_Call{Call: _e.mock.On("GetAttachmentContent", _a0, _a1)} +// - context1 +// - getAttachmentContentArgs +func (_e *Client_Expecter) GetAttachmentContent(context1 interface{}, getAttachmentContentArgs interface{}) *Client_GetAttachmentContent_Call { + return &Client_GetAttachmentContent_Call{Call: _e.mock.On("GetAttachmentContent", context1, getAttachmentContentArgs)} } -func (_c *Client_GetAttachmentContent_Call) Run(run func(_a0 context.Context, _a1 git.GetAttachmentContentArgs)) *Client_GetAttachmentContent_Call { +func (_c *Client_GetAttachmentContent_Call) Run(run func(context1 context.Context, getAttachmentContentArgs git.GetAttachmentContentArgs)) *Client_GetAttachmentContent_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetAttachmentContentArgs)) }) return _c } -func (_c *Client_GetAttachmentContent_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetAttachmentContent_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetAttachmentContent_Call) Return(readCloser io.ReadCloser, err error) *Client_GetAttachmentContent_Call { + _c.Call.Return(readCloser, err) return _c } -func (_c *Client_GetAttachmentContent_Call) RunAndReturn(run func(context.Context, git.GetAttachmentContentArgs) (io.ReadCloser, error)) *Client_GetAttachmentContent_Call { +func (_c *Client_GetAttachmentContent_Call) RunAndReturn(run func(context1 context.Context, getAttachmentContentArgs git.GetAttachmentContentArgs) (io.ReadCloser, error)) *Client_GetAttachmentContent_Call { _c.Call.Return(run) return _c } -// GetAttachmentZip provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetAttachmentZip(_a0 context.Context, _a1 git.GetAttachmentZipArgs) (io.ReadCloser, error) { - ret := _m.Called(_a0, _a1) +// GetAttachmentZip provides a mock function for the type Client +func (_mock *Client) GetAttachmentZip(context1 context.Context, getAttachmentZipArgs git.GetAttachmentZipArgs) (io.ReadCloser, error) { + ret := _mock.Called(context1, getAttachmentZipArgs) if len(ret) == 0 { panic("no return value specified for GetAttachmentZip") @@ -1853,23 +1811,21 @@ func (_m *Client) GetAttachmentZip(_a0 context.Context, _a1 git.GetAttachmentZip var r0 io.ReadCloser var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetAttachmentZipArgs) (io.ReadCloser, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetAttachmentZipArgs) (io.ReadCloser, error)); ok { + return returnFunc(context1, getAttachmentZipArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetAttachmentZipArgs) io.ReadCloser); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetAttachmentZipArgs) io.ReadCloser); ok { + r0 = returnFunc(context1, getAttachmentZipArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(io.ReadCloser) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetAttachmentZipArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetAttachmentZipArgs) error); ok { + r1 = returnFunc(context1, getAttachmentZipArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1879,32 +1835,32 @@ type Client_GetAttachmentZip_Call struct { } // GetAttachmentZip is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetAttachmentZipArgs -func (_e *Client_Expecter) GetAttachmentZip(_a0 interface{}, _a1 interface{}) *Client_GetAttachmentZip_Call { - return &Client_GetAttachmentZip_Call{Call: _e.mock.On("GetAttachmentZip", _a0, _a1)} +// - context1 +// - getAttachmentZipArgs +func (_e *Client_Expecter) GetAttachmentZip(context1 interface{}, getAttachmentZipArgs interface{}) *Client_GetAttachmentZip_Call { + return &Client_GetAttachmentZip_Call{Call: _e.mock.On("GetAttachmentZip", context1, getAttachmentZipArgs)} } -func (_c *Client_GetAttachmentZip_Call) Run(run func(_a0 context.Context, _a1 git.GetAttachmentZipArgs)) *Client_GetAttachmentZip_Call { +func (_c *Client_GetAttachmentZip_Call) Run(run func(context1 context.Context, getAttachmentZipArgs git.GetAttachmentZipArgs)) *Client_GetAttachmentZip_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetAttachmentZipArgs)) }) return _c } -func (_c *Client_GetAttachmentZip_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetAttachmentZip_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetAttachmentZip_Call) Return(readCloser io.ReadCloser, err error) *Client_GetAttachmentZip_Call { + _c.Call.Return(readCloser, err) return _c } -func (_c *Client_GetAttachmentZip_Call) RunAndReturn(run func(context.Context, git.GetAttachmentZipArgs) (io.ReadCloser, error)) *Client_GetAttachmentZip_Call { +func (_c *Client_GetAttachmentZip_Call) RunAndReturn(run func(context1 context.Context, getAttachmentZipArgs git.GetAttachmentZipArgs) (io.ReadCloser, error)) *Client_GetAttachmentZip_Call { _c.Call.Return(run) return _c } -// GetAttachments provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetAttachments(_a0 context.Context, _a1 git.GetAttachmentsArgs) (*[]git.Attachment, error) { - ret := _m.Called(_a0, _a1) +// GetAttachments provides a mock function for the type Client +func (_mock *Client) GetAttachments(context1 context.Context, getAttachmentsArgs git.GetAttachmentsArgs) (*[]git.Attachment, error) { + ret := _mock.Called(context1, getAttachmentsArgs) if len(ret) == 0 { panic("no return value specified for GetAttachments") @@ -1912,23 +1868,21 @@ func (_m *Client) GetAttachments(_a0 context.Context, _a1 git.GetAttachmentsArgs var r0 *[]git.Attachment var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetAttachmentsArgs) (*[]git.Attachment, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetAttachmentsArgs) (*[]git.Attachment, error)); ok { + return returnFunc(context1, getAttachmentsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetAttachmentsArgs) *[]git.Attachment); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetAttachmentsArgs) *[]git.Attachment); ok { + r0 = returnFunc(context1, getAttachmentsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.Attachment) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetAttachmentsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetAttachmentsArgs) error); ok { + r1 = returnFunc(context1, getAttachmentsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1938,32 +1892,32 @@ type Client_GetAttachments_Call struct { } // GetAttachments is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetAttachmentsArgs -func (_e *Client_Expecter) GetAttachments(_a0 interface{}, _a1 interface{}) *Client_GetAttachments_Call { - return &Client_GetAttachments_Call{Call: _e.mock.On("GetAttachments", _a0, _a1)} +// - context1 +// - getAttachmentsArgs +func (_e *Client_Expecter) GetAttachments(context1 interface{}, getAttachmentsArgs interface{}) *Client_GetAttachments_Call { + return &Client_GetAttachments_Call{Call: _e.mock.On("GetAttachments", context1, getAttachmentsArgs)} } -func (_c *Client_GetAttachments_Call) Run(run func(_a0 context.Context, _a1 git.GetAttachmentsArgs)) *Client_GetAttachments_Call { +func (_c *Client_GetAttachments_Call) Run(run func(context1 context.Context, getAttachmentsArgs git.GetAttachmentsArgs)) *Client_GetAttachments_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetAttachmentsArgs)) }) return _c } -func (_c *Client_GetAttachments_Call) Return(_a0 *[]git.Attachment, _a1 error) *Client_GetAttachments_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetAttachments_Call) Return(attachments *[]git.Attachment, err error) *Client_GetAttachments_Call { + _c.Call.Return(attachments, err) return _c } -func (_c *Client_GetAttachments_Call) RunAndReturn(run func(context.Context, git.GetAttachmentsArgs) (*[]git.Attachment, error)) *Client_GetAttachments_Call { +func (_c *Client_GetAttachments_Call) RunAndReturn(run func(context1 context.Context, getAttachmentsArgs git.GetAttachmentsArgs) (*[]git.Attachment, error)) *Client_GetAttachments_Call { _c.Call.Return(run) return _c } -// GetBlob provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetBlob(_a0 context.Context, _a1 git.GetBlobArgs) (*git.GitBlobRef, error) { - ret := _m.Called(_a0, _a1) +// GetBlob provides a mock function for the type Client +func (_mock *Client) GetBlob(context1 context.Context, getBlobArgs git.GetBlobArgs) (*git.GitBlobRef, error) { + ret := _mock.Called(context1, getBlobArgs) if len(ret) == 0 { panic("no return value specified for GetBlob") @@ -1971,23 +1925,21 @@ func (_m *Client) GetBlob(_a0 context.Context, _a1 git.GetBlobArgs) (*git.GitBlo var r0 *git.GitBlobRef var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetBlobArgs) (*git.GitBlobRef, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetBlobArgs) (*git.GitBlobRef, error)); ok { + return returnFunc(context1, getBlobArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetBlobArgs) *git.GitBlobRef); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetBlobArgs) *git.GitBlobRef); ok { + r0 = returnFunc(context1, getBlobArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitBlobRef) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetBlobArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetBlobArgs) error); ok { + r1 = returnFunc(context1, getBlobArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1997,32 +1949,32 @@ type Client_GetBlob_Call struct { } // GetBlob is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetBlobArgs -func (_e *Client_Expecter) GetBlob(_a0 interface{}, _a1 interface{}) *Client_GetBlob_Call { - return &Client_GetBlob_Call{Call: _e.mock.On("GetBlob", _a0, _a1)} +// - context1 +// - getBlobArgs +func (_e *Client_Expecter) GetBlob(context1 interface{}, getBlobArgs interface{}) *Client_GetBlob_Call { + return &Client_GetBlob_Call{Call: _e.mock.On("GetBlob", context1, getBlobArgs)} } -func (_c *Client_GetBlob_Call) Run(run func(_a0 context.Context, _a1 git.GetBlobArgs)) *Client_GetBlob_Call { +func (_c *Client_GetBlob_Call) Run(run func(context1 context.Context, getBlobArgs git.GetBlobArgs)) *Client_GetBlob_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetBlobArgs)) }) return _c } -func (_c *Client_GetBlob_Call) Return(_a0 *git.GitBlobRef, _a1 error) *Client_GetBlob_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetBlob_Call) Return(gitBlobRef *git.GitBlobRef, err error) *Client_GetBlob_Call { + _c.Call.Return(gitBlobRef, err) return _c } -func (_c *Client_GetBlob_Call) RunAndReturn(run func(context.Context, git.GetBlobArgs) (*git.GitBlobRef, error)) *Client_GetBlob_Call { +func (_c *Client_GetBlob_Call) RunAndReturn(run func(context1 context.Context, getBlobArgs git.GetBlobArgs) (*git.GitBlobRef, error)) *Client_GetBlob_Call { _c.Call.Return(run) return _c } -// GetBlobContent provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetBlobContent(_a0 context.Context, _a1 git.GetBlobContentArgs) (io.ReadCloser, error) { - ret := _m.Called(_a0, _a1) +// GetBlobContent provides a mock function for the type Client +func (_mock *Client) GetBlobContent(context1 context.Context, getBlobContentArgs git.GetBlobContentArgs) (io.ReadCloser, error) { + ret := _mock.Called(context1, getBlobContentArgs) if len(ret) == 0 { panic("no return value specified for GetBlobContent") @@ -2030,23 +1982,21 @@ func (_m *Client) GetBlobContent(_a0 context.Context, _a1 git.GetBlobContentArgs var r0 io.ReadCloser var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetBlobContentArgs) (io.ReadCloser, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetBlobContentArgs) (io.ReadCloser, error)); ok { + return returnFunc(context1, getBlobContentArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetBlobContentArgs) io.ReadCloser); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetBlobContentArgs) io.ReadCloser); ok { + r0 = returnFunc(context1, getBlobContentArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(io.ReadCloser) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetBlobContentArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetBlobContentArgs) error); ok { + r1 = returnFunc(context1, getBlobContentArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2056,32 +2006,32 @@ type Client_GetBlobContent_Call struct { } // GetBlobContent is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetBlobContentArgs -func (_e *Client_Expecter) GetBlobContent(_a0 interface{}, _a1 interface{}) *Client_GetBlobContent_Call { - return &Client_GetBlobContent_Call{Call: _e.mock.On("GetBlobContent", _a0, _a1)} +// - context1 +// - getBlobContentArgs +func (_e *Client_Expecter) GetBlobContent(context1 interface{}, getBlobContentArgs interface{}) *Client_GetBlobContent_Call { + return &Client_GetBlobContent_Call{Call: _e.mock.On("GetBlobContent", context1, getBlobContentArgs)} } -func (_c *Client_GetBlobContent_Call) Run(run func(_a0 context.Context, _a1 git.GetBlobContentArgs)) *Client_GetBlobContent_Call { +func (_c *Client_GetBlobContent_Call) Run(run func(context1 context.Context, getBlobContentArgs git.GetBlobContentArgs)) *Client_GetBlobContent_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetBlobContentArgs)) }) return _c } -func (_c *Client_GetBlobContent_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetBlobContent_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetBlobContent_Call) Return(readCloser io.ReadCloser, err error) *Client_GetBlobContent_Call { + _c.Call.Return(readCloser, err) return _c } -func (_c *Client_GetBlobContent_Call) RunAndReturn(run func(context.Context, git.GetBlobContentArgs) (io.ReadCloser, error)) *Client_GetBlobContent_Call { +func (_c *Client_GetBlobContent_Call) RunAndReturn(run func(context1 context.Context, getBlobContentArgs git.GetBlobContentArgs) (io.ReadCloser, error)) *Client_GetBlobContent_Call { _c.Call.Return(run) return _c } -// GetBlobZip provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetBlobZip(_a0 context.Context, _a1 git.GetBlobZipArgs) (io.ReadCloser, error) { - ret := _m.Called(_a0, _a1) +// GetBlobZip provides a mock function for the type Client +func (_mock *Client) GetBlobZip(context1 context.Context, getBlobZipArgs git.GetBlobZipArgs) (io.ReadCloser, error) { + ret := _mock.Called(context1, getBlobZipArgs) if len(ret) == 0 { panic("no return value specified for GetBlobZip") @@ -2089,23 +2039,21 @@ func (_m *Client) GetBlobZip(_a0 context.Context, _a1 git.GetBlobZipArgs) (io.Re var r0 io.ReadCloser var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetBlobZipArgs) (io.ReadCloser, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetBlobZipArgs) (io.ReadCloser, error)); ok { + return returnFunc(context1, getBlobZipArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetBlobZipArgs) io.ReadCloser); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetBlobZipArgs) io.ReadCloser); ok { + r0 = returnFunc(context1, getBlobZipArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(io.ReadCloser) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetBlobZipArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetBlobZipArgs) error); ok { + r1 = returnFunc(context1, getBlobZipArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2115,32 +2063,32 @@ type Client_GetBlobZip_Call struct { } // GetBlobZip is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetBlobZipArgs -func (_e *Client_Expecter) GetBlobZip(_a0 interface{}, _a1 interface{}) *Client_GetBlobZip_Call { - return &Client_GetBlobZip_Call{Call: _e.mock.On("GetBlobZip", _a0, _a1)} +// - context1 +// - getBlobZipArgs +func (_e *Client_Expecter) GetBlobZip(context1 interface{}, getBlobZipArgs interface{}) *Client_GetBlobZip_Call { + return &Client_GetBlobZip_Call{Call: _e.mock.On("GetBlobZip", context1, getBlobZipArgs)} } -func (_c *Client_GetBlobZip_Call) Run(run func(_a0 context.Context, _a1 git.GetBlobZipArgs)) *Client_GetBlobZip_Call { +func (_c *Client_GetBlobZip_Call) Run(run func(context1 context.Context, getBlobZipArgs git.GetBlobZipArgs)) *Client_GetBlobZip_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetBlobZipArgs)) }) return _c } -func (_c *Client_GetBlobZip_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetBlobZip_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetBlobZip_Call) Return(readCloser io.ReadCloser, err error) *Client_GetBlobZip_Call { + _c.Call.Return(readCloser, err) return _c } -func (_c *Client_GetBlobZip_Call) RunAndReturn(run func(context.Context, git.GetBlobZipArgs) (io.ReadCloser, error)) *Client_GetBlobZip_Call { +func (_c *Client_GetBlobZip_Call) RunAndReturn(run func(context1 context.Context, getBlobZipArgs git.GetBlobZipArgs) (io.ReadCloser, error)) *Client_GetBlobZip_Call { _c.Call.Return(run) return _c } -// GetBlobsZip provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetBlobsZip(_a0 context.Context, _a1 git.GetBlobsZipArgs) (io.ReadCloser, error) { - ret := _m.Called(_a0, _a1) +// GetBlobsZip provides a mock function for the type Client +func (_mock *Client) GetBlobsZip(context1 context.Context, getBlobsZipArgs git.GetBlobsZipArgs) (io.ReadCloser, error) { + ret := _mock.Called(context1, getBlobsZipArgs) if len(ret) == 0 { panic("no return value specified for GetBlobsZip") @@ -2148,23 +2096,21 @@ func (_m *Client) GetBlobsZip(_a0 context.Context, _a1 git.GetBlobsZipArgs) (io. var r0 io.ReadCloser var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetBlobsZipArgs) (io.ReadCloser, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetBlobsZipArgs) (io.ReadCloser, error)); ok { + return returnFunc(context1, getBlobsZipArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetBlobsZipArgs) io.ReadCloser); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetBlobsZipArgs) io.ReadCloser); ok { + r0 = returnFunc(context1, getBlobsZipArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(io.ReadCloser) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetBlobsZipArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetBlobsZipArgs) error); ok { + r1 = returnFunc(context1, getBlobsZipArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2174,32 +2120,32 @@ type Client_GetBlobsZip_Call struct { } // GetBlobsZip is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetBlobsZipArgs -func (_e *Client_Expecter) GetBlobsZip(_a0 interface{}, _a1 interface{}) *Client_GetBlobsZip_Call { - return &Client_GetBlobsZip_Call{Call: _e.mock.On("GetBlobsZip", _a0, _a1)} +// - context1 +// - getBlobsZipArgs +func (_e *Client_Expecter) GetBlobsZip(context1 interface{}, getBlobsZipArgs interface{}) *Client_GetBlobsZip_Call { + return &Client_GetBlobsZip_Call{Call: _e.mock.On("GetBlobsZip", context1, getBlobsZipArgs)} } -func (_c *Client_GetBlobsZip_Call) Run(run func(_a0 context.Context, _a1 git.GetBlobsZipArgs)) *Client_GetBlobsZip_Call { +func (_c *Client_GetBlobsZip_Call) Run(run func(context1 context.Context, getBlobsZipArgs git.GetBlobsZipArgs)) *Client_GetBlobsZip_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetBlobsZipArgs)) }) return _c } -func (_c *Client_GetBlobsZip_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetBlobsZip_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetBlobsZip_Call) Return(readCloser io.ReadCloser, err error) *Client_GetBlobsZip_Call { + _c.Call.Return(readCloser, err) return _c } -func (_c *Client_GetBlobsZip_Call) RunAndReturn(run func(context.Context, git.GetBlobsZipArgs) (io.ReadCloser, error)) *Client_GetBlobsZip_Call { +func (_c *Client_GetBlobsZip_Call) RunAndReturn(run func(context1 context.Context, getBlobsZipArgs git.GetBlobsZipArgs) (io.ReadCloser, error)) *Client_GetBlobsZip_Call { _c.Call.Return(run) return _c } -// GetBranch provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetBranch(_a0 context.Context, _a1 git.GetBranchArgs) (*git.GitBranchStats, error) { - ret := _m.Called(_a0, _a1) +// GetBranch provides a mock function for the type Client +func (_mock *Client) GetBranch(context1 context.Context, getBranchArgs git.GetBranchArgs) (*git.GitBranchStats, error) { + ret := _mock.Called(context1, getBranchArgs) if len(ret) == 0 { panic("no return value specified for GetBranch") @@ -2207,23 +2153,21 @@ func (_m *Client) GetBranch(_a0 context.Context, _a1 git.GetBranchArgs) (*git.Gi var r0 *git.GitBranchStats var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetBranchArgs) (*git.GitBranchStats, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetBranchArgs) (*git.GitBranchStats, error)); ok { + return returnFunc(context1, getBranchArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetBranchArgs) *git.GitBranchStats); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetBranchArgs) *git.GitBranchStats); ok { + r0 = returnFunc(context1, getBranchArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitBranchStats) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetBranchArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetBranchArgs) error); ok { + r1 = returnFunc(context1, getBranchArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2233,32 +2177,32 @@ type Client_GetBranch_Call struct { } // GetBranch is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetBranchArgs -func (_e *Client_Expecter) GetBranch(_a0 interface{}, _a1 interface{}) *Client_GetBranch_Call { - return &Client_GetBranch_Call{Call: _e.mock.On("GetBranch", _a0, _a1)} +// - context1 +// - getBranchArgs +func (_e *Client_Expecter) GetBranch(context1 interface{}, getBranchArgs interface{}) *Client_GetBranch_Call { + return &Client_GetBranch_Call{Call: _e.mock.On("GetBranch", context1, getBranchArgs)} } -func (_c *Client_GetBranch_Call) Run(run func(_a0 context.Context, _a1 git.GetBranchArgs)) *Client_GetBranch_Call { +func (_c *Client_GetBranch_Call) Run(run func(context1 context.Context, getBranchArgs git.GetBranchArgs)) *Client_GetBranch_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetBranchArgs)) }) return _c } -func (_c *Client_GetBranch_Call) Return(_a0 *git.GitBranchStats, _a1 error) *Client_GetBranch_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetBranch_Call) Return(gitBranchStats *git.GitBranchStats, err error) *Client_GetBranch_Call { + _c.Call.Return(gitBranchStats, err) return _c } -func (_c *Client_GetBranch_Call) RunAndReturn(run func(context.Context, git.GetBranchArgs) (*git.GitBranchStats, error)) *Client_GetBranch_Call { +func (_c *Client_GetBranch_Call) RunAndReturn(run func(context1 context.Context, getBranchArgs git.GetBranchArgs) (*git.GitBranchStats, error)) *Client_GetBranch_Call { _c.Call.Return(run) return _c } -// GetBranches provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetBranches(_a0 context.Context, _a1 git.GetBranchesArgs) (*[]git.GitBranchStats, error) { - ret := _m.Called(_a0, _a1) +// GetBranches provides a mock function for the type Client +func (_mock *Client) GetBranches(context1 context.Context, getBranchesArgs git.GetBranchesArgs) (*[]git.GitBranchStats, error) { + ret := _mock.Called(context1, getBranchesArgs) if len(ret) == 0 { panic("no return value specified for GetBranches") @@ -2266,23 +2210,21 @@ func (_m *Client) GetBranches(_a0 context.Context, _a1 git.GetBranchesArgs) (*[] var r0 *[]git.GitBranchStats var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetBranchesArgs) (*[]git.GitBranchStats, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetBranchesArgs) (*[]git.GitBranchStats, error)); ok { + return returnFunc(context1, getBranchesArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetBranchesArgs) *[]git.GitBranchStats); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetBranchesArgs) *[]git.GitBranchStats); ok { + r0 = returnFunc(context1, getBranchesArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitBranchStats) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetBranchesArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetBranchesArgs) error); ok { + r1 = returnFunc(context1, getBranchesArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2292,32 +2234,32 @@ type Client_GetBranches_Call struct { } // GetBranches is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetBranchesArgs -func (_e *Client_Expecter) GetBranches(_a0 interface{}, _a1 interface{}) *Client_GetBranches_Call { - return &Client_GetBranches_Call{Call: _e.mock.On("GetBranches", _a0, _a1)} +// - context1 +// - getBranchesArgs +func (_e *Client_Expecter) GetBranches(context1 interface{}, getBranchesArgs interface{}) *Client_GetBranches_Call { + return &Client_GetBranches_Call{Call: _e.mock.On("GetBranches", context1, getBranchesArgs)} } -func (_c *Client_GetBranches_Call) Run(run func(_a0 context.Context, _a1 git.GetBranchesArgs)) *Client_GetBranches_Call { +func (_c *Client_GetBranches_Call) Run(run func(context1 context.Context, getBranchesArgs git.GetBranchesArgs)) *Client_GetBranches_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetBranchesArgs)) }) return _c } -func (_c *Client_GetBranches_Call) Return(_a0 *[]git.GitBranchStats, _a1 error) *Client_GetBranches_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetBranches_Call) Return(gitBranchStatss *[]git.GitBranchStats, err error) *Client_GetBranches_Call { + _c.Call.Return(gitBranchStatss, err) return _c } -func (_c *Client_GetBranches_Call) RunAndReturn(run func(context.Context, git.GetBranchesArgs) (*[]git.GitBranchStats, error)) *Client_GetBranches_Call { +func (_c *Client_GetBranches_Call) RunAndReturn(run func(context1 context.Context, getBranchesArgs git.GetBranchesArgs) (*[]git.GitBranchStats, error)) *Client_GetBranches_Call { _c.Call.Return(run) return _c } -// GetChanges provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetChanges(_a0 context.Context, _a1 git.GetChangesArgs) (*git.GitCommitChanges, error) { - ret := _m.Called(_a0, _a1) +// GetChanges provides a mock function for the type Client +func (_mock *Client) GetChanges(context1 context.Context, getChangesArgs git.GetChangesArgs) (*git.GitCommitChanges, error) { + ret := _mock.Called(context1, getChangesArgs) if len(ret) == 0 { panic("no return value specified for GetChanges") @@ -2325,23 +2267,21 @@ func (_m *Client) GetChanges(_a0 context.Context, _a1 git.GetChangesArgs) (*git. var r0 *git.GitCommitChanges var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetChangesArgs) (*git.GitCommitChanges, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetChangesArgs) (*git.GitCommitChanges, error)); ok { + return returnFunc(context1, getChangesArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetChangesArgs) *git.GitCommitChanges); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetChangesArgs) *git.GitCommitChanges); ok { + r0 = returnFunc(context1, getChangesArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitCommitChanges) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetChangesArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetChangesArgs) error); ok { + r1 = returnFunc(context1, getChangesArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2351,32 +2291,32 @@ type Client_GetChanges_Call struct { } // GetChanges is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetChangesArgs -func (_e *Client_Expecter) GetChanges(_a0 interface{}, _a1 interface{}) *Client_GetChanges_Call { - return &Client_GetChanges_Call{Call: _e.mock.On("GetChanges", _a0, _a1)} +// - context1 +// - getChangesArgs +func (_e *Client_Expecter) GetChanges(context1 interface{}, getChangesArgs interface{}) *Client_GetChanges_Call { + return &Client_GetChanges_Call{Call: _e.mock.On("GetChanges", context1, getChangesArgs)} } -func (_c *Client_GetChanges_Call) Run(run func(_a0 context.Context, _a1 git.GetChangesArgs)) *Client_GetChanges_Call { +func (_c *Client_GetChanges_Call) Run(run func(context1 context.Context, getChangesArgs git.GetChangesArgs)) *Client_GetChanges_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetChangesArgs)) }) return _c } -func (_c *Client_GetChanges_Call) Return(_a0 *git.GitCommitChanges, _a1 error) *Client_GetChanges_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetChanges_Call) Return(gitCommitChanges *git.GitCommitChanges, err error) *Client_GetChanges_Call { + _c.Call.Return(gitCommitChanges, err) return _c } -func (_c *Client_GetChanges_Call) RunAndReturn(run func(context.Context, git.GetChangesArgs) (*git.GitCommitChanges, error)) *Client_GetChanges_Call { +func (_c *Client_GetChanges_Call) RunAndReturn(run func(context1 context.Context, getChangesArgs git.GetChangesArgs) (*git.GitCommitChanges, error)) *Client_GetChanges_Call { _c.Call.Return(run) return _c } -// GetCherryPick provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetCherryPick(_a0 context.Context, _a1 git.GetCherryPickArgs) (*git.GitCherryPick, error) { - ret := _m.Called(_a0, _a1) +// GetCherryPick provides a mock function for the type Client +func (_mock *Client) GetCherryPick(context1 context.Context, getCherryPickArgs git.GetCherryPickArgs) (*git.GitCherryPick, error) { + ret := _mock.Called(context1, getCherryPickArgs) if len(ret) == 0 { panic("no return value specified for GetCherryPick") @@ -2384,23 +2324,21 @@ func (_m *Client) GetCherryPick(_a0 context.Context, _a1 git.GetCherryPickArgs) var r0 *git.GitCherryPick var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetCherryPickArgs) (*git.GitCherryPick, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCherryPickArgs) (*git.GitCherryPick, error)); ok { + return returnFunc(context1, getCherryPickArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetCherryPickArgs) *git.GitCherryPick); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCherryPickArgs) *git.GitCherryPick); ok { + r0 = returnFunc(context1, getCherryPickArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitCherryPick) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetCherryPickArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetCherryPickArgs) error); ok { + r1 = returnFunc(context1, getCherryPickArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2410,32 +2348,32 @@ type Client_GetCherryPick_Call struct { } // GetCherryPick is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetCherryPickArgs -func (_e *Client_Expecter) GetCherryPick(_a0 interface{}, _a1 interface{}) *Client_GetCherryPick_Call { - return &Client_GetCherryPick_Call{Call: _e.mock.On("GetCherryPick", _a0, _a1)} +// - context1 +// - getCherryPickArgs +func (_e *Client_Expecter) GetCherryPick(context1 interface{}, getCherryPickArgs interface{}) *Client_GetCherryPick_Call { + return &Client_GetCherryPick_Call{Call: _e.mock.On("GetCherryPick", context1, getCherryPickArgs)} } -func (_c *Client_GetCherryPick_Call) Run(run func(_a0 context.Context, _a1 git.GetCherryPickArgs)) *Client_GetCherryPick_Call { +func (_c *Client_GetCherryPick_Call) Run(run func(context1 context.Context, getCherryPickArgs git.GetCherryPickArgs)) *Client_GetCherryPick_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetCherryPickArgs)) }) return _c } -func (_c *Client_GetCherryPick_Call) Return(_a0 *git.GitCherryPick, _a1 error) *Client_GetCherryPick_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetCherryPick_Call) Return(gitCherryPick *git.GitCherryPick, err error) *Client_GetCherryPick_Call { + _c.Call.Return(gitCherryPick, err) return _c } -func (_c *Client_GetCherryPick_Call) RunAndReturn(run func(context.Context, git.GetCherryPickArgs) (*git.GitCherryPick, error)) *Client_GetCherryPick_Call { +func (_c *Client_GetCherryPick_Call) RunAndReturn(run func(context1 context.Context, getCherryPickArgs git.GetCherryPickArgs) (*git.GitCherryPick, error)) *Client_GetCherryPick_Call { _c.Call.Return(run) return _c } -// GetCherryPickForRefName provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetCherryPickForRefName(_a0 context.Context, _a1 git.GetCherryPickForRefNameArgs) (*git.GitCherryPick, error) { - ret := _m.Called(_a0, _a1) +// GetCherryPickForRefName provides a mock function for the type Client +func (_mock *Client) GetCherryPickForRefName(context1 context.Context, getCherryPickForRefNameArgs git.GetCherryPickForRefNameArgs) (*git.GitCherryPick, error) { + ret := _mock.Called(context1, getCherryPickForRefNameArgs) if len(ret) == 0 { panic("no return value specified for GetCherryPickForRefName") @@ -2443,23 +2381,21 @@ func (_m *Client) GetCherryPickForRefName(_a0 context.Context, _a1 git.GetCherry var r0 *git.GitCherryPick var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetCherryPickForRefNameArgs) (*git.GitCherryPick, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCherryPickForRefNameArgs) (*git.GitCherryPick, error)); ok { + return returnFunc(context1, getCherryPickForRefNameArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetCherryPickForRefNameArgs) *git.GitCherryPick); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCherryPickForRefNameArgs) *git.GitCherryPick); ok { + r0 = returnFunc(context1, getCherryPickForRefNameArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitCherryPick) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetCherryPickForRefNameArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetCherryPickForRefNameArgs) error); ok { + r1 = returnFunc(context1, getCherryPickForRefNameArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2469,32 +2405,32 @@ type Client_GetCherryPickForRefName_Call struct { } // GetCherryPickForRefName is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetCherryPickForRefNameArgs -func (_e *Client_Expecter) GetCherryPickForRefName(_a0 interface{}, _a1 interface{}) *Client_GetCherryPickForRefName_Call { - return &Client_GetCherryPickForRefName_Call{Call: _e.mock.On("GetCherryPickForRefName", _a0, _a1)} +// - context1 +// - getCherryPickForRefNameArgs +func (_e *Client_Expecter) GetCherryPickForRefName(context1 interface{}, getCherryPickForRefNameArgs interface{}) *Client_GetCherryPickForRefName_Call { + return &Client_GetCherryPickForRefName_Call{Call: _e.mock.On("GetCherryPickForRefName", context1, getCherryPickForRefNameArgs)} } -func (_c *Client_GetCherryPickForRefName_Call) Run(run func(_a0 context.Context, _a1 git.GetCherryPickForRefNameArgs)) *Client_GetCherryPickForRefName_Call { +func (_c *Client_GetCherryPickForRefName_Call) Run(run func(context1 context.Context, getCherryPickForRefNameArgs git.GetCherryPickForRefNameArgs)) *Client_GetCherryPickForRefName_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetCherryPickForRefNameArgs)) }) return _c } -func (_c *Client_GetCherryPickForRefName_Call) Return(_a0 *git.GitCherryPick, _a1 error) *Client_GetCherryPickForRefName_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetCherryPickForRefName_Call) Return(gitCherryPick *git.GitCherryPick, err error) *Client_GetCherryPickForRefName_Call { + _c.Call.Return(gitCherryPick, err) return _c } -func (_c *Client_GetCherryPickForRefName_Call) RunAndReturn(run func(context.Context, git.GetCherryPickForRefNameArgs) (*git.GitCherryPick, error)) *Client_GetCherryPickForRefName_Call { +func (_c *Client_GetCherryPickForRefName_Call) RunAndReturn(run func(context1 context.Context, getCherryPickForRefNameArgs git.GetCherryPickForRefNameArgs) (*git.GitCherryPick, error)) *Client_GetCherryPickForRefName_Call { _c.Call.Return(run) return _c } -// GetComment provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetComment(_a0 context.Context, _a1 git.GetCommentArgs) (*git.Comment, error) { - ret := _m.Called(_a0, _a1) +// GetComment provides a mock function for the type Client +func (_mock *Client) GetComment(context1 context.Context, getCommentArgs git.GetCommentArgs) (*git.Comment, error) { + ret := _mock.Called(context1, getCommentArgs) if len(ret) == 0 { panic("no return value specified for GetComment") @@ -2502,23 +2438,21 @@ func (_m *Client) GetComment(_a0 context.Context, _a1 git.GetCommentArgs) (*git. var r0 *git.Comment var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetCommentArgs) (*git.Comment, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCommentArgs) (*git.Comment, error)); ok { + return returnFunc(context1, getCommentArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetCommentArgs) *git.Comment); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCommentArgs) *git.Comment); ok { + r0 = returnFunc(context1, getCommentArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.Comment) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetCommentArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetCommentArgs) error); ok { + r1 = returnFunc(context1, getCommentArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2528,32 +2462,32 @@ type Client_GetComment_Call struct { } // GetComment is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetCommentArgs -func (_e *Client_Expecter) GetComment(_a0 interface{}, _a1 interface{}) *Client_GetComment_Call { - return &Client_GetComment_Call{Call: _e.mock.On("GetComment", _a0, _a1)} +// - context1 +// - getCommentArgs +func (_e *Client_Expecter) GetComment(context1 interface{}, getCommentArgs interface{}) *Client_GetComment_Call { + return &Client_GetComment_Call{Call: _e.mock.On("GetComment", context1, getCommentArgs)} } -func (_c *Client_GetComment_Call) Run(run func(_a0 context.Context, _a1 git.GetCommentArgs)) *Client_GetComment_Call { +func (_c *Client_GetComment_Call) Run(run func(context1 context.Context, getCommentArgs git.GetCommentArgs)) *Client_GetComment_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetCommentArgs)) }) return _c } -func (_c *Client_GetComment_Call) Return(_a0 *git.Comment, _a1 error) *Client_GetComment_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetComment_Call) Return(comment *git.Comment, err error) *Client_GetComment_Call { + _c.Call.Return(comment, err) return _c } -func (_c *Client_GetComment_Call) RunAndReturn(run func(context.Context, git.GetCommentArgs) (*git.Comment, error)) *Client_GetComment_Call { +func (_c *Client_GetComment_Call) RunAndReturn(run func(context1 context.Context, getCommentArgs git.GetCommentArgs) (*git.Comment, error)) *Client_GetComment_Call { _c.Call.Return(run) return _c } -// GetComments provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetComments(_a0 context.Context, _a1 git.GetCommentsArgs) (*[]git.Comment, error) { - ret := _m.Called(_a0, _a1) +// GetComments provides a mock function for the type Client +func (_mock *Client) GetComments(context1 context.Context, getCommentsArgs git.GetCommentsArgs) (*[]git.Comment, error) { + ret := _mock.Called(context1, getCommentsArgs) if len(ret) == 0 { panic("no return value specified for GetComments") @@ -2561,23 +2495,21 @@ func (_m *Client) GetComments(_a0 context.Context, _a1 git.GetCommentsArgs) (*[] var r0 *[]git.Comment var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetCommentsArgs) (*[]git.Comment, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCommentsArgs) (*[]git.Comment, error)); ok { + return returnFunc(context1, getCommentsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetCommentsArgs) *[]git.Comment); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCommentsArgs) *[]git.Comment); ok { + r0 = returnFunc(context1, getCommentsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.Comment) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetCommentsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetCommentsArgs) error); ok { + r1 = returnFunc(context1, getCommentsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2587,32 +2519,32 @@ type Client_GetComments_Call struct { } // GetComments is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetCommentsArgs -func (_e *Client_Expecter) GetComments(_a0 interface{}, _a1 interface{}) *Client_GetComments_Call { - return &Client_GetComments_Call{Call: _e.mock.On("GetComments", _a0, _a1)} +// - context1 +// - getCommentsArgs +func (_e *Client_Expecter) GetComments(context1 interface{}, getCommentsArgs interface{}) *Client_GetComments_Call { + return &Client_GetComments_Call{Call: _e.mock.On("GetComments", context1, getCommentsArgs)} } -func (_c *Client_GetComments_Call) Run(run func(_a0 context.Context, _a1 git.GetCommentsArgs)) *Client_GetComments_Call { +func (_c *Client_GetComments_Call) Run(run func(context1 context.Context, getCommentsArgs git.GetCommentsArgs)) *Client_GetComments_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetCommentsArgs)) }) return _c } -func (_c *Client_GetComments_Call) Return(_a0 *[]git.Comment, _a1 error) *Client_GetComments_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetComments_Call) Return(comments *[]git.Comment, err error) *Client_GetComments_Call { + _c.Call.Return(comments, err) return _c } -func (_c *Client_GetComments_Call) RunAndReturn(run func(context.Context, git.GetCommentsArgs) (*[]git.Comment, error)) *Client_GetComments_Call { +func (_c *Client_GetComments_Call) RunAndReturn(run func(context1 context.Context, getCommentsArgs git.GetCommentsArgs) (*[]git.Comment, error)) *Client_GetComments_Call { _c.Call.Return(run) return _c } -// GetCommit provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetCommit(_a0 context.Context, _a1 git.GetCommitArgs) (*git.GitCommit, error) { - ret := _m.Called(_a0, _a1) +// GetCommit provides a mock function for the type Client +func (_mock *Client) GetCommit(context1 context.Context, getCommitArgs git.GetCommitArgs) (*git.GitCommit, error) { + ret := _mock.Called(context1, getCommitArgs) if len(ret) == 0 { panic("no return value specified for GetCommit") @@ -2620,23 +2552,21 @@ func (_m *Client) GetCommit(_a0 context.Context, _a1 git.GetCommitArgs) (*git.Gi var r0 *git.GitCommit var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetCommitArgs) (*git.GitCommit, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCommitArgs) (*git.GitCommit, error)); ok { + return returnFunc(context1, getCommitArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetCommitArgs) *git.GitCommit); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCommitArgs) *git.GitCommit); ok { + r0 = returnFunc(context1, getCommitArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitCommit) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetCommitArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetCommitArgs) error); ok { + r1 = returnFunc(context1, getCommitArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2646,32 +2576,32 @@ type Client_GetCommit_Call struct { } // GetCommit is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetCommitArgs -func (_e *Client_Expecter) GetCommit(_a0 interface{}, _a1 interface{}) *Client_GetCommit_Call { - return &Client_GetCommit_Call{Call: _e.mock.On("GetCommit", _a0, _a1)} +// - context1 +// - getCommitArgs +func (_e *Client_Expecter) GetCommit(context1 interface{}, getCommitArgs interface{}) *Client_GetCommit_Call { + return &Client_GetCommit_Call{Call: _e.mock.On("GetCommit", context1, getCommitArgs)} } -func (_c *Client_GetCommit_Call) Run(run func(_a0 context.Context, _a1 git.GetCommitArgs)) *Client_GetCommit_Call { +func (_c *Client_GetCommit_Call) Run(run func(context1 context.Context, getCommitArgs git.GetCommitArgs)) *Client_GetCommit_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetCommitArgs)) }) return _c } -func (_c *Client_GetCommit_Call) Return(_a0 *git.GitCommit, _a1 error) *Client_GetCommit_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetCommit_Call) Return(gitCommit *git.GitCommit, err error) *Client_GetCommit_Call { + _c.Call.Return(gitCommit, err) return _c } -func (_c *Client_GetCommit_Call) RunAndReturn(run func(context.Context, git.GetCommitArgs) (*git.GitCommit, error)) *Client_GetCommit_Call { +func (_c *Client_GetCommit_Call) RunAndReturn(run func(context1 context.Context, getCommitArgs git.GetCommitArgs) (*git.GitCommit, error)) *Client_GetCommit_Call { _c.Call.Return(run) return _c } -// GetCommitDiffs provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetCommitDiffs(_a0 context.Context, _a1 git.GetCommitDiffsArgs) (*git.GitCommitDiffs, error) { - ret := _m.Called(_a0, _a1) +// GetCommitDiffs provides a mock function for the type Client +func (_mock *Client) GetCommitDiffs(context1 context.Context, getCommitDiffsArgs git.GetCommitDiffsArgs) (*git.GitCommitDiffs, error) { + ret := _mock.Called(context1, getCommitDiffsArgs) if len(ret) == 0 { panic("no return value specified for GetCommitDiffs") @@ -2679,23 +2609,21 @@ func (_m *Client) GetCommitDiffs(_a0 context.Context, _a1 git.GetCommitDiffsArgs var r0 *git.GitCommitDiffs var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetCommitDiffsArgs) (*git.GitCommitDiffs, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCommitDiffsArgs) (*git.GitCommitDiffs, error)); ok { + return returnFunc(context1, getCommitDiffsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetCommitDiffsArgs) *git.GitCommitDiffs); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCommitDiffsArgs) *git.GitCommitDiffs); ok { + r0 = returnFunc(context1, getCommitDiffsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitCommitDiffs) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetCommitDiffsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetCommitDiffsArgs) error); ok { + r1 = returnFunc(context1, getCommitDiffsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2705,32 +2633,32 @@ type Client_GetCommitDiffs_Call struct { } // GetCommitDiffs is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetCommitDiffsArgs -func (_e *Client_Expecter) GetCommitDiffs(_a0 interface{}, _a1 interface{}) *Client_GetCommitDiffs_Call { - return &Client_GetCommitDiffs_Call{Call: _e.mock.On("GetCommitDiffs", _a0, _a1)} +// - context1 +// - getCommitDiffsArgs +func (_e *Client_Expecter) GetCommitDiffs(context1 interface{}, getCommitDiffsArgs interface{}) *Client_GetCommitDiffs_Call { + return &Client_GetCommitDiffs_Call{Call: _e.mock.On("GetCommitDiffs", context1, getCommitDiffsArgs)} } -func (_c *Client_GetCommitDiffs_Call) Run(run func(_a0 context.Context, _a1 git.GetCommitDiffsArgs)) *Client_GetCommitDiffs_Call { +func (_c *Client_GetCommitDiffs_Call) Run(run func(context1 context.Context, getCommitDiffsArgs git.GetCommitDiffsArgs)) *Client_GetCommitDiffs_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetCommitDiffsArgs)) }) return _c } -func (_c *Client_GetCommitDiffs_Call) Return(_a0 *git.GitCommitDiffs, _a1 error) *Client_GetCommitDiffs_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetCommitDiffs_Call) Return(gitCommitDiffs *git.GitCommitDiffs, err error) *Client_GetCommitDiffs_Call { + _c.Call.Return(gitCommitDiffs, err) return _c } -func (_c *Client_GetCommitDiffs_Call) RunAndReturn(run func(context.Context, git.GetCommitDiffsArgs) (*git.GitCommitDiffs, error)) *Client_GetCommitDiffs_Call { +func (_c *Client_GetCommitDiffs_Call) RunAndReturn(run func(context1 context.Context, getCommitDiffsArgs git.GetCommitDiffsArgs) (*git.GitCommitDiffs, error)) *Client_GetCommitDiffs_Call { _c.Call.Return(run) return _c } -// GetCommits provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetCommits(_a0 context.Context, _a1 git.GetCommitsArgs) (*[]git.GitCommitRef, error) { - ret := _m.Called(_a0, _a1) +// GetCommits provides a mock function for the type Client +func (_mock *Client) GetCommits(context1 context.Context, getCommitsArgs git.GetCommitsArgs) (*[]git.GitCommitRef, error) { + ret := _mock.Called(context1, getCommitsArgs) if len(ret) == 0 { panic("no return value specified for GetCommits") @@ -2738,23 +2666,21 @@ func (_m *Client) GetCommits(_a0 context.Context, _a1 git.GetCommitsArgs) (*[]gi var r0 *[]git.GitCommitRef var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetCommitsArgs) (*[]git.GitCommitRef, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCommitsArgs) (*[]git.GitCommitRef, error)); ok { + return returnFunc(context1, getCommitsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetCommitsArgs) *[]git.GitCommitRef); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCommitsArgs) *[]git.GitCommitRef); ok { + r0 = returnFunc(context1, getCommitsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitCommitRef) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetCommitsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetCommitsArgs) error); ok { + r1 = returnFunc(context1, getCommitsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2764,32 +2690,32 @@ type Client_GetCommits_Call struct { } // GetCommits is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetCommitsArgs -func (_e *Client_Expecter) GetCommits(_a0 interface{}, _a1 interface{}) *Client_GetCommits_Call { - return &Client_GetCommits_Call{Call: _e.mock.On("GetCommits", _a0, _a1)} +// - context1 +// - getCommitsArgs +func (_e *Client_Expecter) GetCommits(context1 interface{}, getCommitsArgs interface{}) *Client_GetCommits_Call { + return &Client_GetCommits_Call{Call: _e.mock.On("GetCommits", context1, getCommitsArgs)} } -func (_c *Client_GetCommits_Call) Run(run func(_a0 context.Context, _a1 git.GetCommitsArgs)) *Client_GetCommits_Call { +func (_c *Client_GetCommits_Call) Run(run func(context1 context.Context, getCommitsArgs git.GetCommitsArgs)) *Client_GetCommits_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetCommitsArgs)) }) return _c } -func (_c *Client_GetCommits_Call) Return(_a0 *[]git.GitCommitRef, _a1 error) *Client_GetCommits_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetCommits_Call) Return(gitCommitRefs *[]git.GitCommitRef, err error) *Client_GetCommits_Call { + _c.Call.Return(gitCommitRefs, err) return _c } -func (_c *Client_GetCommits_Call) RunAndReturn(run func(context.Context, git.GetCommitsArgs) (*[]git.GitCommitRef, error)) *Client_GetCommits_Call { +func (_c *Client_GetCommits_Call) RunAndReturn(run func(context1 context.Context, getCommitsArgs git.GetCommitsArgs) (*[]git.GitCommitRef, error)) *Client_GetCommits_Call { _c.Call.Return(run) return _c } -// GetCommitsBatch provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetCommitsBatch(_a0 context.Context, _a1 git.GetCommitsBatchArgs) (*[]git.GitCommitRef, error) { - ret := _m.Called(_a0, _a1) +// GetCommitsBatch provides a mock function for the type Client +func (_mock *Client) GetCommitsBatch(context1 context.Context, getCommitsBatchArgs git.GetCommitsBatchArgs) (*[]git.GitCommitRef, error) { + ret := _mock.Called(context1, getCommitsBatchArgs) if len(ret) == 0 { panic("no return value specified for GetCommitsBatch") @@ -2797,23 +2723,21 @@ func (_m *Client) GetCommitsBatch(_a0 context.Context, _a1 git.GetCommitsBatchAr var r0 *[]git.GitCommitRef var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetCommitsBatchArgs) (*[]git.GitCommitRef, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCommitsBatchArgs) (*[]git.GitCommitRef, error)); ok { + return returnFunc(context1, getCommitsBatchArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetCommitsBatchArgs) *[]git.GitCommitRef); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetCommitsBatchArgs) *[]git.GitCommitRef); ok { + r0 = returnFunc(context1, getCommitsBatchArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitCommitRef) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetCommitsBatchArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetCommitsBatchArgs) error); ok { + r1 = returnFunc(context1, getCommitsBatchArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2823,32 +2747,32 @@ type Client_GetCommitsBatch_Call struct { } // GetCommitsBatch is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetCommitsBatchArgs -func (_e *Client_Expecter) GetCommitsBatch(_a0 interface{}, _a1 interface{}) *Client_GetCommitsBatch_Call { - return &Client_GetCommitsBatch_Call{Call: _e.mock.On("GetCommitsBatch", _a0, _a1)} +// - context1 +// - getCommitsBatchArgs +func (_e *Client_Expecter) GetCommitsBatch(context1 interface{}, getCommitsBatchArgs interface{}) *Client_GetCommitsBatch_Call { + return &Client_GetCommitsBatch_Call{Call: _e.mock.On("GetCommitsBatch", context1, getCommitsBatchArgs)} } -func (_c *Client_GetCommitsBatch_Call) Run(run func(_a0 context.Context, _a1 git.GetCommitsBatchArgs)) *Client_GetCommitsBatch_Call { +func (_c *Client_GetCommitsBatch_Call) Run(run func(context1 context.Context, getCommitsBatchArgs git.GetCommitsBatchArgs)) *Client_GetCommitsBatch_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetCommitsBatchArgs)) }) return _c } -func (_c *Client_GetCommitsBatch_Call) Return(_a0 *[]git.GitCommitRef, _a1 error) *Client_GetCommitsBatch_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetCommitsBatch_Call) Return(gitCommitRefs *[]git.GitCommitRef, err error) *Client_GetCommitsBatch_Call { + _c.Call.Return(gitCommitRefs, err) return _c } -func (_c *Client_GetCommitsBatch_Call) RunAndReturn(run func(context.Context, git.GetCommitsBatchArgs) (*[]git.GitCommitRef, error)) *Client_GetCommitsBatch_Call { +func (_c *Client_GetCommitsBatch_Call) RunAndReturn(run func(context1 context.Context, getCommitsBatchArgs git.GetCommitsBatchArgs) (*[]git.GitCommitRef, error)) *Client_GetCommitsBatch_Call { _c.Call.Return(run) return _c } -// GetDeletedRepositories provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetDeletedRepositories(_a0 context.Context, _a1 git.GetDeletedRepositoriesArgs) (*[]git.GitDeletedRepository, error) { - ret := _m.Called(_a0, _a1) +// GetDeletedRepositories provides a mock function for the type Client +func (_mock *Client) GetDeletedRepositories(context1 context.Context, getDeletedRepositoriesArgs git.GetDeletedRepositoriesArgs) (*[]git.GitDeletedRepository, error) { + ret := _mock.Called(context1, getDeletedRepositoriesArgs) if len(ret) == 0 { panic("no return value specified for GetDeletedRepositories") @@ -2856,23 +2780,21 @@ func (_m *Client) GetDeletedRepositories(_a0 context.Context, _a1 git.GetDeleted var r0 *[]git.GitDeletedRepository var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetDeletedRepositoriesArgs) (*[]git.GitDeletedRepository, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetDeletedRepositoriesArgs) (*[]git.GitDeletedRepository, error)); ok { + return returnFunc(context1, getDeletedRepositoriesArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetDeletedRepositoriesArgs) *[]git.GitDeletedRepository); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetDeletedRepositoriesArgs) *[]git.GitDeletedRepository); ok { + r0 = returnFunc(context1, getDeletedRepositoriesArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitDeletedRepository) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetDeletedRepositoriesArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetDeletedRepositoriesArgs) error); ok { + r1 = returnFunc(context1, getDeletedRepositoriesArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2882,32 +2804,32 @@ type Client_GetDeletedRepositories_Call struct { } // GetDeletedRepositories is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetDeletedRepositoriesArgs -func (_e *Client_Expecter) GetDeletedRepositories(_a0 interface{}, _a1 interface{}) *Client_GetDeletedRepositories_Call { - return &Client_GetDeletedRepositories_Call{Call: _e.mock.On("GetDeletedRepositories", _a0, _a1)} +// - context1 +// - getDeletedRepositoriesArgs +func (_e *Client_Expecter) GetDeletedRepositories(context1 interface{}, getDeletedRepositoriesArgs interface{}) *Client_GetDeletedRepositories_Call { + return &Client_GetDeletedRepositories_Call{Call: _e.mock.On("GetDeletedRepositories", context1, getDeletedRepositoriesArgs)} } -func (_c *Client_GetDeletedRepositories_Call) Run(run func(_a0 context.Context, _a1 git.GetDeletedRepositoriesArgs)) *Client_GetDeletedRepositories_Call { +func (_c *Client_GetDeletedRepositories_Call) Run(run func(context1 context.Context, getDeletedRepositoriesArgs git.GetDeletedRepositoriesArgs)) *Client_GetDeletedRepositories_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetDeletedRepositoriesArgs)) }) return _c } -func (_c *Client_GetDeletedRepositories_Call) Return(_a0 *[]git.GitDeletedRepository, _a1 error) *Client_GetDeletedRepositories_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetDeletedRepositories_Call) Return(gitDeletedRepositorys *[]git.GitDeletedRepository, err error) *Client_GetDeletedRepositories_Call { + _c.Call.Return(gitDeletedRepositorys, err) return _c } -func (_c *Client_GetDeletedRepositories_Call) RunAndReturn(run func(context.Context, git.GetDeletedRepositoriesArgs) (*[]git.GitDeletedRepository, error)) *Client_GetDeletedRepositories_Call { +func (_c *Client_GetDeletedRepositories_Call) RunAndReturn(run func(context1 context.Context, getDeletedRepositoriesArgs git.GetDeletedRepositoriesArgs) (*[]git.GitDeletedRepository, error)) *Client_GetDeletedRepositories_Call { _c.Call.Return(run) return _c } -// GetForkSyncRequest provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetForkSyncRequest(_a0 context.Context, _a1 git.GetForkSyncRequestArgs) (*git.GitForkSyncRequest, error) { - ret := _m.Called(_a0, _a1) +// GetForkSyncRequest provides a mock function for the type Client +func (_mock *Client) GetForkSyncRequest(context1 context.Context, getForkSyncRequestArgs git.GetForkSyncRequestArgs) (*git.GitForkSyncRequest, error) { + ret := _mock.Called(context1, getForkSyncRequestArgs) if len(ret) == 0 { panic("no return value specified for GetForkSyncRequest") @@ -2915,23 +2837,21 @@ func (_m *Client) GetForkSyncRequest(_a0 context.Context, _a1 git.GetForkSyncReq var r0 *git.GitForkSyncRequest var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetForkSyncRequestArgs) (*git.GitForkSyncRequest, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetForkSyncRequestArgs) (*git.GitForkSyncRequest, error)); ok { + return returnFunc(context1, getForkSyncRequestArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetForkSyncRequestArgs) *git.GitForkSyncRequest); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetForkSyncRequestArgs) *git.GitForkSyncRequest); ok { + r0 = returnFunc(context1, getForkSyncRequestArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitForkSyncRequest) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetForkSyncRequestArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetForkSyncRequestArgs) error); ok { + r1 = returnFunc(context1, getForkSyncRequestArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2941,32 +2861,32 @@ type Client_GetForkSyncRequest_Call struct { } // GetForkSyncRequest is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetForkSyncRequestArgs -func (_e *Client_Expecter) GetForkSyncRequest(_a0 interface{}, _a1 interface{}) *Client_GetForkSyncRequest_Call { - return &Client_GetForkSyncRequest_Call{Call: _e.mock.On("GetForkSyncRequest", _a0, _a1)} +// - context1 +// - getForkSyncRequestArgs +func (_e *Client_Expecter) GetForkSyncRequest(context1 interface{}, getForkSyncRequestArgs interface{}) *Client_GetForkSyncRequest_Call { + return &Client_GetForkSyncRequest_Call{Call: _e.mock.On("GetForkSyncRequest", context1, getForkSyncRequestArgs)} } -func (_c *Client_GetForkSyncRequest_Call) Run(run func(_a0 context.Context, _a1 git.GetForkSyncRequestArgs)) *Client_GetForkSyncRequest_Call { +func (_c *Client_GetForkSyncRequest_Call) Run(run func(context1 context.Context, getForkSyncRequestArgs git.GetForkSyncRequestArgs)) *Client_GetForkSyncRequest_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetForkSyncRequestArgs)) }) return _c } -func (_c *Client_GetForkSyncRequest_Call) Return(_a0 *git.GitForkSyncRequest, _a1 error) *Client_GetForkSyncRequest_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetForkSyncRequest_Call) Return(gitForkSyncRequest *git.GitForkSyncRequest, err error) *Client_GetForkSyncRequest_Call { + _c.Call.Return(gitForkSyncRequest, err) return _c } -func (_c *Client_GetForkSyncRequest_Call) RunAndReturn(run func(context.Context, git.GetForkSyncRequestArgs) (*git.GitForkSyncRequest, error)) *Client_GetForkSyncRequest_Call { +func (_c *Client_GetForkSyncRequest_Call) RunAndReturn(run func(context1 context.Context, getForkSyncRequestArgs git.GetForkSyncRequestArgs) (*git.GitForkSyncRequest, error)) *Client_GetForkSyncRequest_Call { _c.Call.Return(run) return _c } -// GetForkSyncRequests provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetForkSyncRequests(_a0 context.Context, _a1 git.GetForkSyncRequestsArgs) (*[]git.GitForkSyncRequest, error) { - ret := _m.Called(_a0, _a1) +// GetForkSyncRequests provides a mock function for the type Client +func (_mock *Client) GetForkSyncRequests(context1 context.Context, getForkSyncRequestsArgs git.GetForkSyncRequestsArgs) (*[]git.GitForkSyncRequest, error) { + ret := _mock.Called(context1, getForkSyncRequestsArgs) if len(ret) == 0 { panic("no return value specified for GetForkSyncRequests") @@ -2974,23 +2894,21 @@ func (_m *Client) GetForkSyncRequests(_a0 context.Context, _a1 git.GetForkSyncRe var r0 *[]git.GitForkSyncRequest var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetForkSyncRequestsArgs) (*[]git.GitForkSyncRequest, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetForkSyncRequestsArgs) (*[]git.GitForkSyncRequest, error)); ok { + return returnFunc(context1, getForkSyncRequestsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetForkSyncRequestsArgs) *[]git.GitForkSyncRequest); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetForkSyncRequestsArgs) *[]git.GitForkSyncRequest); ok { + r0 = returnFunc(context1, getForkSyncRequestsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitForkSyncRequest) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetForkSyncRequestsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetForkSyncRequestsArgs) error); ok { + r1 = returnFunc(context1, getForkSyncRequestsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3000,32 +2918,32 @@ type Client_GetForkSyncRequests_Call struct { } // GetForkSyncRequests is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetForkSyncRequestsArgs -func (_e *Client_Expecter) GetForkSyncRequests(_a0 interface{}, _a1 interface{}) *Client_GetForkSyncRequests_Call { - return &Client_GetForkSyncRequests_Call{Call: _e.mock.On("GetForkSyncRequests", _a0, _a1)} +// - context1 +// - getForkSyncRequestsArgs +func (_e *Client_Expecter) GetForkSyncRequests(context1 interface{}, getForkSyncRequestsArgs interface{}) *Client_GetForkSyncRequests_Call { + return &Client_GetForkSyncRequests_Call{Call: _e.mock.On("GetForkSyncRequests", context1, getForkSyncRequestsArgs)} } -func (_c *Client_GetForkSyncRequests_Call) Run(run func(_a0 context.Context, _a1 git.GetForkSyncRequestsArgs)) *Client_GetForkSyncRequests_Call { +func (_c *Client_GetForkSyncRequests_Call) Run(run func(context1 context.Context, getForkSyncRequestsArgs git.GetForkSyncRequestsArgs)) *Client_GetForkSyncRequests_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetForkSyncRequestsArgs)) }) return _c } -func (_c *Client_GetForkSyncRequests_Call) Return(_a0 *[]git.GitForkSyncRequest, _a1 error) *Client_GetForkSyncRequests_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetForkSyncRequests_Call) Return(gitForkSyncRequests *[]git.GitForkSyncRequest, err error) *Client_GetForkSyncRequests_Call { + _c.Call.Return(gitForkSyncRequests, err) return _c } -func (_c *Client_GetForkSyncRequests_Call) RunAndReturn(run func(context.Context, git.GetForkSyncRequestsArgs) (*[]git.GitForkSyncRequest, error)) *Client_GetForkSyncRequests_Call { +func (_c *Client_GetForkSyncRequests_Call) RunAndReturn(run func(context1 context.Context, getForkSyncRequestsArgs git.GetForkSyncRequestsArgs) (*[]git.GitForkSyncRequest, error)) *Client_GetForkSyncRequests_Call { _c.Call.Return(run) return _c } -// GetForks provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetForks(_a0 context.Context, _a1 git.GetForksArgs) (*[]git.GitRepositoryRef, error) { - ret := _m.Called(_a0, _a1) +// GetForks provides a mock function for the type Client +func (_mock *Client) GetForks(context1 context.Context, getForksArgs git.GetForksArgs) (*[]git.GitRepositoryRef, error) { + ret := _mock.Called(context1, getForksArgs) if len(ret) == 0 { panic("no return value specified for GetForks") @@ -3033,23 +2951,21 @@ func (_m *Client) GetForks(_a0 context.Context, _a1 git.GetForksArgs) (*[]git.Gi var r0 *[]git.GitRepositoryRef var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetForksArgs) (*[]git.GitRepositoryRef, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetForksArgs) (*[]git.GitRepositoryRef, error)); ok { + return returnFunc(context1, getForksArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetForksArgs) *[]git.GitRepositoryRef); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetForksArgs) *[]git.GitRepositoryRef); ok { + r0 = returnFunc(context1, getForksArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitRepositoryRef) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetForksArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetForksArgs) error); ok { + r1 = returnFunc(context1, getForksArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3059,32 +2975,32 @@ type Client_GetForks_Call struct { } // GetForks is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetForksArgs -func (_e *Client_Expecter) GetForks(_a0 interface{}, _a1 interface{}) *Client_GetForks_Call { - return &Client_GetForks_Call{Call: _e.mock.On("GetForks", _a0, _a1)} +// - context1 +// - getForksArgs +func (_e *Client_Expecter) GetForks(context1 interface{}, getForksArgs interface{}) *Client_GetForks_Call { + return &Client_GetForks_Call{Call: _e.mock.On("GetForks", context1, getForksArgs)} } -func (_c *Client_GetForks_Call) Run(run func(_a0 context.Context, _a1 git.GetForksArgs)) *Client_GetForks_Call { +func (_c *Client_GetForks_Call) Run(run func(context1 context.Context, getForksArgs git.GetForksArgs)) *Client_GetForks_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetForksArgs)) }) return _c } -func (_c *Client_GetForks_Call) Return(_a0 *[]git.GitRepositoryRef, _a1 error) *Client_GetForks_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetForks_Call) Return(gitRepositoryRefs *[]git.GitRepositoryRef, err error) *Client_GetForks_Call { + _c.Call.Return(gitRepositoryRefs, err) return _c } -func (_c *Client_GetForks_Call) RunAndReturn(run func(context.Context, git.GetForksArgs) (*[]git.GitRepositoryRef, error)) *Client_GetForks_Call { +func (_c *Client_GetForks_Call) RunAndReturn(run func(context1 context.Context, getForksArgs git.GetForksArgs) (*[]git.GitRepositoryRef, error)) *Client_GetForks_Call { _c.Call.Return(run) return _c } -// GetImportRequest provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetImportRequest(_a0 context.Context, _a1 git.GetImportRequestArgs) (*git.GitImportRequest, error) { - ret := _m.Called(_a0, _a1) +// GetImportRequest provides a mock function for the type Client +func (_mock *Client) GetImportRequest(context1 context.Context, getImportRequestArgs git.GetImportRequestArgs) (*git.GitImportRequest, error) { + ret := _mock.Called(context1, getImportRequestArgs) if len(ret) == 0 { panic("no return value specified for GetImportRequest") @@ -3092,23 +3008,21 @@ func (_m *Client) GetImportRequest(_a0 context.Context, _a1 git.GetImportRequest var r0 *git.GitImportRequest var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetImportRequestArgs) (*git.GitImportRequest, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetImportRequestArgs) (*git.GitImportRequest, error)); ok { + return returnFunc(context1, getImportRequestArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetImportRequestArgs) *git.GitImportRequest); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetImportRequestArgs) *git.GitImportRequest); ok { + r0 = returnFunc(context1, getImportRequestArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitImportRequest) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetImportRequestArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetImportRequestArgs) error); ok { + r1 = returnFunc(context1, getImportRequestArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3118,32 +3032,32 @@ type Client_GetImportRequest_Call struct { } // GetImportRequest is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetImportRequestArgs -func (_e *Client_Expecter) GetImportRequest(_a0 interface{}, _a1 interface{}) *Client_GetImportRequest_Call { - return &Client_GetImportRequest_Call{Call: _e.mock.On("GetImportRequest", _a0, _a1)} +// - context1 +// - getImportRequestArgs +func (_e *Client_Expecter) GetImportRequest(context1 interface{}, getImportRequestArgs interface{}) *Client_GetImportRequest_Call { + return &Client_GetImportRequest_Call{Call: _e.mock.On("GetImportRequest", context1, getImportRequestArgs)} } -func (_c *Client_GetImportRequest_Call) Run(run func(_a0 context.Context, _a1 git.GetImportRequestArgs)) *Client_GetImportRequest_Call { +func (_c *Client_GetImportRequest_Call) Run(run func(context1 context.Context, getImportRequestArgs git.GetImportRequestArgs)) *Client_GetImportRequest_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetImportRequestArgs)) }) return _c } -func (_c *Client_GetImportRequest_Call) Return(_a0 *git.GitImportRequest, _a1 error) *Client_GetImportRequest_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetImportRequest_Call) Return(gitImportRequest *git.GitImportRequest, err error) *Client_GetImportRequest_Call { + _c.Call.Return(gitImportRequest, err) return _c } -func (_c *Client_GetImportRequest_Call) RunAndReturn(run func(context.Context, git.GetImportRequestArgs) (*git.GitImportRequest, error)) *Client_GetImportRequest_Call { +func (_c *Client_GetImportRequest_Call) RunAndReturn(run func(context1 context.Context, getImportRequestArgs git.GetImportRequestArgs) (*git.GitImportRequest, error)) *Client_GetImportRequest_Call { _c.Call.Return(run) return _c } -// GetItem provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetItem(_a0 context.Context, _a1 git.GetItemArgs) (*git.GitItem, error) { - ret := _m.Called(_a0, _a1) +// GetItem provides a mock function for the type Client +func (_mock *Client) GetItem(context1 context.Context, getItemArgs git.GetItemArgs) (*git.GitItem, error) { + ret := _mock.Called(context1, getItemArgs) if len(ret) == 0 { panic("no return value specified for GetItem") @@ -3151,23 +3065,21 @@ func (_m *Client) GetItem(_a0 context.Context, _a1 git.GetItemArgs) (*git.GitIte var r0 *git.GitItem var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetItemArgs) (*git.GitItem, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetItemArgs) (*git.GitItem, error)); ok { + return returnFunc(context1, getItemArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetItemArgs) *git.GitItem); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetItemArgs) *git.GitItem); ok { + r0 = returnFunc(context1, getItemArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitItem) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetItemArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetItemArgs) error); ok { + r1 = returnFunc(context1, getItemArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3177,32 +3089,32 @@ type Client_GetItem_Call struct { } // GetItem is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetItemArgs -func (_e *Client_Expecter) GetItem(_a0 interface{}, _a1 interface{}) *Client_GetItem_Call { - return &Client_GetItem_Call{Call: _e.mock.On("GetItem", _a0, _a1)} +// - context1 +// - getItemArgs +func (_e *Client_Expecter) GetItem(context1 interface{}, getItemArgs interface{}) *Client_GetItem_Call { + return &Client_GetItem_Call{Call: _e.mock.On("GetItem", context1, getItemArgs)} } -func (_c *Client_GetItem_Call) Run(run func(_a0 context.Context, _a1 git.GetItemArgs)) *Client_GetItem_Call { +func (_c *Client_GetItem_Call) Run(run func(context1 context.Context, getItemArgs git.GetItemArgs)) *Client_GetItem_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetItemArgs)) }) return _c } -func (_c *Client_GetItem_Call) Return(_a0 *git.GitItem, _a1 error) *Client_GetItem_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetItem_Call) Return(gitItem *git.GitItem, err error) *Client_GetItem_Call { + _c.Call.Return(gitItem, err) return _c } -func (_c *Client_GetItem_Call) RunAndReturn(run func(context.Context, git.GetItemArgs) (*git.GitItem, error)) *Client_GetItem_Call { +func (_c *Client_GetItem_Call) RunAndReturn(run func(context1 context.Context, getItemArgs git.GetItemArgs) (*git.GitItem, error)) *Client_GetItem_Call { _c.Call.Return(run) return _c } -// GetItemContent provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetItemContent(_a0 context.Context, _a1 git.GetItemContentArgs) (io.ReadCloser, error) { - ret := _m.Called(_a0, _a1) +// GetItemContent provides a mock function for the type Client +func (_mock *Client) GetItemContent(context1 context.Context, getItemContentArgs git.GetItemContentArgs) (io.ReadCloser, error) { + ret := _mock.Called(context1, getItemContentArgs) if len(ret) == 0 { panic("no return value specified for GetItemContent") @@ -3210,23 +3122,21 @@ func (_m *Client) GetItemContent(_a0 context.Context, _a1 git.GetItemContentArgs var r0 io.ReadCloser var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetItemContentArgs) (io.ReadCloser, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetItemContentArgs) (io.ReadCloser, error)); ok { + return returnFunc(context1, getItemContentArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetItemContentArgs) io.ReadCloser); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetItemContentArgs) io.ReadCloser); ok { + r0 = returnFunc(context1, getItemContentArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(io.ReadCloser) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetItemContentArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetItemContentArgs) error); ok { + r1 = returnFunc(context1, getItemContentArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3236,32 +3146,32 @@ type Client_GetItemContent_Call struct { } // GetItemContent is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetItemContentArgs -func (_e *Client_Expecter) GetItemContent(_a0 interface{}, _a1 interface{}) *Client_GetItemContent_Call { - return &Client_GetItemContent_Call{Call: _e.mock.On("GetItemContent", _a0, _a1)} +// - context1 +// - getItemContentArgs +func (_e *Client_Expecter) GetItemContent(context1 interface{}, getItemContentArgs interface{}) *Client_GetItemContent_Call { + return &Client_GetItemContent_Call{Call: _e.mock.On("GetItemContent", context1, getItemContentArgs)} } -func (_c *Client_GetItemContent_Call) Run(run func(_a0 context.Context, _a1 git.GetItemContentArgs)) *Client_GetItemContent_Call { +func (_c *Client_GetItemContent_Call) Run(run func(context1 context.Context, getItemContentArgs git.GetItemContentArgs)) *Client_GetItemContent_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetItemContentArgs)) }) return _c } -func (_c *Client_GetItemContent_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetItemContent_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetItemContent_Call) Return(readCloser io.ReadCloser, err error) *Client_GetItemContent_Call { + _c.Call.Return(readCloser, err) return _c } -func (_c *Client_GetItemContent_Call) RunAndReturn(run func(context.Context, git.GetItemContentArgs) (io.ReadCloser, error)) *Client_GetItemContent_Call { +func (_c *Client_GetItemContent_Call) RunAndReturn(run func(context1 context.Context, getItemContentArgs git.GetItemContentArgs) (io.ReadCloser, error)) *Client_GetItemContent_Call { _c.Call.Return(run) return _c } -// GetItemText provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetItemText(_a0 context.Context, _a1 git.GetItemTextArgs) (io.ReadCloser, error) { - ret := _m.Called(_a0, _a1) +// GetItemText provides a mock function for the type Client +func (_mock *Client) GetItemText(context1 context.Context, getItemTextArgs git.GetItemTextArgs) (io.ReadCloser, error) { + ret := _mock.Called(context1, getItemTextArgs) if len(ret) == 0 { panic("no return value specified for GetItemText") @@ -3269,23 +3179,21 @@ func (_m *Client) GetItemText(_a0 context.Context, _a1 git.GetItemTextArgs) (io. var r0 io.ReadCloser var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetItemTextArgs) (io.ReadCloser, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetItemTextArgs) (io.ReadCloser, error)); ok { + return returnFunc(context1, getItemTextArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetItemTextArgs) io.ReadCloser); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetItemTextArgs) io.ReadCloser); ok { + r0 = returnFunc(context1, getItemTextArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(io.ReadCloser) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetItemTextArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetItemTextArgs) error); ok { + r1 = returnFunc(context1, getItemTextArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3295,32 +3203,32 @@ type Client_GetItemText_Call struct { } // GetItemText is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetItemTextArgs -func (_e *Client_Expecter) GetItemText(_a0 interface{}, _a1 interface{}) *Client_GetItemText_Call { - return &Client_GetItemText_Call{Call: _e.mock.On("GetItemText", _a0, _a1)} +// - context1 +// - getItemTextArgs +func (_e *Client_Expecter) GetItemText(context1 interface{}, getItemTextArgs interface{}) *Client_GetItemText_Call { + return &Client_GetItemText_Call{Call: _e.mock.On("GetItemText", context1, getItemTextArgs)} } -func (_c *Client_GetItemText_Call) Run(run func(_a0 context.Context, _a1 git.GetItemTextArgs)) *Client_GetItemText_Call { +func (_c *Client_GetItemText_Call) Run(run func(context1 context.Context, getItemTextArgs git.GetItemTextArgs)) *Client_GetItemText_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetItemTextArgs)) }) return _c } -func (_c *Client_GetItemText_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetItemText_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetItemText_Call) Return(readCloser io.ReadCloser, err error) *Client_GetItemText_Call { + _c.Call.Return(readCloser, err) return _c } -func (_c *Client_GetItemText_Call) RunAndReturn(run func(context.Context, git.GetItemTextArgs) (io.ReadCloser, error)) *Client_GetItemText_Call { +func (_c *Client_GetItemText_Call) RunAndReturn(run func(context1 context.Context, getItemTextArgs git.GetItemTextArgs) (io.ReadCloser, error)) *Client_GetItemText_Call { _c.Call.Return(run) return _c } -// GetItemZip provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetItemZip(_a0 context.Context, _a1 git.GetItemZipArgs) (io.ReadCloser, error) { - ret := _m.Called(_a0, _a1) +// GetItemZip provides a mock function for the type Client +func (_mock *Client) GetItemZip(context1 context.Context, getItemZipArgs git.GetItemZipArgs) (io.ReadCloser, error) { + ret := _mock.Called(context1, getItemZipArgs) if len(ret) == 0 { panic("no return value specified for GetItemZip") @@ -3328,23 +3236,21 @@ func (_m *Client) GetItemZip(_a0 context.Context, _a1 git.GetItemZipArgs) (io.Re var r0 io.ReadCloser var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetItemZipArgs) (io.ReadCloser, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetItemZipArgs) (io.ReadCloser, error)); ok { + return returnFunc(context1, getItemZipArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetItemZipArgs) io.ReadCloser); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetItemZipArgs) io.ReadCloser); ok { + r0 = returnFunc(context1, getItemZipArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(io.ReadCloser) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetItemZipArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetItemZipArgs) error); ok { + r1 = returnFunc(context1, getItemZipArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3354,32 +3260,32 @@ type Client_GetItemZip_Call struct { } // GetItemZip is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetItemZipArgs -func (_e *Client_Expecter) GetItemZip(_a0 interface{}, _a1 interface{}) *Client_GetItemZip_Call { - return &Client_GetItemZip_Call{Call: _e.mock.On("GetItemZip", _a0, _a1)} +// - context1 +// - getItemZipArgs +func (_e *Client_Expecter) GetItemZip(context1 interface{}, getItemZipArgs interface{}) *Client_GetItemZip_Call { + return &Client_GetItemZip_Call{Call: _e.mock.On("GetItemZip", context1, getItemZipArgs)} } -func (_c *Client_GetItemZip_Call) Run(run func(_a0 context.Context, _a1 git.GetItemZipArgs)) *Client_GetItemZip_Call { +func (_c *Client_GetItemZip_Call) Run(run func(context1 context.Context, getItemZipArgs git.GetItemZipArgs)) *Client_GetItemZip_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetItemZipArgs)) }) return _c } -func (_c *Client_GetItemZip_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetItemZip_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetItemZip_Call) Return(readCloser io.ReadCloser, err error) *Client_GetItemZip_Call { + _c.Call.Return(readCloser, err) return _c } -func (_c *Client_GetItemZip_Call) RunAndReturn(run func(context.Context, git.GetItemZipArgs) (io.ReadCloser, error)) *Client_GetItemZip_Call { +func (_c *Client_GetItemZip_Call) RunAndReturn(run func(context1 context.Context, getItemZipArgs git.GetItemZipArgs) (io.ReadCloser, error)) *Client_GetItemZip_Call { _c.Call.Return(run) return _c } -// GetItems provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetItems(_a0 context.Context, _a1 git.GetItemsArgs) (*[]git.GitItem, error) { - ret := _m.Called(_a0, _a1) +// GetItems provides a mock function for the type Client +func (_mock *Client) GetItems(context1 context.Context, getItemsArgs git.GetItemsArgs) (*[]git.GitItem, error) { + ret := _mock.Called(context1, getItemsArgs) if len(ret) == 0 { panic("no return value specified for GetItems") @@ -3387,23 +3293,21 @@ func (_m *Client) GetItems(_a0 context.Context, _a1 git.GetItemsArgs) (*[]git.Gi var r0 *[]git.GitItem var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetItemsArgs) (*[]git.GitItem, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetItemsArgs) (*[]git.GitItem, error)); ok { + return returnFunc(context1, getItemsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetItemsArgs) *[]git.GitItem); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetItemsArgs) *[]git.GitItem); ok { + r0 = returnFunc(context1, getItemsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitItem) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetItemsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetItemsArgs) error); ok { + r1 = returnFunc(context1, getItemsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3413,32 +3317,32 @@ type Client_GetItems_Call struct { } // GetItems is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetItemsArgs -func (_e *Client_Expecter) GetItems(_a0 interface{}, _a1 interface{}) *Client_GetItems_Call { - return &Client_GetItems_Call{Call: _e.mock.On("GetItems", _a0, _a1)} +// - context1 +// - getItemsArgs +func (_e *Client_Expecter) GetItems(context1 interface{}, getItemsArgs interface{}) *Client_GetItems_Call { + return &Client_GetItems_Call{Call: _e.mock.On("GetItems", context1, getItemsArgs)} } -func (_c *Client_GetItems_Call) Run(run func(_a0 context.Context, _a1 git.GetItemsArgs)) *Client_GetItems_Call { +func (_c *Client_GetItems_Call) Run(run func(context1 context.Context, getItemsArgs git.GetItemsArgs)) *Client_GetItems_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetItemsArgs)) }) return _c } -func (_c *Client_GetItems_Call) Return(_a0 *[]git.GitItem, _a1 error) *Client_GetItems_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetItems_Call) Return(gitItems *[]git.GitItem, err error) *Client_GetItems_Call { + _c.Call.Return(gitItems, err) return _c } -func (_c *Client_GetItems_Call) RunAndReturn(run func(context.Context, git.GetItemsArgs) (*[]git.GitItem, error)) *Client_GetItems_Call { +func (_c *Client_GetItems_Call) RunAndReturn(run func(context1 context.Context, getItemsArgs git.GetItemsArgs) (*[]git.GitItem, error)) *Client_GetItems_Call { _c.Call.Return(run) return _c } -// GetItemsBatch provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetItemsBatch(_a0 context.Context, _a1 git.GetItemsBatchArgs) (*[][]git.GitItem, error) { - ret := _m.Called(_a0, _a1) +// GetItemsBatch provides a mock function for the type Client +func (_mock *Client) GetItemsBatch(context1 context.Context, getItemsBatchArgs git.GetItemsBatchArgs) (*[][]git.GitItem, error) { + ret := _mock.Called(context1, getItemsBatchArgs) if len(ret) == 0 { panic("no return value specified for GetItemsBatch") @@ -3446,23 +3350,21 @@ func (_m *Client) GetItemsBatch(_a0 context.Context, _a1 git.GetItemsBatchArgs) var r0 *[][]git.GitItem var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetItemsBatchArgs) (*[][]git.GitItem, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetItemsBatchArgs) (*[][]git.GitItem, error)); ok { + return returnFunc(context1, getItemsBatchArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetItemsBatchArgs) *[][]git.GitItem); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetItemsBatchArgs) *[][]git.GitItem); ok { + r0 = returnFunc(context1, getItemsBatchArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[][]git.GitItem) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetItemsBatchArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetItemsBatchArgs) error); ok { + r1 = returnFunc(context1, getItemsBatchArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3472,32 +3374,32 @@ type Client_GetItemsBatch_Call struct { } // GetItemsBatch is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetItemsBatchArgs -func (_e *Client_Expecter) GetItemsBatch(_a0 interface{}, _a1 interface{}) *Client_GetItemsBatch_Call { - return &Client_GetItemsBatch_Call{Call: _e.mock.On("GetItemsBatch", _a0, _a1)} +// - context1 +// - getItemsBatchArgs +func (_e *Client_Expecter) GetItemsBatch(context1 interface{}, getItemsBatchArgs interface{}) *Client_GetItemsBatch_Call { + return &Client_GetItemsBatch_Call{Call: _e.mock.On("GetItemsBatch", context1, getItemsBatchArgs)} } -func (_c *Client_GetItemsBatch_Call) Run(run func(_a0 context.Context, _a1 git.GetItemsBatchArgs)) *Client_GetItemsBatch_Call { +func (_c *Client_GetItemsBatch_Call) Run(run func(context1 context.Context, getItemsBatchArgs git.GetItemsBatchArgs)) *Client_GetItemsBatch_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetItemsBatchArgs)) }) return _c } -func (_c *Client_GetItemsBatch_Call) Return(_a0 *[][]git.GitItem, _a1 error) *Client_GetItemsBatch_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetItemsBatch_Call) Return(gitItemss *[][]git.GitItem, err error) *Client_GetItemsBatch_Call { + _c.Call.Return(gitItemss, err) return _c } -func (_c *Client_GetItemsBatch_Call) RunAndReturn(run func(context.Context, git.GetItemsBatchArgs) (*[][]git.GitItem, error)) *Client_GetItemsBatch_Call { +func (_c *Client_GetItemsBatch_Call) RunAndReturn(run func(context1 context.Context, getItemsBatchArgs git.GetItemsBatchArgs) (*[][]git.GitItem, error)) *Client_GetItemsBatch_Call { _c.Call.Return(run) return _c } -// GetLikes provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetLikes(_a0 context.Context, _a1 git.GetLikesArgs) (*[]webapi.IdentityRef, error) { - ret := _m.Called(_a0, _a1) +// GetLikes provides a mock function for the type Client +func (_mock *Client) GetLikes(context1 context.Context, getLikesArgs git.GetLikesArgs) (*[]webapi.IdentityRef, error) { + ret := _mock.Called(context1, getLikesArgs) if len(ret) == 0 { panic("no return value specified for GetLikes") @@ -3505,23 +3407,21 @@ func (_m *Client) GetLikes(_a0 context.Context, _a1 git.GetLikesArgs) (*[]webapi var r0 *[]webapi.IdentityRef var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetLikesArgs) (*[]webapi.IdentityRef, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetLikesArgs) (*[]webapi.IdentityRef, error)); ok { + return returnFunc(context1, getLikesArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetLikesArgs) *[]webapi.IdentityRef); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetLikesArgs) *[]webapi.IdentityRef); ok { + r0 = returnFunc(context1, getLikesArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]webapi.IdentityRef) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetLikesArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetLikesArgs) error); ok { + r1 = returnFunc(context1, getLikesArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3531,32 +3431,32 @@ type Client_GetLikes_Call struct { } // GetLikes is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetLikesArgs -func (_e *Client_Expecter) GetLikes(_a0 interface{}, _a1 interface{}) *Client_GetLikes_Call { - return &Client_GetLikes_Call{Call: _e.mock.On("GetLikes", _a0, _a1)} +// - context1 +// - getLikesArgs +func (_e *Client_Expecter) GetLikes(context1 interface{}, getLikesArgs interface{}) *Client_GetLikes_Call { + return &Client_GetLikes_Call{Call: _e.mock.On("GetLikes", context1, getLikesArgs)} } -func (_c *Client_GetLikes_Call) Run(run func(_a0 context.Context, _a1 git.GetLikesArgs)) *Client_GetLikes_Call { +func (_c *Client_GetLikes_Call) Run(run func(context1 context.Context, getLikesArgs git.GetLikesArgs)) *Client_GetLikes_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetLikesArgs)) }) return _c } -func (_c *Client_GetLikes_Call) Return(_a0 *[]webapi.IdentityRef, _a1 error) *Client_GetLikes_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetLikes_Call) Return(identityRefs *[]webapi.IdentityRef, err error) *Client_GetLikes_Call { + _c.Call.Return(identityRefs, err) return _c } -func (_c *Client_GetLikes_Call) RunAndReturn(run func(context.Context, git.GetLikesArgs) (*[]webapi.IdentityRef, error)) *Client_GetLikes_Call { +func (_c *Client_GetLikes_Call) RunAndReturn(run func(context1 context.Context, getLikesArgs git.GetLikesArgs) (*[]webapi.IdentityRef, error)) *Client_GetLikes_Call { _c.Call.Return(run) return _c } -// GetMergeBases provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetMergeBases(_a0 context.Context, _a1 git.GetMergeBasesArgs) (*[]git.GitCommitRef, error) { - ret := _m.Called(_a0, _a1) +// GetMergeBases provides a mock function for the type Client +func (_mock *Client) GetMergeBases(context1 context.Context, getMergeBasesArgs git.GetMergeBasesArgs) (*[]git.GitCommitRef, error) { + ret := _mock.Called(context1, getMergeBasesArgs) if len(ret) == 0 { panic("no return value specified for GetMergeBases") @@ -3564,23 +3464,21 @@ func (_m *Client) GetMergeBases(_a0 context.Context, _a1 git.GetMergeBasesArgs) var r0 *[]git.GitCommitRef var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetMergeBasesArgs) (*[]git.GitCommitRef, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetMergeBasesArgs) (*[]git.GitCommitRef, error)); ok { + return returnFunc(context1, getMergeBasesArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetMergeBasesArgs) *[]git.GitCommitRef); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetMergeBasesArgs) *[]git.GitCommitRef); ok { + r0 = returnFunc(context1, getMergeBasesArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitCommitRef) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetMergeBasesArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetMergeBasesArgs) error); ok { + r1 = returnFunc(context1, getMergeBasesArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3590,32 +3488,32 @@ type Client_GetMergeBases_Call struct { } // GetMergeBases is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetMergeBasesArgs -func (_e *Client_Expecter) GetMergeBases(_a0 interface{}, _a1 interface{}) *Client_GetMergeBases_Call { - return &Client_GetMergeBases_Call{Call: _e.mock.On("GetMergeBases", _a0, _a1)} +// - context1 +// - getMergeBasesArgs +func (_e *Client_Expecter) GetMergeBases(context1 interface{}, getMergeBasesArgs interface{}) *Client_GetMergeBases_Call { + return &Client_GetMergeBases_Call{Call: _e.mock.On("GetMergeBases", context1, getMergeBasesArgs)} } -func (_c *Client_GetMergeBases_Call) Run(run func(_a0 context.Context, _a1 git.GetMergeBasesArgs)) *Client_GetMergeBases_Call { +func (_c *Client_GetMergeBases_Call) Run(run func(context1 context.Context, getMergeBasesArgs git.GetMergeBasesArgs)) *Client_GetMergeBases_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetMergeBasesArgs)) }) return _c } -func (_c *Client_GetMergeBases_Call) Return(_a0 *[]git.GitCommitRef, _a1 error) *Client_GetMergeBases_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetMergeBases_Call) Return(gitCommitRefs *[]git.GitCommitRef, err error) *Client_GetMergeBases_Call { + _c.Call.Return(gitCommitRefs, err) return _c } -func (_c *Client_GetMergeBases_Call) RunAndReturn(run func(context.Context, git.GetMergeBasesArgs) (*[]git.GitCommitRef, error)) *Client_GetMergeBases_Call { +func (_c *Client_GetMergeBases_Call) RunAndReturn(run func(context1 context.Context, getMergeBasesArgs git.GetMergeBasesArgs) (*[]git.GitCommitRef, error)) *Client_GetMergeBases_Call { _c.Call.Return(run) return _c } -// GetMergeRequest provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetMergeRequest(_a0 context.Context, _a1 git.GetMergeRequestArgs) (*git.GitMerge, error) { - ret := _m.Called(_a0, _a1) +// GetMergeRequest provides a mock function for the type Client +func (_mock *Client) GetMergeRequest(context1 context.Context, getMergeRequestArgs git.GetMergeRequestArgs) (*git.GitMerge, error) { + ret := _mock.Called(context1, getMergeRequestArgs) if len(ret) == 0 { panic("no return value specified for GetMergeRequest") @@ -3623,23 +3521,21 @@ func (_m *Client) GetMergeRequest(_a0 context.Context, _a1 git.GetMergeRequestAr var r0 *git.GitMerge var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetMergeRequestArgs) (*git.GitMerge, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetMergeRequestArgs) (*git.GitMerge, error)); ok { + return returnFunc(context1, getMergeRequestArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetMergeRequestArgs) *git.GitMerge); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetMergeRequestArgs) *git.GitMerge); ok { + r0 = returnFunc(context1, getMergeRequestArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitMerge) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetMergeRequestArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetMergeRequestArgs) error); ok { + r1 = returnFunc(context1, getMergeRequestArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3649,32 +3545,32 @@ type Client_GetMergeRequest_Call struct { } // GetMergeRequest is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetMergeRequestArgs -func (_e *Client_Expecter) GetMergeRequest(_a0 interface{}, _a1 interface{}) *Client_GetMergeRequest_Call { - return &Client_GetMergeRequest_Call{Call: _e.mock.On("GetMergeRequest", _a0, _a1)} +// - context1 +// - getMergeRequestArgs +func (_e *Client_Expecter) GetMergeRequest(context1 interface{}, getMergeRequestArgs interface{}) *Client_GetMergeRequest_Call { + return &Client_GetMergeRequest_Call{Call: _e.mock.On("GetMergeRequest", context1, getMergeRequestArgs)} } -func (_c *Client_GetMergeRequest_Call) Run(run func(_a0 context.Context, _a1 git.GetMergeRequestArgs)) *Client_GetMergeRequest_Call { +func (_c *Client_GetMergeRequest_Call) Run(run func(context1 context.Context, getMergeRequestArgs git.GetMergeRequestArgs)) *Client_GetMergeRequest_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetMergeRequestArgs)) }) return _c } -func (_c *Client_GetMergeRequest_Call) Return(_a0 *git.GitMerge, _a1 error) *Client_GetMergeRequest_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetMergeRequest_Call) Return(gitMerge *git.GitMerge, err error) *Client_GetMergeRequest_Call { + _c.Call.Return(gitMerge, err) return _c } -func (_c *Client_GetMergeRequest_Call) RunAndReturn(run func(context.Context, git.GetMergeRequestArgs) (*git.GitMerge, error)) *Client_GetMergeRequest_Call { +func (_c *Client_GetMergeRequest_Call) RunAndReturn(run func(context1 context.Context, getMergeRequestArgs git.GetMergeRequestArgs) (*git.GitMerge, error)) *Client_GetMergeRequest_Call { _c.Call.Return(run) return _c } -// GetPermission provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPermission(_a0 context.Context, _a1 git.GetPermissionArgs) (*bool, error) { - ret := _m.Called(_a0, _a1) +// GetPermission provides a mock function for the type Client +func (_mock *Client) GetPermission(context1 context.Context, getPermissionArgs git.GetPermissionArgs) (*bool, error) { + ret := _mock.Called(context1, getPermissionArgs) if len(ret) == 0 { panic("no return value specified for GetPermission") @@ -3682,23 +3578,21 @@ func (_m *Client) GetPermission(_a0 context.Context, _a1 git.GetPermissionArgs) var r0 *bool var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPermissionArgs) (*bool, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPermissionArgs) (*bool, error)); ok { + return returnFunc(context1, getPermissionArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPermissionArgs) *bool); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPermissionArgs) *bool); ok { + r0 = returnFunc(context1, getPermissionArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*bool) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPermissionArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPermissionArgs) error); ok { + r1 = returnFunc(context1, getPermissionArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3708,32 +3602,32 @@ type Client_GetPermission_Call struct { } // GetPermission is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPermissionArgs -func (_e *Client_Expecter) GetPermission(_a0 interface{}, _a1 interface{}) *Client_GetPermission_Call { - return &Client_GetPermission_Call{Call: _e.mock.On("GetPermission", _a0, _a1)} +// - context1 +// - getPermissionArgs +func (_e *Client_Expecter) GetPermission(context1 interface{}, getPermissionArgs interface{}) *Client_GetPermission_Call { + return &Client_GetPermission_Call{Call: _e.mock.On("GetPermission", context1, getPermissionArgs)} } -func (_c *Client_GetPermission_Call) Run(run func(_a0 context.Context, _a1 git.GetPermissionArgs)) *Client_GetPermission_Call { +func (_c *Client_GetPermission_Call) Run(run func(context1 context.Context, getPermissionArgs git.GetPermissionArgs)) *Client_GetPermission_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPermissionArgs)) }) return _c } -func (_c *Client_GetPermission_Call) Return(_a0 *bool, _a1 error) *Client_GetPermission_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPermission_Call) Return(b *bool, err error) *Client_GetPermission_Call { + _c.Call.Return(b, err) return _c } -func (_c *Client_GetPermission_Call) RunAndReturn(run func(context.Context, git.GetPermissionArgs) (*bool, error)) *Client_GetPermission_Call { +func (_c *Client_GetPermission_Call) RunAndReturn(run func(context1 context.Context, getPermissionArgs git.GetPermissionArgs) (*bool, error)) *Client_GetPermission_Call { _c.Call.Return(run) return _c } -// GetPolicyConfigurations provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPolicyConfigurations(_a0 context.Context, _a1 git.GetPolicyConfigurationsArgs) (*git.GitPolicyConfigurationResponse, error) { - ret := _m.Called(_a0, _a1) +// GetPolicyConfigurations provides a mock function for the type Client +func (_mock *Client) GetPolicyConfigurations(context1 context.Context, getPolicyConfigurationsArgs git.GetPolicyConfigurationsArgs) (*git.GitPolicyConfigurationResponse, error) { + ret := _mock.Called(context1, getPolicyConfigurationsArgs) if len(ret) == 0 { panic("no return value specified for GetPolicyConfigurations") @@ -3741,23 +3635,21 @@ func (_m *Client) GetPolicyConfigurations(_a0 context.Context, _a1 git.GetPolicy var r0 *git.GitPolicyConfigurationResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPolicyConfigurationsArgs) (*git.GitPolicyConfigurationResponse, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPolicyConfigurationsArgs) (*git.GitPolicyConfigurationResponse, error)); ok { + return returnFunc(context1, getPolicyConfigurationsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPolicyConfigurationsArgs) *git.GitPolicyConfigurationResponse); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPolicyConfigurationsArgs) *git.GitPolicyConfigurationResponse); ok { + r0 = returnFunc(context1, getPolicyConfigurationsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPolicyConfigurationResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPolicyConfigurationsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPolicyConfigurationsArgs) error); ok { + r1 = returnFunc(context1, getPolicyConfigurationsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3767,32 +3659,32 @@ type Client_GetPolicyConfigurations_Call struct { } // GetPolicyConfigurations is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPolicyConfigurationsArgs -func (_e *Client_Expecter) GetPolicyConfigurations(_a0 interface{}, _a1 interface{}) *Client_GetPolicyConfigurations_Call { - return &Client_GetPolicyConfigurations_Call{Call: _e.mock.On("GetPolicyConfigurations", _a0, _a1)} +// - context1 +// - getPolicyConfigurationsArgs +func (_e *Client_Expecter) GetPolicyConfigurations(context1 interface{}, getPolicyConfigurationsArgs interface{}) *Client_GetPolicyConfigurations_Call { + return &Client_GetPolicyConfigurations_Call{Call: _e.mock.On("GetPolicyConfigurations", context1, getPolicyConfigurationsArgs)} } -func (_c *Client_GetPolicyConfigurations_Call) Run(run func(_a0 context.Context, _a1 git.GetPolicyConfigurationsArgs)) *Client_GetPolicyConfigurations_Call { +func (_c *Client_GetPolicyConfigurations_Call) Run(run func(context1 context.Context, getPolicyConfigurationsArgs git.GetPolicyConfigurationsArgs)) *Client_GetPolicyConfigurations_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPolicyConfigurationsArgs)) }) return _c } -func (_c *Client_GetPolicyConfigurations_Call) Return(_a0 *git.GitPolicyConfigurationResponse, _a1 error) *Client_GetPolicyConfigurations_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPolicyConfigurations_Call) Return(gitPolicyConfigurationResponse *git.GitPolicyConfigurationResponse, err error) *Client_GetPolicyConfigurations_Call { + _c.Call.Return(gitPolicyConfigurationResponse, err) return _c } -func (_c *Client_GetPolicyConfigurations_Call) RunAndReturn(run func(context.Context, git.GetPolicyConfigurationsArgs) (*git.GitPolicyConfigurationResponse, error)) *Client_GetPolicyConfigurations_Call { +func (_c *Client_GetPolicyConfigurations_Call) RunAndReturn(run func(context1 context.Context, getPolicyConfigurationsArgs git.GetPolicyConfigurationsArgs) (*git.GitPolicyConfigurationResponse, error)) *Client_GetPolicyConfigurations_Call { _c.Call.Return(run) return _c } -// GetPullRequest provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequest(_a0 context.Context, _a1 git.GetPullRequestArgs) (*git.GitPullRequest, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequest provides a mock function for the type Client +func (_mock *Client) GetPullRequest(context1 context.Context, getPullRequestArgs git.GetPullRequestArgs) (*git.GitPullRequest, error) { + ret := _mock.Called(context1, getPullRequestArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequest") @@ -3800,23 +3692,21 @@ func (_m *Client) GetPullRequest(_a0 context.Context, _a1 git.GetPullRequestArgs var r0 *git.GitPullRequest var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestArgs) (*git.GitPullRequest, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestArgs) (*git.GitPullRequest, error)); ok { + return returnFunc(context1, getPullRequestArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestArgs) *git.GitPullRequest); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestArgs) *git.GitPullRequest); ok { + r0 = returnFunc(context1, getPullRequestArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPullRequest) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestArgs) error); ok { + r1 = returnFunc(context1, getPullRequestArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3826,32 +3716,32 @@ type Client_GetPullRequest_Call struct { } // GetPullRequest is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestArgs -func (_e *Client_Expecter) GetPullRequest(_a0 interface{}, _a1 interface{}) *Client_GetPullRequest_Call { - return &Client_GetPullRequest_Call{Call: _e.mock.On("GetPullRequest", _a0, _a1)} +// - context1 +// - getPullRequestArgs +func (_e *Client_Expecter) GetPullRequest(context1 interface{}, getPullRequestArgs interface{}) *Client_GetPullRequest_Call { + return &Client_GetPullRequest_Call{Call: _e.mock.On("GetPullRequest", context1, getPullRequestArgs)} } -func (_c *Client_GetPullRequest_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestArgs)) *Client_GetPullRequest_Call { +func (_c *Client_GetPullRequest_Call) Run(run func(context1 context.Context, getPullRequestArgs git.GetPullRequestArgs)) *Client_GetPullRequest_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestArgs)) }) return _c } -func (_c *Client_GetPullRequest_Call) Return(_a0 *git.GitPullRequest, _a1 error) *Client_GetPullRequest_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequest_Call) Return(gitPullRequest *git.GitPullRequest, err error) *Client_GetPullRequest_Call { + _c.Call.Return(gitPullRequest, err) return _c } -func (_c *Client_GetPullRequest_Call) RunAndReturn(run func(context.Context, git.GetPullRequestArgs) (*git.GitPullRequest, error)) *Client_GetPullRequest_Call { +func (_c *Client_GetPullRequest_Call) RunAndReturn(run func(context1 context.Context, getPullRequestArgs git.GetPullRequestArgs) (*git.GitPullRequest, error)) *Client_GetPullRequest_Call { _c.Call.Return(run) return _c } -// GetPullRequestById provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestById(_a0 context.Context, _a1 git.GetPullRequestByIdArgs) (*git.GitPullRequest, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestById provides a mock function for the type Client +func (_mock *Client) GetPullRequestById(context1 context.Context, getPullRequestByIdArgs git.GetPullRequestByIdArgs) (*git.GitPullRequest, error) { + ret := _mock.Called(context1, getPullRequestByIdArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestById") @@ -3859,23 +3749,21 @@ func (_m *Client) GetPullRequestById(_a0 context.Context, _a1 git.GetPullRequest var r0 *git.GitPullRequest var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestByIdArgs) (*git.GitPullRequest, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestByIdArgs) (*git.GitPullRequest, error)); ok { + return returnFunc(context1, getPullRequestByIdArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestByIdArgs) *git.GitPullRequest); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestByIdArgs) *git.GitPullRequest); ok { + r0 = returnFunc(context1, getPullRequestByIdArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPullRequest) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestByIdArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestByIdArgs) error); ok { + r1 = returnFunc(context1, getPullRequestByIdArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3885,32 +3773,32 @@ type Client_GetPullRequestById_Call struct { } // GetPullRequestById is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestByIdArgs -func (_e *Client_Expecter) GetPullRequestById(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestById_Call { - return &Client_GetPullRequestById_Call{Call: _e.mock.On("GetPullRequestById", _a0, _a1)} +// - context1 +// - getPullRequestByIdArgs +func (_e *Client_Expecter) GetPullRequestById(context1 interface{}, getPullRequestByIdArgs interface{}) *Client_GetPullRequestById_Call { + return &Client_GetPullRequestById_Call{Call: _e.mock.On("GetPullRequestById", context1, getPullRequestByIdArgs)} } -func (_c *Client_GetPullRequestById_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestByIdArgs)) *Client_GetPullRequestById_Call { +func (_c *Client_GetPullRequestById_Call) Run(run func(context1 context.Context, getPullRequestByIdArgs git.GetPullRequestByIdArgs)) *Client_GetPullRequestById_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestByIdArgs)) }) return _c } -func (_c *Client_GetPullRequestById_Call) Return(_a0 *git.GitPullRequest, _a1 error) *Client_GetPullRequestById_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestById_Call) Return(gitPullRequest *git.GitPullRequest, err error) *Client_GetPullRequestById_Call { + _c.Call.Return(gitPullRequest, err) return _c } -func (_c *Client_GetPullRequestById_Call) RunAndReturn(run func(context.Context, git.GetPullRequestByIdArgs) (*git.GitPullRequest, error)) *Client_GetPullRequestById_Call { +func (_c *Client_GetPullRequestById_Call) RunAndReturn(run func(context1 context.Context, getPullRequestByIdArgs git.GetPullRequestByIdArgs) (*git.GitPullRequest, error)) *Client_GetPullRequestById_Call { _c.Call.Return(run) return _c } -// GetPullRequestCommits provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestCommits(_a0 context.Context, _a1 git.GetPullRequestCommitsArgs) (*git.GetPullRequestCommitsResponseValue, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestCommits provides a mock function for the type Client +func (_mock *Client) GetPullRequestCommits(context1 context.Context, getPullRequestCommitsArgs git.GetPullRequestCommitsArgs) (*git.GetPullRequestCommitsResponseValue, error) { + ret := _mock.Called(context1, getPullRequestCommitsArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestCommits") @@ -3918,23 +3806,21 @@ func (_m *Client) GetPullRequestCommits(_a0 context.Context, _a1 git.GetPullRequ var r0 *git.GetPullRequestCommitsResponseValue var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestCommitsArgs) (*git.GetPullRequestCommitsResponseValue, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestCommitsArgs) (*git.GetPullRequestCommitsResponseValue, error)); ok { + return returnFunc(context1, getPullRequestCommitsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestCommitsArgs) *git.GetPullRequestCommitsResponseValue); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestCommitsArgs) *git.GetPullRequestCommitsResponseValue); ok { + r0 = returnFunc(context1, getPullRequestCommitsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GetPullRequestCommitsResponseValue) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestCommitsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestCommitsArgs) error); ok { + r1 = returnFunc(context1, getPullRequestCommitsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -3944,32 +3830,32 @@ type Client_GetPullRequestCommits_Call struct { } // GetPullRequestCommits is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestCommitsArgs -func (_e *Client_Expecter) GetPullRequestCommits(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestCommits_Call { - return &Client_GetPullRequestCommits_Call{Call: _e.mock.On("GetPullRequestCommits", _a0, _a1)} +// - context1 +// - getPullRequestCommitsArgs +func (_e *Client_Expecter) GetPullRequestCommits(context1 interface{}, getPullRequestCommitsArgs interface{}) *Client_GetPullRequestCommits_Call { + return &Client_GetPullRequestCommits_Call{Call: _e.mock.On("GetPullRequestCommits", context1, getPullRequestCommitsArgs)} } -func (_c *Client_GetPullRequestCommits_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestCommitsArgs)) *Client_GetPullRequestCommits_Call { +func (_c *Client_GetPullRequestCommits_Call) Run(run func(context1 context.Context, getPullRequestCommitsArgs git.GetPullRequestCommitsArgs)) *Client_GetPullRequestCommits_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestCommitsArgs)) }) return _c } -func (_c *Client_GetPullRequestCommits_Call) Return(_a0 *git.GetPullRequestCommitsResponseValue, _a1 error) *Client_GetPullRequestCommits_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestCommits_Call) Return(getPullRequestCommitsResponseValue *git.GetPullRequestCommitsResponseValue, err error) *Client_GetPullRequestCommits_Call { + _c.Call.Return(getPullRequestCommitsResponseValue, err) return _c } -func (_c *Client_GetPullRequestCommits_Call) RunAndReturn(run func(context.Context, git.GetPullRequestCommitsArgs) (*git.GetPullRequestCommitsResponseValue, error)) *Client_GetPullRequestCommits_Call { +func (_c *Client_GetPullRequestCommits_Call) RunAndReturn(run func(context1 context.Context, getPullRequestCommitsArgs git.GetPullRequestCommitsArgs) (*git.GetPullRequestCommitsResponseValue, error)) *Client_GetPullRequestCommits_Call { _c.Call.Return(run) return _c } -// GetPullRequestIteration provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestIteration(_a0 context.Context, _a1 git.GetPullRequestIterationArgs) (*git.GitPullRequestIteration, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestIteration provides a mock function for the type Client +func (_mock *Client) GetPullRequestIteration(context1 context.Context, getPullRequestIterationArgs git.GetPullRequestIterationArgs) (*git.GitPullRequestIteration, error) { + ret := _mock.Called(context1, getPullRequestIterationArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestIteration") @@ -3977,23 +3863,21 @@ func (_m *Client) GetPullRequestIteration(_a0 context.Context, _a1 git.GetPullRe var r0 *git.GitPullRequestIteration var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationArgs) (*git.GitPullRequestIteration, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationArgs) (*git.GitPullRequestIteration, error)); ok { + return returnFunc(context1, getPullRequestIterationArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationArgs) *git.GitPullRequestIteration); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationArgs) *git.GitPullRequestIteration); ok { + r0 = returnFunc(context1, getPullRequestIterationArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPullRequestIteration) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestIterationArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestIterationArgs) error); ok { + r1 = returnFunc(context1, getPullRequestIterationArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4003,32 +3887,32 @@ type Client_GetPullRequestIteration_Call struct { } // GetPullRequestIteration is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestIterationArgs -func (_e *Client_Expecter) GetPullRequestIteration(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestIteration_Call { - return &Client_GetPullRequestIteration_Call{Call: _e.mock.On("GetPullRequestIteration", _a0, _a1)} +// - context1 +// - getPullRequestIterationArgs +func (_e *Client_Expecter) GetPullRequestIteration(context1 interface{}, getPullRequestIterationArgs interface{}) *Client_GetPullRequestIteration_Call { + return &Client_GetPullRequestIteration_Call{Call: _e.mock.On("GetPullRequestIteration", context1, getPullRequestIterationArgs)} } -func (_c *Client_GetPullRequestIteration_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestIterationArgs)) *Client_GetPullRequestIteration_Call { +func (_c *Client_GetPullRequestIteration_Call) Run(run func(context1 context.Context, getPullRequestIterationArgs git.GetPullRequestIterationArgs)) *Client_GetPullRequestIteration_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestIterationArgs)) }) return _c } -func (_c *Client_GetPullRequestIteration_Call) Return(_a0 *git.GitPullRequestIteration, _a1 error) *Client_GetPullRequestIteration_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestIteration_Call) Return(gitPullRequestIteration *git.GitPullRequestIteration, err error) *Client_GetPullRequestIteration_Call { + _c.Call.Return(gitPullRequestIteration, err) return _c } -func (_c *Client_GetPullRequestIteration_Call) RunAndReturn(run func(context.Context, git.GetPullRequestIterationArgs) (*git.GitPullRequestIteration, error)) *Client_GetPullRequestIteration_Call { +func (_c *Client_GetPullRequestIteration_Call) RunAndReturn(run func(context1 context.Context, getPullRequestIterationArgs git.GetPullRequestIterationArgs) (*git.GitPullRequestIteration, error)) *Client_GetPullRequestIteration_Call { _c.Call.Return(run) return _c } -// GetPullRequestIterationChanges provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestIterationChanges(_a0 context.Context, _a1 git.GetPullRequestIterationChangesArgs) (*git.GitPullRequestIterationChanges, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestIterationChanges provides a mock function for the type Client +func (_mock *Client) GetPullRequestIterationChanges(context1 context.Context, getPullRequestIterationChangesArgs git.GetPullRequestIterationChangesArgs) (*git.GitPullRequestIterationChanges, error) { + ret := _mock.Called(context1, getPullRequestIterationChangesArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestIterationChanges") @@ -4036,23 +3920,21 @@ func (_m *Client) GetPullRequestIterationChanges(_a0 context.Context, _a1 git.Ge var r0 *git.GitPullRequestIterationChanges var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationChangesArgs) (*git.GitPullRequestIterationChanges, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationChangesArgs) (*git.GitPullRequestIterationChanges, error)); ok { + return returnFunc(context1, getPullRequestIterationChangesArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationChangesArgs) *git.GitPullRequestIterationChanges); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationChangesArgs) *git.GitPullRequestIterationChanges); ok { + r0 = returnFunc(context1, getPullRequestIterationChangesArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPullRequestIterationChanges) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestIterationChangesArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestIterationChangesArgs) error); ok { + r1 = returnFunc(context1, getPullRequestIterationChangesArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4062,32 +3944,32 @@ type Client_GetPullRequestIterationChanges_Call struct { } // GetPullRequestIterationChanges is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestIterationChangesArgs -func (_e *Client_Expecter) GetPullRequestIterationChanges(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestIterationChanges_Call { - return &Client_GetPullRequestIterationChanges_Call{Call: _e.mock.On("GetPullRequestIterationChanges", _a0, _a1)} +// - context1 +// - getPullRequestIterationChangesArgs +func (_e *Client_Expecter) GetPullRequestIterationChanges(context1 interface{}, getPullRequestIterationChangesArgs interface{}) *Client_GetPullRequestIterationChanges_Call { + return &Client_GetPullRequestIterationChanges_Call{Call: _e.mock.On("GetPullRequestIterationChanges", context1, getPullRequestIterationChangesArgs)} } -func (_c *Client_GetPullRequestIterationChanges_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestIterationChangesArgs)) *Client_GetPullRequestIterationChanges_Call { +func (_c *Client_GetPullRequestIterationChanges_Call) Run(run func(context1 context.Context, getPullRequestIterationChangesArgs git.GetPullRequestIterationChangesArgs)) *Client_GetPullRequestIterationChanges_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestIterationChangesArgs)) }) return _c } -func (_c *Client_GetPullRequestIterationChanges_Call) Return(_a0 *git.GitPullRequestIterationChanges, _a1 error) *Client_GetPullRequestIterationChanges_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestIterationChanges_Call) Return(gitPullRequestIterationChanges *git.GitPullRequestIterationChanges, err error) *Client_GetPullRequestIterationChanges_Call { + _c.Call.Return(gitPullRequestIterationChanges, err) return _c } -func (_c *Client_GetPullRequestIterationChanges_Call) RunAndReturn(run func(context.Context, git.GetPullRequestIterationChangesArgs) (*git.GitPullRequestIterationChanges, error)) *Client_GetPullRequestIterationChanges_Call { +func (_c *Client_GetPullRequestIterationChanges_Call) RunAndReturn(run func(context1 context.Context, getPullRequestIterationChangesArgs git.GetPullRequestIterationChangesArgs) (*git.GitPullRequestIterationChanges, error)) *Client_GetPullRequestIterationChanges_Call { _c.Call.Return(run) return _c } -// GetPullRequestIterationCommits provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestIterationCommits(_a0 context.Context, _a1 git.GetPullRequestIterationCommitsArgs) (*[]git.GitCommitRef, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestIterationCommits provides a mock function for the type Client +func (_mock *Client) GetPullRequestIterationCommits(context1 context.Context, getPullRequestIterationCommitsArgs git.GetPullRequestIterationCommitsArgs) (*[]git.GitCommitRef, error) { + ret := _mock.Called(context1, getPullRequestIterationCommitsArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestIterationCommits") @@ -4095,23 +3977,21 @@ func (_m *Client) GetPullRequestIterationCommits(_a0 context.Context, _a1 git.Ge var r0 *[]git.GitCommitRef var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationCommitsArgs) (*[]git.GitCommitRef, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationCommitsArgs) (*[]git.GitCommitRef, error)); ok { + return returnFunc(context1, getPullRequestIterationCommitsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationCommitsArgs) *[]git.GitCommitRef); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationCommitsArgs) *[]git.GitCommitRef); ok { + r0 = returnFunc(context1, getPullRequestIterationCommitsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitCommitRef) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestIterationCommitsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestIterationCommitsArgs) error); ok { + r1 = returnFunc(context1, getPullRequestIterationCommitsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4121,32 +4001,32 @@ type Client_GetPullRequestIterationCommits_Call struct { } // GetPullRequestIterationCommits is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestIterationCommitsArgs -func (_e *Client_Expecter) GetPullRequestIterationCommits(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestIterationCommits_Call { - return &Client_GetPullRequestIterationCommits_Call{Call: _e.mock.On("GetPullRequestIterationCommits", _a0, _a1)} +// - context1 +// - getPullRequestIterationCommitsArgs +func (_e *Client_Expecter) GetPullRequestIterationCommits(context1 interface{}, getPullRequestIterationCommitsArgs interface{}) *Client_GetPullRequestIterationCommits_Call { + return &Client_GetPullRequestIterationCommits_Call{Call: _e.mock.On("GetPullRequestIterationCommits", context1, getPullRequestIterationCommitsArgs)} } -func (_c *Client_GetPullRequestIterationCommits_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestIterationCommitsArgs)) *Client_GetPullRequestIterationCommits_Call { +func (_c *Client_GetPullRequestIterationCommits_Call) Run(run func(context1 context.Context, getPullRequestIterationCommitsArgs git.GetPullRequestIterationCommitsArgs)) *Client_GetPullRequestIterationCommits_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestIterationCommitsArgs)) }) return _c } -func (_c *Client_GetPullRequestIterationCommits_Call) Return(_a0 *[]git.GitCommitRef, _a1 error) *Client_GetPullRequestIterationCommits_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestIterationCommits_Call) Return(gitCommitRefs *[]git.GitCommitRef, err error) *Client_GetPullRequestIterationCommits_Call { + _c.Call.Return(gitCommitRefs, err) return _c } -func (_c *Client_GetPullRequestIterationCommits_Call) RunAndReturn(run func(context.Context, git.GetPullRequestIterationCommitsArgs) (*[]git.GitCommitRef, error)) *Client_GetPullRequestIterationCommits_Call { +func (_c *Client_GetPullRequestIterationCommits_Call) RunAndReturn(run func(context1 context.Context, getPullRequestIterationCommitsArgs git.GetPullRequestIterationCommitsArgs) (*[]git.GitCommitRef, error)) *Client_GetPullRequestIterationCommits_Call { _c.Call.Return(run) return _c } -// GetPullRequestIterationStatus provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestIterationStatus(_a0 context.Context, _a1 git.GetPullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestIterationStatus provides a mock function for the type Client +func (_mock *Client) GetPullRequestIterationStatus(context1 context.Context, getPullRequestIterationStatusArgs git.GetPullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error) { + ret := _mock.Called(context1, getPullRequestIterationStatusArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestIterationStatus") @@ -4154,23 +4034,21 @@ func (_m *Client) GetPullRequestIterationStatus(_a0 context.Context, _a1 git.Get var r0 *git.GitPullRequestStatus var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error)); ok { + return returnFunc(context1, getPullRequestIterationStatusArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationStatusArgs) *git.GitPullRequestStatus); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationStatusArgs) *git.GitPullRequestStatus); ok { + r0 = returnFunc(context1, getPullRequestIterationStatusArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPullRequestStatus) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestIterationStatusArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestIterationStatusArgs) error); ok { + r1 = returnFunc(context1, getPullRequestIterationStatusArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4180,32 +4058,32 @@ type Client_GetPullRequestIterationStatus_Call struct { } // GetPullRequestIterationStatus is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestIterationStatusArgs -func (_e *Client_Expecter) GetPullRequestIterationStatus(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestIterationStatus_Call { - return &Client_GetPullRequestIterationStatus_Call{Call: _e.mock.On("GetPullRequestIterationStatus", _a0, _a1)} +// - context1 +// - getPullRequestIterationStatusArgs +func (_e *Client_Expecter) GetPullRequestIterationStatus(context1 interface{}, getPullRequestIterationStatusArgs interface{}) *Client_GetPullRequestIterationStatus_Call { + return &Client_GetPullRequestIterationStatus_Call{Call: _e.mock.On("GetPullRequestIterationStatus", context1, getPullRequestIterationStatusArgs)} } -func (_c *Client_GetPullRequestIterationStatus_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestIterationStatusArgs)) *Client_GetPullRequestIterationStatus_Call { +func (_c *Client_GetPullRequestIterationStatus_Call) Run(run func(context1 context.Context, getPullRequestIterationStatusArgs git.GetPullRequestIterationStatusArgs)) *Client_GetPullRequestIterationStatus_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestIterationStatusArgs)) }) return _c } -func (_c *Client_GetPullRequestIterationStatus_Call) Return(_a0 *git.GitPullRequestStatus, _a1 error) *Client_GetPullRequestIterationStatus_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestIterationStatus_Call) Return(gitPullRequestStatus *git.GitPullRequestStatus, err error) *Client_GetPullRequestIterationStatus_Call { + _c.Call.Return(gitPullRequestStatus, err) return _c } -func (_c *Client_GetPullRequestIterationStatus_Call) RunAndReturn(run func(context.Context, git.GetPullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error)) *Client_GetPullRequestIterationStatus_Call { +func (_c *Client_GetPullRequestIterationStatus_Call) RunAndReturn(run func(context1 context.Context, getPullRequestIterationStatusArgs git.GetPullRequestIterationStatusArgs) (*git.GitPullRequestStatus, error)) *Client_GetPullRequestIterationStatus_Call { _c.Call.Return(run) return _c } -// GetPullRequestIterationStatuses provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestIterationStatuses(_a0 context.Context, _a1 git.GetPullRequestIterationStatusesArgs) (*[]git.GitPullRequestStatus, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestIterationStatuses provides a mock function for the type Client +func (_mock *Client) GetPullRequestIterationStatuses(context1 context.Context, getPullRequestIterationStatusesArgs git.GetPullRequestIterationStatusesArgs) (*[]git.GitPullRequestStatus, error) { + ret := _mock.Called(context1, getPullRequestIterationStatusesArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestIterationStatuses") @@ -4213,23 +4091,21 @@ func (_m *Client) GetPullRequestIterationStatuses(_a0 context.Context, _a1 git.G var r0 *[]git.GitPullRequestStatus var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationStatusesArgs) (*[]git.GitPullRequestStatus, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationStatusesArgs) (*[]git.GitPullRequestStatus, error)); ok { + return returnFunc(context1, getPullRequestIterationStatusesArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationStatusesArgs) *[]git.GitPullRequestStatus); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationStatusesArgs) *[]git.GitPullRequestStatus); ok { + r0 = returnFunc(context1, getPullRequestIterationStatusesArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitPullRequestStatus) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestIterationStatusesArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestIterationStatusesArgs) error); ok { + r1 = returnFunc(context1, getPullRequestIterationStatusesArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4239,32 +4115,32 @@ type Client_GetPullRequestIterationStatuses_Call struct { } // GetPullRequestIterationStatuses is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestIterationStatusesArgs -func (_e *Client_Expecter) GetPullRequestIterationStatuses(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestIterationStatuses_Call { - return &Client_GetPullRequestIterationStatuses_Call{Call: _e.mock.On("GetPullRequestIterationStatuses", _a0, _a1)} +// - context1 +// - getPullRequestIterationStatusesArgs +func (_e *Client_Expecter) GetPullRequestIterationStatuses(context1 interface{}, getPullRequestIterationStatusesArgs interface{}) *Client_GetPullRequestIterationStatuses_Call { + return &Client_GetPullRequestIterationStatuses_Call{Call: _e.mock.On("GetPullRequestIterationStatuses", context1, getPullRequestIterationStatusesArgs)} } -func (_c *Client_GetPullRequestIterationStatuses_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestIterationStatusesArgs)) *Client_GetPullRequestIterationStatuses_Call { +func (_c *Client_GetPullRequestIterationStatuses_Call) Run(run func(context1 context.Context, getPullRequestIterationStatusesArgs git.GetPullRequestIterationStatusesArgs)) *Client_GetPullRequestIterationStatuses_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestIterationStatusesArgs)) }) return _c } -func (_c *Client_GetPullRequestIterationStatuses_Call) Return(_a0 *[]git.GitPullRequestStatus, _a1 error) *Client_GetPullRequestIterationStatuses_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestIterationStatuses_Call) Return(gitPullRequestStatuss *[]git.GitPullRequestStatus, err error) *Client_GetPullRequestIterationStatuses_Call { + _c.Call.Return(gitPullRequestStatuss, err) return _c } -func (_c *Client_GetPullRequestIterationStatuses_Call) RunAndReturn(run func(context.Context, git.GetPullRequestIterationStatusesArgs) (*[]git.GitPullRequestStatus, error)) *Client_GetPullRequestIterationStatuses_Call { +func (_c *Client_GetPullRequestIterationStatuses_Call) RunAndReturn(run func(context1 context.Context, getPullRequestIterationStatusesArgs git.GetPullRequestIterationStatusesArgs) (*[]git.GitPullRequestStatus, error)) *Client_GetPullRequestIterationStatuses_Call { _c.Call.Return(run) return _c } -// GetPullRequestIterations provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestIterations(_a0 context.Context, _a1 git.GetPullRequestIterationsArgs) (*[]git.GitPullRequestIteration, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestIterations provides a mock function for the type Client +func (_mock *Client) GetPullRequestIterations(context1 context.Context, getPullRequestIterationsArgs git.GetPullRequestIterationsArgs) (*[]git.GitPullRequestIteration, error) { + ret := _mock.Called(context1, getPullRequestIterationsArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestIterations") @@ -4272,23 +4148,21 @@ func (_m *Client) GetPullRequestIterations(_a0 context.Context, _a1 git.GetPullR var r0 *[]git.GitPullRequestIteration var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationsArgs) (*[]git.GitPullRequestIteration, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationsArgs) (*[]git.GitPullRequestIteration, error)); ok { + return returnFunc(context1, getPullRequestIterationsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationsArgs) *[]git.GitPullRequestIteration); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestIterationsArgs) *[]git.GitPullRequestIteration); ok { + r0 = returnFunc(context1, getPullRequestIterationsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitPullRequestIteration) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestIterationsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestIterationsArgs) error); ok { + r1 = returnFunc(context1, getPullRequestIterationsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4298,32 +4172,32 @@ type Client_GetPullRequestIterations_Call struct { } // GetPullRequestIterations is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestIterationsArgs -func (_e *Client_Expecter) GetPullRequestIterations(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestIterations_Call { - return &Client_GetPullRequestIterations_Call{Call: _e.mock.On("GetPullRequestIterations", _a0, _a1)} +// - context1 +// - getPullRequestIterationsArgs +func (_e *Client_Expecter) GetPullRequestIterations(context1 interface{}, getPullRequestIterationsArgs interface{}) *Client_GetPullRequestIterations_Call { + return &Client_GetPullRequestIterations_Call{Call: _e.mock.On("GetPullRequestIterations", context1, getPullRequestIterationsArgs)} } -func (_c *Client_GetPullRequestIterations_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestIterationsArgs)) *Client_GetPullRequestIterations_Call { +func (_c *Client_GetPullRequestIterations_Call) Run(run func(context1 context.Context, getPullRequestIterationsArgs git.GetPullRequestIterationsArgs)) *Client_GetPullRequestIterations_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestIterationsArgs)) }) return _c } -func (_c *Client_GetPullRequestIterations_Call) Return(_a0 *[]git.GitPullRequestIteration, _a1 error) *Client_GetPullRequestIterations_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestIterations_Call) Return(gitPullRequestIterations *[]git.GitPullRequestIteration, err error) *Client_GetPullRequestIterations_Call { + _c.Call.Return(gitPullRequestIterations, err) return _c } -func (_c *Client_GetPullRequestIterations_Call) RunAndReturn(run func(context.Context, git.GetPullRequestIterationsArgs) (*[]git.GitPullRequestIteration, error)) *Client_GetPullRequestIterations_Call { +func (_c *Client_GetPullRequestIterations_Call) RunAndReturn(run func(context1 context.Context, getPullRequestIterationsArgs git.GetPullRequestIterationsArgs) (*[]git.GitPullRequestIteration, error)) *Client_GetPullRequestIterations_Call { _c.Call.Return(run) return _c } -// GetPullRequestLabel provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestLabel(_a0 context.Context, _a1 git.GetPullRequestLabelArgs) (*core.WebApiTagDefinition, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestLabel provides a mock function for the type Client +func (_mock *Client) GetPullRequestLabel(context1 context.Context, getPullRequestLabelArgs git.GetPullRequestLabelArgs) (*core.WebApiTagDefinition, error) { + ret := _mock.Called(context1, getPullRequestLabelArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestLabel") @@ -4331,23 +4205,21 @@ func (_m *Client) GetPullRequestLabel(_a0 context.Context, _a1 git.GetPullReques var r0 *core.WebApiTagDefinition var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestLabelArgs) (*core.WebApiTagDefinition, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestLabelArgs) (*core.WebApiTagDefinition, error)); ok { + return returnFunc(context1, getPullRequestLabelArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestLabelArgs) *core.WebApiTagDefinition); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestLabelArgs) *core.WebApiTagDefinition); ok { + r0 = returnFunc(context1, getPullRequestLabelArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*core.WebApiTagDefinition) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestLabelArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestLabelArgs) error); ok { + r1 = returnFunc(context1, getPullRequestLabelArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4357,32 +4229,32 @@ type Client_GetPullRequestLabel_Call struct { } // GetPullRequestLabel is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestLabelArgs -func (_e *Client_Expecter) GetPullRequestLabel(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestLabel_Call { - return &Client_GetPullRequestLabel_Call{Call: _e.mock.On("GetPullRequestLabel", _a0, _a1)} +// - context1 +// - getPullRequestLabelArgs +func (_e *Client_Expecter) GetPullRequestLabel(context1 interface{}, getPullRequestLabelArgs interface{}) *Client_GetPullRequestLabel_Call { + return &Client_GetPullRequestLabel_Call{Call: _e.mock.On("GetPullRequestLabel", context1, getPullRequestLabelArgs)} } -func (_c *Client_GetPullRequestLabel_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestLabelArgs)) *Client_GetPullRequestLabel_Call { +func (_c *Client_GetPullRequestLabel_Call) Run(run func(context1 context.Context, getPullRequestLabelArgs git.GetPullRequestLabelArgs)) *Client_GetPullRequestLabel_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestLabelArgs)) }) return _c } -func (_c *Client_GetPullRequestLabel_Call) Return(_a0 *core.WebApiTagDefinition, _a1 error) *Client_GetPullRequestLabel_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestLabel_Call) Return(webApiTagDefinition *core.WebApiTagDefinition, err error) *Client_GetPullRequestLabel_Call { + _c.Call.Return(webApiTagDefinition, err) return _c } -func (_c *Client_GetPullRequestLabel_Call) RunAndReturn(run func(context.Context, git.GetPullRequestLabelArgs) (*core.WebApiTagDefinition, error)) *Client_GetPullRequestLabel_Call { +func (_c *Client_GetPullRequestLabel_Call) RunAndReturn(run func(context1 context.Context, getPullRequestLabelArgs git.GetPullRequestLabelArgs) (*core.WebApiTagDefinition, error)) *Client_GetPullRequestLabel_Call { _c.Call.Return(run) return _c } -// GetPullRequestLabels provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestLabels(_a0 context.Context, _a1 git.GetPullRequestLabelsArgs) (*[]core.WebApiTagDefinition, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestLabels provides a mock function for the type Client +func (_mock *Client) GetPullRequestLabels(context1 context.Context, getPullRequestLabelsArgs git.GetPullRequestLabelsArgs) (*[]core.WebApiTagDefinition, error) { + ret := _mock.Called(context1, getPullRequestLabelsArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestLabels") @@ -4390,23 +4262,21 @@ func (_m *Client) GetPullRequestLabels(_a0 context.Context, _a1 git.GetPullReque var r0 *[]core.WebApiTagDefinition var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestLabelsArgs) (*[]core.WebApiTagDefinition, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestLabelsArgs) (*[]core.WebApiTagDefinition, error)); ok { + return returnFunc(context1, getPullRequestLabelsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestLabelsArgs) *[]core.WebApiTagDefinition); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestLabelsArgs) *[]core.WebApiTagDefinition); ok { + r0 = returnFunc(context1, getPullRequestLabelsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]core.WebApiTagDefinition) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestLabelsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestLabelsArgs) error); ok { + r1 = returnFunc(context1, getPullRequestLabelsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4416,32 +4286,32 @@ type Client_GetPullRequestLabels_Call struct { } // GetPullRequestLabels is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestLabelsArgs -func (_e *Client_Expecter) GetPullRequestLabels(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestLabels_Call { - return &Client_GetPullRequestLabels_Call{Call: _e.mock.On("GetPullRequestLabels", _a0, _a1)} +// - context1 +// - getPullRequestLabelsArgs +func (_e *Client_Expecter) GetPullRequestLabels(context1 interface{}, getPullRequestLabelsArgs interface{}) *Client_GetPullRequestLabels_Call { + return &Client_GetPullRequestLabels_Call{Call: _e.mock.On("GetPullRequestLabels", context1, getPullRequestLabelsArgs)} } -func (_c *Client_GetPullRequestLabels_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestLabelsArgs)) *Client_GetPullRequestLabels_Call { +func (_c *Client_GetPullRequestLabels_Call) Run(run func(context1 context.Context, getPullRequestLabelsArgs git.GetPullRequestLabelsArgs)) *Client_GetPullRequestLabels_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestLabelsArgs)) }) return _c } -func (_c *Client_GetPullRequestLabels_Call) Return(_a0 *[]core.WebApiTagDefinition, _a1 error) *Client_GetPullRequestLabels_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestLabels_Call) Return(webApiTagDefinitions *[]core.WebApiTagDefinition, err error) *Client_GetPullRequestLabels_Call { + _c.Call.Return(webApiTagDefinitions, err) return _c } -func (_c *Client_GetPullRequestLabels_Call) RunAndReturn(run func(context.Context, git.GetPullRequestLabelsArgs) (*[]core.WebApiTagDefinition, error)) *Client_GetPullRequestLabels_Call { +func (_c *Client_GetPullRequestLabels_Call) RunAndReturn(run func(context1 context.Context, getPullRequestLabelsArgs git.GetPullRequestLabelsArgs) (*[]core.WebApiTagDefinition, error)) *Client_GetPullRequestLabels_Call { _c.Call.Return(run) return _c } -// GetPullRequestProperties provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestProperties(_a0 context.Context, _a1 git.GetPullRequestPropertiesArgs) (interface{}, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestProperties provides a mock function for the type Client +func (_mock *Client) GetPullRequestProperties(context1 context.Context, getPullRequestPropertiesArgs git.GetPullRequestPropertiesArgs) (interface{}, error) { + ret := _mock.Called(context1, getPullRequestPropertiesArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestProperties") @@ -4449,23 +4319,21 @@ func (_m *Client) GetPullRequestProperties(_a0 context.Context, _a1 git.GetPullR var r0 interface{} var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestPropertiesArgs) (interface{}, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestPropertiesArgs) (interface{}, error)); ok { + return returnFunc(context1, getPullRequestPropertiesArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestPropertiesArgs) interface{}); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestPropertiesArgs) interface{}); ok { + r0 = returnFunc(context1, getPullRequestPropertiesArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(interface{}) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestPropertiesArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestPropertiesArgs) error); ok { + r1 = returnFunc(context1, getPullRequestPropertiesArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4475,32 +4343,32 @@ type Client_GetPullRequestProperties_Call struct { } // GetPullRequestProperties is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestPropertiesArgs -func (_e *Client_Expecter) GetPullRequestProperties(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestProperties_Call { - return &Client_GetPullRequestProperties_Call{Call: _e.mock.On("GetPullRequestProperties", _a0, _a1)} +// - context1 +// - getPullRequestPropertiesArgs +func (_e *Client_Expecter) GetPullRequestProperties(context1 interface{}, getPullRequestPropertiesArgs interface{}) *Client_GetPullRequestProperties_Call { + return &Client_GetPullRequestProperties_Call{Call: _e.mock.On("GetPullRequestProperties", context1, getPullRequestPropertiesArgs)} } -func (_c *Client_GetPullRequestProperties_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestPropertiesArgs)) *Client_GetPullRequestProperties_Call { +func (_c *Client_GetPullRequestProperties_Call) Run(run func(context1 context.Context, getPullRequestPropertiesArgs git.GetPullRequestPropertiesArgs)) *Client_GetPullRequestProperties_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestPropertiesArgs)) }) return _c } -func (_c *Client_GetPullRequestProperties_Call) Return(_a0 interface{}, _a1 error) *Client_GetPullRequestProperties_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestProperties_Call) Return(ifaceVal interface{}, err error) *Client_GetPullRequestProperties_Call { + _c.Call.Return(ifaceVal, err) return _c } -func (_c *Client_GetPullRequestProperties_Call) RunAndReturn(run func(context.Context, git.GetPullRequestPropertiesArgs) (interface{}, error)) *Client_GetPullRequestProperties_Call { +func (_c *Client_GetPullRequestProperties_Call) RunAndReturn(run func(context1 context.Context, getPullRequestPropertiesArgs git.GetPullRequestPropertiesArgs) (interface{}, error)) *Client_GetPullRequestProperties_Call { _c.Call.Return(run) return _c } -// GetPullRequestQuery provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestQuery(_a0 context.Context, _a1 git.GetPullRequestQueryArgs) (*git.GitPullRequestQuery, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestQuery provides a mock function for the type Client +func (_mock *Client) GetPullRequestQuery(context1 context.Context, getPullRequestQueryArgs git.GetPullRequestQueryArgs) (*git.GitPullRequestQuery, error) { + ret := _mock.Called(context1, getPullRequestQueryArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestQuery") @@ -4508,23 +4376,21 @@ func (_m *Client) GetPullRequestQuery(_a0 context.Context, _a1 git.GetPullReques var r0 *git.GitPullRequestQuery var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestQueryArgs) (*git.GitPullRequestQuery, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestQueryArgs) (*git.GitPullRequestQuery, error)); ok { + return returnFunc(context1, getPullRequestQueryArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestQueryArgs) *git.GitPullRequestQuery); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestQueryArgs) *git.GitPullRequestQuery); ok { + r0 = returnFunc(context1, getPullRequestQueryArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPullRequestQuery) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestQueryArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestQueryArgs) error); ok { + r1 = returnFunc(context1, getPullRequestQueryArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4534,32 +4400,32 @@ type Client_GetPullRequestQuery_Call struct { } // GetPullRequestQuery is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestQueryArgs -func (_e *Client_Expecter) GetPullRequestQuery(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestQuery_Call { - return &Client_GetPullRequestQuery_Call{Call: _e.mock.On("GetPullRequestQuery", _a0, _a1)} +// - context1 +// - getPullRequestQueryArgs +func (_e *Client_Expecter) GetPullRequestQuery(context1 interface{}, getPullRequestQueryArgs interface{}) *Client_GetPullRequestQuery_Call { + return &Client_GetPullRequestQuery_Call{Call: _e.mock.On("GetPullRequestQuery", context1, getPullRequestQueryArgs)} } -func (_c *Client_GetPullRequestQuery_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestQueryArgs)) *Client_GetPullRequestQuery_Call { +func (_c *Client_GetPullRequestQuery_Call) Run(run func(context1 context.Context, getPullRequestQueryArgs git.GetPullRequestQueryArgs)) *Client_GetPullRequestQuery_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestQueryArgs)) }) return _c } -func (_c *Client_GetPullRequestQuery_Call) Return(_a0 *git.GitPullRequestQuery, _a1 error) *Client_GetPullRequestQuery_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestQuery_Call) Return(gitPullRequestQuery *git.GitPullRequestQuery, err error) *Client_GetPullRequestQuery_Call { + _c.Call.Return(gitPullRequestQuery, err) return _c } -func (_c *Client_GetPullRequestQuery_Call) RunAndReturn(run func(context.Context, git.GetPullRequestQueryArgs) (*git.GitPullRequestQuery, error)) *Client_GetPullRequestQuery_Call { +func (_c *Client_GetPullRequestQuery_Call) RunAndReturn(run func(context1 context.Context, getPullRequestQueryArgs git.GetPullRequestQueryArgs) (*git.GitPullRequestQuery, error)) *Client_GetPullRequestQuery_Call { _c.Call.Return(run) return _c } -// GetPullRequestReviewer provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestReviewer(_a0 context.Context, _a1 git.GetPullRequestReviewerArgs) (*git.IdentityRefWithVote, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestReviewer provides a mock function for the type Client +func (_mock *Client) GetPullRequestReviewer(context1 context.Context, getPullRequestReviewerArgs git.GetPullRequestReviewerArgs) (*git.IdentityRefWithVote, error) { + ret := _mock.Called(context1, getPullRequestReviewerArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestReviewer") @@ -4567,23 +4433,21 @@ func (_m *Client) GetPullRequestReviewer(_a0 context.Context, _a1 git.GetPullReq var r0 *git.IdentityRefWithVote var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestReviewerArgs) (*git.IdentityRefWithVote, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestReviewerArgs) (*git.IdentityRefWithVote, error)); ok { + return returnFunc(context1, getPullRequestReviewerArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestReviewerArgs) *git.IdentityRefWithVote); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestReviewerArgs) *git.IdentityRefWithVote); ok { + r0 = returnFunc(context1, getPullRequestReviewerArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.IdentityRefWithVote) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestReviewerArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestReviewerArgs) error); ok { + r1 = returnFunc(context1, getPullRequestReviewerArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4593,32 +4457,32 @@ type Client_GetPullRequestReviewer_Call struct { } // GetPullRequestReviewer is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestReviewerArgs -func (_e *Client_Expecter) GetPullRequestReviewer(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestReviewer_Call { - return &Client_GetPullRequestReviewer_Call{Call: _e.mock.On("GetPullRequestReviewer", _a0, _a1)} +// - context1 +// - getPullRequestReviewerArgs +func (_e *Client_Expecter) GetPullRequestReviewer(context1 interface{}, getPullRequestReviewerArgs interface{}) *Client_GetPullRequestReviewer_Call { + return &Client_GetPullRequestReviewer_Call{Call: _e.mock.On("GetPullRequestReviewer", context1, getPullRequestReviewerArgs)} } -func (_c *Client_GetPullRequestReviewer_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestReviewerArgs)) *Client_GetPullRequestReviewer_Call { +func (_c *Client_GetPullRequestReviewer_Call) Run(run func(context1 context.Context, getPullRequestReviewerArgs git.GetPullRequestReviewerArgs)) *Client_GetPullRequestReviewer_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestReviewerArgs)) }) return _c } -func (_c *Client_GetPullRequestReviewer_Call) Return(_a0 *git.IdentityRefWithVote, _a1 error) *Client_GetPullRequestReviewer_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestReviewer_Call) Return(identityRefWithVote *git.IdentityRefWithVote, err error) *Client_GetPullRequestReviewer_Call { + _c.Call.Return(identityRefWithVote, err) return _c } -func (_c *Client_GetPullRequestReviewer_Call) RunAndReturn(run func(context.Context, git.GetPullRequestReviewerArgs) (*git.IdentityRefWithVote, error)) *Client_GetPullRequestReviewer_Call { +func (_c *Client_GetPullRequestReviewer_Call) RunAndReturn(run func(context1 context.Context, getPullRequestReviewerArgs git.GetPullRequestReviewerArgs) (*git.IdentityRefWithVote, error)) *Client_GetPullRequestReviewer_Call { _c.Call.Return(run) return _c } -// GetPullRequestReviewers provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestReviewers(_a0 context.Context, _a1 git.GetPullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestReviewers provides a mock function for the type Client +func (_mock *Client) GetPullRequestReviewers(context1 context.Context, getPullRequestReviewersArgs git.GetPullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error) { + ret := _mock.Called(context1, getPullRequestReviewersArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestReviewers") @@ -4626,23 +4490,21 @@ func (_m *Client) GetPullRequestReviewers(_a0 context.Context, _a1 git.GetPullRe var r0 *[]git.IdentityRefWithVote var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error)); ok { + return returnFunc(context1, getPullRequestReviewersArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestReviewersArgs) *[]git.IdentityRefWithVote); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestReviewersArgs) *[]git.IdentityRefWithVote); ok { + r0 = returnFunc(context1, getPullRequestReviewersArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.IdentityRefWithVote) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestReviewersArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestReviewersArgs) error); ok { + r1 = returnFunc(context1, getPullRequestReviewersArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4652,32 +4514,32 @@ type Client_GetPullRequestReviewers_Call struct { } // GetPullRequestReviewers is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestReviewersArgs -func (_e *Client_Expecter) GetPullRequestReviewers(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestReviewers_Call { - return &Client_GetPullRequestReviewers_Call{Call: _e.mock.On("GetPullRequestReviewers", _a0, _a1)} +// - context1 +// - getPullRequestReviewersArgs +func (_e *Client_Expecter) GetPullRequestReviewers(context1 interface{}, getPullRequestReviewersArgs interface{}) *Client_GetPullRequestReviewers_Call { + return &Client_GetPullRequestReviewers_Call{Call: _e.mock.On("GetPullRequestReviewers", context1, getPullRequestReviewersArgs)} } -func (_c *Client_GetPullRequestReviewers_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestReviewersArgs)) *Client_GetPullRequestReviewers_Call { +func (_c *Client_GetPullRequestReviewers_Call) Run(run func(context1 context.Context, getPullRequestReviewersArgs git.GetPullRequestReviewersArgs)) *Client_GetPullRequestReviewers_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestReviewersArgs)) }) return _c } -func (_c *Client_GetPullRequestReviewers_Call) Return(_a0 *[]git.IdentityRefWithVote, _a1 error) *Client_GetPullRequestReviewers_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestReviewers_Call) Return(identityRefWithVotes *[]git.IdentityRefWithVote, err error) *Client_GetPullRequestReviewers_Call { + _c.Call.Return(identityRefWithVotes, err) return _c } -func (_c *Client_GetPullRequestReviewers_Call) RunAndReturn(run func(context.Context, git.GetPullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error)) *Client_GetPullRequestReviewers_Call { +func (_c *Client_GetPullRequestReviewers_Call) RunAndReturn(run func(context1 context.Context, getPullRequestReviewersArgs git.GetPullRequestReviewersArgs) (*[]git.IdentityRefWithVote, error)) *Client_GetPullRequestReviewers_Call { _c.Call.Return(run) return _c } -// GetPullRequestStatus provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestStatus(_a0 context.Context, _a1 git.GetPullRequestStatusArgs) (*git.GitPullRequestStatus, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestStatus provides a mock function for the type Client +func (_mock *Client) GetPullRequestStatus(context1 context.Context, getPullRequestStatusArgs git.GetPullRequestStatusArgs) (*git.GitPullRequestStatus, error) { + ret := _mock.Called(context1, getPullRequestStatusArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestStatus") @@ -4685,23 +4547,21 @@ func (_m *Client) GetPullRequestStatus(_a0 context.Context, _a1 git.GetPullReque var r0 *git.GitPullRequestStatus var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestStatusArgs) (*git.GitPullRequestStatus, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestStatusArgs) (*git.GitPullRequestStatus, error)); ok { + return returnFunc(context1, getPullRequestStatusArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestStatusArgs) *git.GitPullRequestStatus); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestStatusArgs) *git.GitPullRequestStatus); ok { + r0 = returnFunc(context1, getPullRequestStatusArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPullRequestStatus) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestStatusArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestStatusArgs) error); ok { + r1 = returnFunc(context1, getPullRequestStatusArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4711,32 +4571,32 @@ type Client_GetPullRequestStatus_Call struct { } // GetPullRequestStatus is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestStatusArgs -func (_e *Client_Expecter) GetPullRequestStatus(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestStatus_Call { - return &Client_GetPullRequestStatus_Call{Call: _e.mock.On("GetPullRequestStatus", _a0, _a1)} +// - context1 +// - getPullRequestStatusArgs +func (_e *Client_Expecter) GetPullRequestStatus(context1 interface{}, getPullRequestStatusArgs interface{}) *Client_GetPullRequestStatus_Call { + return &Client_GetPullRequestStatus_Call{Call: _e.mock.On("GetPullRequestStatus", context1, getPullRequestStatusArgs)} } -func (_c *Client_GetPullRequestStatus_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestStatusArgs)) *Client_GetPullRequestStatus_Call { +func (_c *Client_GetPullRequestStatus_Call) Run(run func(context1 context.Context, getPullRequestStatusArgs git.GetPullRequestStatusArgs)) *Client_GetPullRequestStatus_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestStatusArgs)) }) return _c } -func (_c *Client_GetPullRequestStatus_Call) Return(_a0 *git.GitPullRequestStatus, _a1 error) *Client_GetPullRequestStatus_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestStatus_Call) Return(gitPullRequestStatus *git.GitPullRequestStatus, err error) *Client_GetPullRequestStatus_Call { + _c.Call.Return(gitPullRequestStatus, err) return _c } -func (_c *Client_GetPullRequestStatus_Call) RunAndReturn(run func(context.Context, git.GetPullRequestStatusArgs) (*git.GitPullRequestStatus, error)) *Client_GetPullRequestStatus_Call { +func (_c *Client_GetPullRequestStatus_Call) RunAndReturn(run func(context1 context.Context, getPullRequestStatusArgs git.GetPullRequestStatusArgs) (*git.GitPullRequestStatus, error)) *Client_GetPullRequestStatus_Call { _c.Call.Return(run) return _c } -// GetPullRequestStatuses provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestStatuses(_a0 context.Context, _a1 git.GetPullRequestStatusesArgs) (*[]git.GitPullRequestStatus, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestStatuses provides a mock function for the type Client +func (_mock *Client) GetPullRequestStatuses(context1 context.Context, getPullRequestStatusesArgs git.GetPullRequestStatusesArgs) (*[]git.GitPullRequestStatus, error) { + ret := _mock.Called(context1, getPullRequestStatusesArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestStatuses") @@ -4744,23 +4604,21 @@ func (_m *Client) GetPullRequestStatuses(_a0 context.Context, _a1 git.GetPullReq var r0 *[]git.GitPullRequestStatus var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestStatusesArgs) (*[]git.GitPullRequestStatus, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestStatusesArgs) (*[]git.GitPullRequestStatus, error)); ok { + return returnFunc(context1, getPullRequestStatusesArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestStatusesArgs) *[]git.GitPullRequestStatus); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestStatusesArgs) *[]git.GitPullRequestStatus); ok { + r0 = returnFunc(context1, getPullRequestStatusesArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitPullRequestStatus) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestStatusesArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestStatusesArgs) error); ok { + r1 = returnFunc(context1, getPullRequestStatusesArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4770,32 +4628,32 @@ type Client_GetPullRequestStatuses_Call struct { } // GetPullRequestStatuses is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestStatusesArgs -func (_e *Client_Expecter) GetPullRequestStatuses(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestStatuses_Call { - return &Client_GetPullRequestStatuses_Call{Call: _e.mock.On("GetPullRequestStatuses", _a0, _a1)} +// - context1 +// - getPullRequestStatusesArgs +func (_e *Client_Expecter) GetPullRequestStatuses(context1 interface{}, getPullRequestStatusesArgs interface{}) *Client_GetPullRequestStatuses_Call { + return &Client_GetPullRequestStatuses_Call{Call: _e.mock.On("GetPullRequestStatuses", context1, getPullRequestStatusesArgs)} } -func (_c *Client_GetPullRequestStatuses_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestStatusesArgs)) *Client_GetPullRequestStatuses_Call { +func (_c *Client_GetPullRequestStatuses_Call) Run(run func(context1 context.Context, getPullRequestStatusesArgs git.GetPullRequestStatusesArgs)) *Client_GetPullRequestStatuses_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestStatusesArgs)) }) return _c } -func (_c *Client_GetPullRequestStatuses_Call) Return(_a0 *[]git.GitPullRequestStatus, _a1 error) *Client_GetPullRequestStatuses_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestStatuses_Call) Return(gitPullRequestStatuss *[]git.GitPullRequestStatus, err error) *Client_GetPullRequestStatuses_Call { + _c.Call.Return(gitPullRequestStatuss, err) return _c } -func (_c *Client_GetPullRequestStatuses_Call) RunAndReturn(run func(context.Context, git.GetPullRequestStatusesArgs) (*[]git.GitPullRequestStatus, error)) *Client_GetPullRequestStatuses_Call { +func (_c *Client_GetPullRequestStatuses_Call) RunAndReturn(run func(context1 context.Context, getPullRequestStatusesArgs git.GetPullRequestStatusesArgs) (*[]git.GitPullRequestStatus, error)) *Client_GetPullRequestStatuses_Call { _c.Call.Return(run) return _c } -// GetPullRequestThread provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestThread(_a0 context.Context, _a1 git.GetPullRequestThreadArgs) (*git.GitPullRequestCommentThread, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestThread provides a mock function for the type Client +func (_mock *Client) GetPullRequestThread(context1 context.Context, getPullRequestThreadArgs git.GetPullRequestThreadArgs) (*git.GitPullRequestCommentThread, error) { + ret := _mock.Called(context1, getPullRequestThreadArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestThread") @@ -4803,23 +4661,21 @@ func (_m *Client) GetPullRequestThread(_a0 context.Context, _a1 git.GetPullReque var r0 *git.GitPullRequestCommentThread var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestThreadArgs) (*git.GitPullRequestCommentThread, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestThreadArgs) (*git.GitPullRequestCommentThread, error)); ok { + return returnFunc(context1, getPullRequestThreadArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestThreadArgs) *git.GitPullRequestCommentThread); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestThreadArgs) *git.GitPullRequestCommentThread); ok { + r0 = returnFunc(context1, getPullRequestThreadArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPullRequestCommentThread) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestThreadArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestThreadArgs) error); ok { + r1 = returnFunc(context1, getPullRequestThreadArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4829,32 +4685,32 @@ type Client_GetPullRequestThread_Call struct { } // GetPullRequestThread is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestThreadArgs -func (_e *Client_Expecter) GetPullRequestThread(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestThread_Call { - return &Client_GetPullRequestThread_Call{Call: _e.mock.On("GetPullRequestThread", _a0, _a1)} +// - context1 +// - getPullRequestThreadArgs +func (_e *Client_Expecter) GetPullRequestThread(context1 interface{}, getPullRequestThreadArgs interface{}) *Client_GetPullRequestThread_Call { + return &Client_GetPullRequestThread_Call{Call: _e.mock.On("GetPullRequestThread", context1, getPullRequestThreadArgs)} } -func (_c *Client_GetPullRequestThread_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestThreadArgs)) *Client_GetPullRequestThread_Call { +func (_c *Client_GetPullRequestThread_Call) Run(run func(context1 context.Context, getPullRequestThreadArgs git.GetPullRequestThreadArgs)) *Client_GetPullRequestThread_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestThreadArgs)) }) return _c } -func (_c *Client_GetPullRequestThread_Call) Return(_a0 *git.GitPullRequestCommentThread, _a1 error) *Client_GetPullRequestThread_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestThread_Call) Return(gitPullRequestCommentThread *git.GitPullRequestCommentThread, err error) *Client_GetPullRequestThread_Call { + _c.Call.Return(gitPullRequestCommentThread, err) return _c } -func (_c *Client_GetPullRequestThread_Call) RunAndReturn(run func(context.Context, git.GetPullRequestThreadArgs) (*git.GitPullRequestCommentThread, error)) *Client_GetPullRequestThread_Call { +func (_c *Client_GetPullRequestThread_Call) RunAndReturn(run func(context1 context.Context, getPullRequestThreadArgs git.GetPullRequestThreadArgs) (*git.GitPullRequestCommentThread, error)) *Client_GetPullRequestThread_Call { _c.Call.Return(run) return _c } -// GetPullRequestWorkItemRefs provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestWorkItemRefs(_a0 context.Context, _a1 git.GetPullRequestWorkItemRefsArgs) (*[]webapi.ResourceRef, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestWorkItemRefs provides a mock function for the type Client +func (_mock *Client) GetPullRequestWorkItemRefs(context1 context.Context, getPullRequestWorkItemRefsArgs git.GetPullRequestWorkItemRefsArgs) (*[]webapi.ResourceRef, error) { + ret := _mock.Called(context1, getPullRequestWorkItemRefsArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestWorkItemRefs") @@ -4862,23 +4718,21 @@ func (_m *Client) GetPullRequestWorkItemRefs(_a0 context.Context, _a1 git.GetPul var r0 *[]webapi.ResourceRef var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestWorkItemRefsArgs) (*[]webapi.ResourceRef, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestWorkItemRefsArgs) (*[]webapi.ResourceRef, error)); ok { + return returnFunc(context1, getPullRequestWorkItemRefsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestWorkItemRefsArgs) *[]webapi.ResourceRef); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestWorkItemRefsArgs) *[]webapi.ResourceRef); ok { + r0 = returnFunc(context1, getPullRequestWorkItemRefsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]webapi.ResourceRef) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestWorkItemRefsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestWorkItemRefsArgs) error); ok { + r1 = returnFunc(context1, getPullRequestWorkItemRefsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4888,32 +4742,32 @@ type Client_GetPullRequestWorkItemRefs_Call struct { } // GetPullRequestWorkItemRefs is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestWorkItemRefsArgs -func (_e *Client_Expecter) GetPullRequestWorkItemRefs(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestWorkItemRefs_Call { - return &Client_GetPullRequestWorkItemRefs_Call{Call: _e.mock.On("GetPullRequestWorkItemRefs", _a0, _a1)} +// - context1 +// - getPullRequestWorkItemRefsArgs +func (_e *Client_Expecter) GetPullRequestWorkItemRefs(context1 interface{}, getPullRequestWorkItemRefsArgs interface{}) *Client_GetPullRequestWorkItemRefs_Call { + return &Client_GetPullRequestWorkItemRefs_Call{Call: _e.mock.On("GetPullRequestWorkItemRefs", context1, getPullRequestWorkItemRefsArgs)} } -func (_c *Client_GetPullRequestWorkItemRefs_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestWorkItemRefsArgs)) *Client_GetPullRequestWorkItemRefs_Call { +func (_c *Client_GetPullRequestWorkItemRefs_Call) Run(run func(context1 context.Context, getPullRequestWorkItemRefsArgs git.GetPullRequestWorkItemRefsArgs)) *Client_GetPullRequestWorkItemRefs_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestWorkItemRefsArgs)) }) return _c } -func (_c *Client_GetPullRequestWorkItemRefs_Call) Return(_a0 *[]webapi.ResourceRef, _a1 error) *Client_GetPullRequestWorkItemRefs_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestWorkItemRefs_Call) Return(resourceRefs *[]webapi.ResourceRef, err error) *Client_GetPullRequestWorkItemRefs_Call { + _c.Call.Return(resourceRefs, err) return _c } -func (_c *Client_GetPullRequestWorkItemRefs_Call) RunAndReturn(run func(context.Context, git.GetPullRequestWorkItemRefsArgs) (*[]webapi.ResourceRef, error)) *Client_GetPullRequestWorkItemRefs_Call { +func (_c *Client_GetPullRequestWorkItemRefs_Call) RunAndReturn(run func(context1 context.Context, getPullRequestWorkItemRefsArgs git.GetPullRequestWorkItemRefsArgs) (*[]webapi.ResourceRef, error)) *Client_GetPullRequestWorkItemRefs_Call { _c.Call.Return(run) return _c } -// GetPullRequests provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequests(_a0 context.Context, _a1 git.GetPullRequestsArgs) (*[]git.GitPullRequest, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequests provides a mock function for the type Client +func (_mock *Client) GetPullRequests(context1 context.Context, getPullRequestsArgs git.GetPullRequestsArgs) (*[]git.GitPullRequest, error) { + ret := _mock.Called(context1, getPullRequestsArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequests") @@ -4921,23 +4775,21 @@ func (_m *Client) GetPullRequests(_a0 context.Context, _a1 git.GetPullRequestsAr var r0 *[]git.GitPullRequest var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestsArgs) (*[]git.GitPullRequest, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestsArgs) (*[]git.GitPullRequest, error)); ok { + return returnFunc(context1, getPullRequestsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestsArgs) *[]git.GitPullRequest); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestsArgs) *[]git.GitPullRequest); ok { + r0 = returnFunc(context1, getPullRequestsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitPullRequest) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestsArgs) error); ok { + r1 = returnFunc(context1, getPullRequestsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -4947,32 +4799,32 @@ type Client_GetPullRequests_Call struct { } // GetPullRequests is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestsArgs -func (_e *Client_Expecter) GetPullRequests(_a0 interface{}, _a1 interface{}) *Client_GetPullRequests_Call { - return &Client_GetPullRequests_Call{Call: _e.mock.On("GetPullRequests", _a0, _a1)} +// - context1 +// - getPullRequestsArgs +func (_e *Client_Expecter) GetPullRequests(context1 interface{}, getPullRequestsArgs interface{}) *Client_GetPullRequests_Call { + return &Client_GetPullRequests_Call{Call: _e.mock.On("GetPullRequests", context1, getPullRequestsArgs)} } -func (_c *Client_GetPullRequests_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestsArgs)) *Client_GetPullRequests_Call { +func (_c *Client_GetPullRequests_Call) Run(run func(context1 context.Context, getPullRequestsArgs git.GetPullRequestsArgs)) *Client_GetPullRequests_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestsArgs)) }) return _c } -func (_c *Client_GetPullRequests_Call) Return(_a0 *[]git.GitPullRequest, _a1 error) *Client_GetPullRequests_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequests_Call) Return(gitPullRequests *[]git.GitPullRequest, err error) *Client_GetPullRequests_Call { + _c.Call.Return(gitPullRequests, err) return _c } -func (_c *Client_GetPullRequests_Call) RunAndReturn(run func(context.Context, git.GetPullRequestsArgs) (*[]git.GitPullRequest, error)) *Client_GetPullRequests_Call { +func (_c *Client_GetPullRequests_Call) RunAndReturn(run func(context1 context.Context, getPullRequestsArgs git.GetPullRequestsArgs) (*[]git.GitPullRequest, error)) *Client_GetPullRequests_Call { _c.Call.Return(run) return _c } -// GetPullRequestsByProject provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPullRequestsByProject(_a0 context.Context, _a1 git.GetPullRequestsByProjectArgs) (*[]git.GitPullRequest, error) { - ret := _m.Called(_a0, _a1) +// GetPullRequestsByProject provides a mock function for the type Client +func (_mock *Client) GetPullRequestsByProject(context1 context.Context, getPullRequestsByProjectArgs git.GetPullRequestsByProjectArgs) (*[]git.GitPullRequest, error) { + ret := _mock.Called(context1, getPullRequestsByProjectArgs) if len(ret) == 0 { panic("no return value specified for GetPullRequestsByProject") @@ -4980,23 +4832,21 @@ func (_m *Client) GetPullRequestsByProject(_a0 context.Context, _a1 git.GetPullR var r0 *[]git.GitPullRequest var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestsByProjectArgs) (*[]git.GitPullRequest, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestsByProjectArgs) (*[]git.GitPullRequest, error)); ok { + return returnFunc(context1, getPullRequestsByProjectArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPullRequestsByProjectArgs) *[]git.GitPullRequest); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPullRequestsByProjectArgs) *[]git.GitPullRequest); ok { + r0 = returnFunc(context1, getPullRequestsByProjectArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitPullRequest) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPullRequestsByProjectArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPullRequestsByProjectArgs) error); ok { + r1 = returnFunc(context1, getPullRequestsByProjectArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5006,32 +4856,32 @@ type Client_GetPullRequestsByProject_Call struct { } // GetPullRequestsByProject is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPullRequestsByProjectArgs -func (_e *Client_Expecter) GetPullRequestsByProject(_a0 interface{}, _a1 interface{}) *Client_GetPullRequestsByProject_Call { - return &Client_GetPullRequestsByProject_Call{Call: _e.mock.On("GetPullRequestsByProject", _a0, _a1)} +// - context1 +// - getPullRequestsByProjectArgs +func (_e *Client_Expecter) GetPullRequestsByProject(context1 interface{}, getPullRequestsByProjectArgs interface{}) *Client_GetPullRequestsByProject_Call { + return &Client_GetPullRequestsByProject_Call{Call: _e.mock.On("GetPullRequestsByProject", context1, getPullRequestsByProjectArgs)} } -func (_c *Client_GetPullRequestsByProject_Call) Run(run func(_a0 context.Context, _a1 git.GetPullRequestsByProjectArgs)) *Client_GetPullRequestsByProject_Call { +func (_c *Client_GetPullRequestsByProject_Call) Run(run func(context1 context.Context, getPullRequestsByProjectArgs git.GetPullRequestsByProjectArgs)) *Client_GetPullRequestsByProject_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPullRequestsByProjectArgs)) }) return _c } -func (_c *Client_GetPullRequestsByProject_Call) Return(_a0 *[]git.GitPullRequest, _a1 error) *Client_GetPullRequestsByProject_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPullRequestsByProject_Call) Return(gitPullRequests *[]git.GitPullRequest, err error) *Client_GetPullRequestsByProject_Call { + _c.Call.Return(gitPullRequests, err) return _c } -func (_c *Client_GetPullRequestsByProject_Call) RunAndReturn(run func(context.Context, git.GetPullRequestsByProjectArgs) (*[]git.GitPullRequest, error)) *Client_GetPullRequestsByProject_Call { +func (_c *Client_GetPullRequestsByProject_Call) RunAndReturn(run func(context1 context.Context, getPullRequestsByProjectArgs git.GetPullRequestsByProjectArgs) (*[]git.GitPullRequest, error)) *Client_GetPullRequestsByProject_Call { _c.Call.Return(run) return _c } -// GetPush provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPush(_a0 context.Context, _a1 git.GetPushArgs) (*git.GitPush, error) { - ret := _m.Called(_a0, _a1) +// GetPush provides a mock function for the type Client +func (_mock *Client) GetPush(context1 context.Context, getPushArgs git.GetPushArgs) (*git.GitPush, error) { + ret := _mock.Called(context1, getPushArgs) if len(ret) == 0 { panic("no return value specified for GetPush") @@ -5039,23 +4889,21 @@ func (_m *Client) GetPush(_a0 context.Context, _a1 git.GetPushArgs) (*git.GitPus var r0 *git.GitPush var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPushArgs) (*git.GitPush, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPushArgs) (*git.GitPush, error)); ok { + return returnFunc(context1, getPushArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPushArgs) *git.GitPush); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPushArgs) *git.GitPush); ok { + r0 = returnFunc(context1, getPushArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPush) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPushArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPushArgs) error); ok { + r1 = returnFunc(context1, getPushArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5065,32 +4913,32 @@ type Client_GetPush_Call struct { } // GetPush is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPushArgs -func (_e *Client_Expecter) GetPush(_a0 interface{}, _a1 interface{}) *Client_GetPush_Call { - return &Client_GetPush_Call{Call: _e.mock.On("GetPush", _a0, _a1)} +// - context1 +// - getPushArgs +func (_e *Client_Expecter) GetPush(context1 interface{}, getPushArgs interface{}) *Client_GetPush_Call { + return &Client_GetPush_Call{Call: _e.mock.On("GetPush", context1, getPushArgs)} } -func (_c *Client_GetPush_Call) Run(run func(_a0 context.Context, _a1 git.GetPushArgs)) *Client_GetPush_Call { +func (_c *Client_GetPush_Call) Run(run func(context1 context.Context, getPushArgs git.GetPushArgs)) *Client_GetPush_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPushArgs)) }) return _c } -func (_c *Client_GetPush_Call) Return(_a0 *git.GitPush, _a1 error) *Client_GetPush_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPush_Call) Return(gitPush *git.GitPush, err error) *Client_GetPush_Call { + _c.Call.Return(gitPush, err) return _c } -func (_c *Client_GetPush_Call) RunAndReturn(run func(context.Context, git.GetPushArgs) (*git.GitPush, error)) *Client_GetPush_Call { +func (_c *Client_GetPush_Call) RunAndReturn(run func(context1 context.Context, getPushArgs git.GetPushArgs) (*git.GitPush, error)) *Client_GetPush_Call { _c.Call.Return(run) return _c } -// GetPushCommits provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPushCommits(_a0 context.Context, _a1 git.GetPushCommitsArgs) (*[]git.GitCommitRef, error) { - ret := _m.Called(_a0, _a1) +// GetPushCommits provides a mock function for the type Client +func (_mock *Client) GetPushCommits(context1 context.Context, getPushCommitsArgs git.GetPushCommitsArgs) (*[]git.GitCommitRef, error) { + ret := _mock.Called(context1, getPushCommitsArgs) if len(ret) == 0 { panic("no return value specified for GetPushCommits") @@ -5098,23 +4946,21 @@ func (_m *Client) GetPushCommits(_a0 context.Context, _a1 git.GetPushCommitsArgs var r0 *[]git.GitCommitRef var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPushCommitsArgs) (*[]git.GitCommitRef, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPushCommitsArgs) (*[]git.GitCommitRef, error)); ok { + return returnFunc(context1, getPushCommitsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPushCommitsArgs) *[]git.GitCommitRef); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPushCommitsArgs) *[]git.GitCommitRef); ok { + r0 = returnFunc(context1, getPushCommitsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitCommitRef) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPushCommitsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPushCommitsArgs) error); ok { + r1 = returnFunc(context1, getPushCommitsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5124,32 +4970,32 @@ type Client_GetPushCommits_Call struct { } // GetPushCommits is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPushCommitsArgs -func (_e *Client_Expecter) GetPushCommits(_a0 interface{}, _a1 interface{}) *Client_GetPushCommits_Call { - return &Client_GetPushCommits_Call{Call: _e.mock.On("GetPushCommits", _a0, _a1)} +// - context1 +// - getPushCommitsArgs +func (_e *Client_Expecter) GetPushCommits(context1 interface{}, getPushCommitsArgs interface{}) *Client_GetPushCommits_Call { + return &Client_GetPushCommits_Call{Call: _e.mock.On("GetPushCommits", context1, getPushCommitsArgs)} } -func (_c *Client_GetPushCommits_Call) Run(run func(_a0 context.Context, _a1 git.GetPushCommitsArgs)) *Client_GetPushCommits_Call { +func (_c *Client_GetPushCommits_Call) Run(run func(context1 context.Context, getPushCommitsArgs git.GetPushCommitsArgs)) *Client_GetPushCommits_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPushCommitsArgs)) }) return _c } -func (_c *Client_GetPushCommits_Call) Return(_a0 *[]git.GitCommitRef, _a1 error) *Client_GetPushCommits_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPushCommits_Call) Return(gitCommitRefs *[]git.GitCommitRef, err error) *Client_GetPushCommits_Call { + _c.Call.Return(gitCommitRefs, err) return _c } -func (_c *Client_GetPushCommits_Call) RunAndReturn(run func(context.Context, git.GetPushCommitsArgs) (*[]git.GitCommitRef, error)) *Client_GetPushCommits_Call { +func (_c *Client_GetPushCommits_Call) RunAndReturn(run func(context1 context.Context, getPushCommitsArgs git.GetPushCommitsArgs) (*[]git.GitCommitRef, error)) *Client_GetPushCommits_Call { _c.Call.Return(run) return _c } -// GetPushes provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetPushes(_a0 context.Context, _a1 git.GetPushesArgs) (*[]git.GitPush, error) { - ret := _m.Called(_a0, _a1) +// GetPushes provides a mock function for the type Client +func (_mock *Client) GetPushes(context1 context.Context, getPushesArgs git.GetPushesArgs) (*[]git.GitPush, error) { + ret := _mock.Called(context1, getPushesArgs) if len(ret) == 0 { panic("no return value specified for GetPushes") @@ -5157,23 +5003,21 @@ func (_m *Client) GetPushes(_a0 context.Context, _a1 git.GetPushesArgs) (*[]git. var r0 *[]git.GitPush var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetPushesArgs) (*[]git.GitPush, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPushesArgs) (*[]git.GitPush, error)); ok { + return returnFunc(context1, getPushesArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetPushesArgs) *[]git.GitPush); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetPushesArgs) *[]git.GitPush); ok { + r0 = returnFunc(context1, getPushesArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitPush) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetPushesArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetPushesArgs) error); ok { + r1 = returnFunc(context1, getPushesArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5183,32 +5027,32 @@ type Client_GetPushes_Call struct { } // GetPushes is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetPushesArgs -func (_e *Client_Expecter) GetPushes(_a0 interface{}, _a1 interface{}) *Client_GetPushes_Call { - return &Client_GetPushes_Call{Call: _e.mock.On("GetPushes", _a0, _a1)} +// - context1 +// - getPushesArgs +func (_e *Client_Expecter) GetPushes(context1 interface{}, getPushesArgs interface{}) *Client_GetPushes_Call { + return &Client_GetPushes_Call{Call: _e.mock.On("GetPushes", context1, getPushesArgs)} } -func (_c *Client_GetPushes_Call) Run(run func(_a0 context.Context, _a1 git.GetPushesArgs)) *Client_GetPushes_Call { +func (_c *Client_GetPushes_Call) Run(run func(context1 context.Context, getPushesArgs git.GetPushesArgs)) *Client_GetPushes_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetPushesArgs)) }) return _c } -func (_c *Client_GetPushes_Call) Return(_a0 *[]git.GitPush, _a1 error) *Client_GetPushes_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetPushes_Call) Return(gitPushs *[]git.GitPush, err error) *Client_GetPushes_Call { + _c.Call.Return(gitPushs, err) return _c } -func (_c *Client_GetPushes_Call) RunAndReturn(run func(context.Context, git.GetPushesArgs) (*[]git.GitPush, error)) *Client_GetPushes_Call { +func (_c *Client_GetPushes_Call) RunAndReturn(run func(context1 context.Context, getPushesArgs git.GetPushesArgs) (*[]git.GitPush, error)) *Client_GetPushes_Call { _c.Call.Return(run) return _c } -// GetRecycleBinRepositories provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetRecycleBinRepositories(_a0 context.Context, _a1 git.GetRecycleBinRepositoriesArgs) (*[]git.GitDeletedRepository, error) { - ret := _m.Called(_a0, _a1) +// GetRecycleBinRepositories provides a mock function for the type Client +func (_mock *Client) GetRecycleBinRepositories(context1 context.Context, getRecycleBinRepositoriesArgs git.GetRecycleBinRepositoriesArgs) (*[]git.GitDeletedRepository, error) { + ret := _mock.Called(context1, getRecycleBinRepositoriesArgs) if len(ret) == 0 { panic("no return value specified for GetRecycleBinRepositories") @@ -5216,23 +5060,21 @@ func (_m *Client) GetRecycleBinRepositories(_a0 context.Context, _a1 git.GetRecy var r0 *[]git.GitDeletedRepository var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetRecycleBinRepositoriesArgs) (*[]git.GitDeletedRepository, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRecycleBinRepositoriesArgs) (*[]git.GitDeletedRepository, error)); ok { + return returnFunc(context1, getRecycleBinRepositoriesArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetRecycleBinRepositoriesArgs) *[]git.GitDeletedRepository); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRecycleBinRepositoriesArgs) *[]git.GitDeletedRepository); ok { + r0 = returnFunc(context1, getRecycleBinRepositoriesArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitDeletedRepository) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetRecycleBinRepositoriesArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetRecycleBinRepositoriesArgs) error); ok { + r1 = returnFunc(context1, getRecycleBinRepositoriesArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5242,32 +5084,32 @@ type Client_GetRecycleBinRepositories_Call struct { } // GetRecycleBinRepositories is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetRecycleBinRepositoriesArgs -func (_e *Client_Expecter) GetRecycleBinRepositories(_a0 interface{}, _a1 interface{}) *Client_GetRecycleBinRepositories_Call { - return &Client_GetRecycleBinRepositories_Call{Call: _e.mock.On("GetRecycleBinRepositories", _a0, _a1)} +// - context1 +// - getRecycleBinRepositoriesArgs +func (_e *Client_Expecter) GetRecycleBinRepositories(context1 interface{}, getRecycleBinRepositoriesArgs interface{}) *Client_GetRecycleBinRepositories_Call { + return &Client_GetRecycleBinRepositories_Call{Call: _e.mock.On("GetRecycleBinRepositories", context1, getRecycleBinRepositoriesArgs)} } -func (_c *Client_GetRecycleBinRepositories_Call) Run(run func(_a0 context.Context, _a1 git.GetRecycleBinRepositoriesArgs)) *Client_GetRecycleBinRepositories_Call { +func (_c *Client_GetRecycleBinRepositories_Call) Run(run func(context1 context.Context, getRecycleBinRepositoriesArgs git.GetRecycleBinRepositoriesArgs)) *Client_GetRecycleBinRepositories_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetRecycleBinRepositoriesArgs)) }) return _c } -func (_c *Client_GetRecycleBinRepositories_Call) Return(_a0 *[]git.GitDeletedRepository, _a1 error) *Client_GetRecycleBinRepositories_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetRecycleBinRepositories_Call) Return(gitDeletedRepositorys *[]git.GitDeletedRepository, err error) *Client_GetRecycleBinRepositories_Call { + _c.Call.Return(gitDeletedRepositorys, err) return _c } -func (_c *Client_GetRecycleBinRepositories_Call) RunAndReturn(run func(context.Context, git.GetRecycleBinRepositoriesArgs) (*[]git.GitDeletedRepository, error)) *Client_GetRecycleBinRepositories_Call { +func (_c *Client_GetRecycleBinRepositories_Call) RunAndReturn(run func(context1 context.Context, getRecycleBinRepositoriesArgs git.GetRecycleBinRepositoriesArgs) (*[]git.GitDeletedRepository, error)) *Client_GetRecycleBinRepositories_Call { _c.Call.Return(run) return _c } -// GetRefFavorite provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetRefFavorite(_a0 context.Context, _a1 git.GetRefFavoriteArgs) (*git.GitRefFavorite, error) { - ret := _m.Called(_a0, _a1) +// GetRefFavorite provides a mock function for the type Client +func (_mock *Client) GetRefFavorite(context1 context.Context, getRefFavoriteArgs git.GetRefFavoriteArgs) (*git.GitRefFavorite, error) { + ret := _mock.Called(context1, getRefFavoriteArgs) if len(ret) == 0 { panic("no return value specified for GetRefFavorite") @@ -5275,23 +5117,21 @@ func (_m *Client) GetRefFavorite(_a0 context.Context, _a1 git.GetRefFavoriteArgs var r0 *git.GitRefFavorite var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetRefFavoriteArgs) (*git.GitRefFavorite, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRefFavoriteArgs) (*git.GitRefFavorite, error)); ok { + return returnFunc(context1, getRefFavoriteArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetRefFavoriteArgs) *git.GitRefFavorite); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRefFavoriteArgs) *git.GitRefFavorite); ok { + r0 = returnFunc(context1, getRefFavoriteArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitRefFavorite) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetRefFavoriteArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetRefFavoriteArgs) error); ok { + r1 = returnFunc(context1, getRefFavoriteArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5301,32 +5141,32 @@ type Client_GetRefFavorite_Call struct { } // GetRefFavorite is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetRefFavoriteArgs -func (_e *Client_Expecter) GetRefFavorite(_a0 interface{}, _a1 interface{}) *Client_GetRefFavorite_Call { - return &Client_GetRefFavorite_Call{Call: _e.mock.On("GetRefFavorite", _a0, _a1)} +// - context1 +// - getRefFavoriteArgs +func (_e *Client_Expecter) GetRefFavorite(context1 interface{}, getRefFavoriteArgs interface{}) *Client_GetRefFavorite_Call { + return &Client_GetRefFavorite_Call{Call: _e.mock.On("GetRefFavorite", context1, getRefFavoriteArgs)} } -func (_c *Client_GetRefFavorite_Call) Run(run func(_a0 context.Context, _a1 git.GetRefFavoriteArgs)) *Client_GetRefFavorite_Call { +func (_c *Client_GetRefFavorite_Call) Run(run func(context1 context.Context, getRefFavoriteArgs git.GetRefFavoriteArgs)) *Client_GetRefFavorite_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetRefFavoriteArgs)) }) return _c } -func (_c *Client_GetRefFavorite_Call) Return(_a0 *git.GitRefFavorite, _a1 error) *Client_GetRefFavorite_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetRefFavorite_Call) Return(gitRefFavorite *git.GitRefFavorite, err error) *Client_GetRefFavorite_Call { + _c.Call.Return(gitRefFavorite, err) return _c } -func (_c *Client_GetRefFavorite_Call) RunAndReturn(run func(context.Context, git.GetRefFavoriteArgs) (*git.GitRefFavorite, error)) *Client_GetRefFavorite_Call { +func (_c *Client_GetRefFavorite_Call) RunAndReturn(run func(context1 context.Context, getRefFavoriteArgs git.GetRefFavoriteArgs) (*git.GitRefFavorite, error)) *Client_GetRefFavorite_Call { _c.Call.Return(run) return _c } -// GetRefFavorites provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetRefFavorites(_a0 context.Context, _a1 git.GetRefFavoritesArgs) (*[]git.GitRefFavorite, error) { - ret := _m.Called(_a0, _a1) +// GetRefFavorites provides a mock function for the type Client +func (_mock *Client) GetRefFavorites(context1 context.Context, getRefFavoritesArgs git.GetRefFavoritesArgs) (*[]git.GitRefFavorite, error) { + ret := _mock.Called(context1, getRefFavoritesArgs) if len(ret) == 0 { panic("no return value specified for GetRefFavorites") @@ -5334,23 +5174,21 @@ func (_m *Client) GetRefFavorites(_a0 context.Context, _a1 git.GetRefFavoritesAr var r0 *[]git.GitRefFavorite var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetRefFavoritesArgs) (*[]git.GitRefFavorite, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRefFavoritesArgs) (*[]git.GitRefFavorite, error)); ok { + return returnFunc(context1, getRefFavoritesArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetRefFavoritesArgs) *[]git.GitRefFavorite); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRefFavoritesArgs) *[]git.GitRefFavorite); ok { + r0 = returnFunc(context1, getRefFavoritesArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitRefFavorite) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetRefFavoritesArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetRefFavoritesArgs) error); ok { + r1 = returnFunc(context1, getRefFavoritesArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5360,32 +5198,32 @@ type Client_GetRefFavorites_Call struct { } // GetRefFavorites is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetRefFavoritesArgs -func (_e *Client_Expecter) GetRefFavorites(_a0 interface{}, _a1 interface{}) *Client_GetRefFavorites_Call { - return &Client_GetRefFavorites_Call{Call: _e.mock.On("GetRefFavorites", _a0, _a1)} +// - context1 +// - getRefFavoritesArgs +func (_e *Client_Expecter) GetRefFavorites(context1 interface{}, getRefFavoritesArgs interface{}) *Client_GetRefFavorites_Call { + return &Client_GetRefFavorites_Call{Call: _e.mock.On("GetRefFavorites", context1, getRefFavoritesArgs)} } -func (_c *Client_GetRefFavorites_Call) Run(run func(_a0 context.Context, _a1 git.GetRefFavoritesArgs)) *Client_GetRefFavorites_Call { +func (_c *Client_GetRefFavorites_Call) Run(run func(context1 context.Context, getRefFavoritesArgs git.GetRefFavoritesArgs)) *Client_GetRefFavorites_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetRefFavoritesArgs)) }) return _c } -func (_c *Client_GetRefFavorites_Call) Return(_a0 *[]git.GitRefFavorite, _a1 error) *Client_GetRefFavorites_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetRefFavorites_Call) Return(gitRefFavorites *[]git.GitRefFavorite, err error) *Client_GetRefFavorites_Call { + _c.Call.Return(gitRefFavorites, err) return _c } -func (_c *Client_GetRefFavorites_Call) RunAndReturn(run func(context.Context, git.GetRefFavoritesArgs) (*[]git.GitRefFavorite, error)) *Client_GetRefFavorites_Call { +func (_c *Client_GetRefFavorites_Call) RunAndReturn(run func(context1 context.Context, getRefFavoritesArgs git.GetRefFavoritesArgs) (*[]git.GitRefFavorite, error)) *Client_GetRefFavorites_Call { _c.Call.Return(run) return _c } -// GetRefs provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetRefs(_a0 context.Context, _a1 git.GetRefsArgs) (*git.GetRefsResponseValue, error) { - ret := _m.Called(_a0, _a1) +// GetRefs provides a mock function for the type Client +func (_mock *Client) GetRefs(context1 context.Context, getRefsArgs git.GetRefsArgs) (*git.GetRefsResponseValue, error) { + ret := _mock.Called(context1, getRefsArgs) if len(ret) == 0 { panic("no return value specified for GetRefs") @@ -5393,23 +5231,21 @@ func (_m *Client) GetRefs(_a0 context.Context, _a1 git.GetRefsArgs) (*git.GetRef var r0 *git.GetRefsResponseValue var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetRefsArgs) (*git.GetRefsResponseValue, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRefsArgs) (*git.GetRefsResponseValue, error)); ok { + return returnFunc(context1, getRefsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetRefsArgs) *git.GetRefsResponseValue); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRefsArgs) *git.GetRefsResponseValue); ok { + r0 = returnFunc(context1, getRefsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GetRefsResponseValue) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetRefsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetRefsArgs) error); ok { + r1 = returnFunc(context1, getRefsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5419,32 +5255,32 @@ type Client_GetRefs_Call struct { } // GetRefs is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetRefsArgs -func (_e *Client_Expecter) GetRefs(_a0 interface{}, _a1 interface{}) *Client_GetRefs_Call { - return &Client_GetRefs_Call{Call: _e.mock.On("GetRefs", _a0, _a1)} +// - context1 +// - getRefsArgs +func (_e *Client_Expecter) GetRefs(context1 interface{}, getRefsArgs interface{}) *Client_GetRefs_Call { + return &Client_GetRefs_Call{Call: _e.mock.On("GetRefs", context1, getRefsArgs)} } -func (_c *Client_GetRefs_Call) Run(run func(_a0 context.Context, _a1 git.GetRefsArgs)) *Client_GetRefs_Call { +func (_c *Client_GetRefs_Call) Run(run func(context1 context.Context, getRefsArgs git.GetRefsArgs)) *Client_GetRefs_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetRefsArgs)) }) return _c } -func (_c *Client_GetRefs_Call) Return(_a0 *git.GetRefsResponseValue, _a1 error) *Client_GetRefs_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetRefs_Call) Return(getRefsResponseValue *git.GetRefsResponseValue, err error) *Client_GetRefs_Call { + _c.Call.Return(getRefsResponseValue, err) return _c } -func (_c *Client_GetRefs_Call) RunAndReturn(run func(context.Context, git.GetRefsArgs) (*git.GetRefsResponseValue, error)) *Client_GetRefs_Call { +func (_c *Client_GetRefs_Call) RunAndReturn(run func(context1 context.Context, getRefsArgs git.GetRefsArgs) (*git.GetRefsResponseValue, error)) *Client_GetRefs_Call { _c.Call.Return(run) return _c } -// GetRepositories provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetRepositories(_a0 context.Context, _a1 git.GetRepositoriesArgs) (*[]git.GitRepository, error) { - ret := _m.Called(_a0, _a1) +// GetRepositories provides a mock function for the type Client +func (_mock *Client) GetRepositories(context1 context.Context, getRepositoriesArgs git.GetRepositoriesArgs) (*[]git.GitRepository, error) { + ret := _mock.Called(context1, getRepositoriesArgs) if len(ret) == 0 { panic("no return value specified for GetRepositories") @@ -5452,23 +5288,21 @@ func (_m *Client) GetRepositories(_a0 context.Context, _a1 git.GetRepositoriesAr var r0 *[]git.GitRepository var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetRepositoriesArgs) (*[]git.GitRepository, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRepositoriesArgs) (*[]git.GitRepository, error)); ok { + return returnFunc(context1, getRepositoriesArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetRepositoriesArgs) *[]git.GitRepository); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRepositoriesArgs) *[]git.GitRepository); ok { + r0 = returnFunc(context1, getRepositoriesArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitRepository) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetRepositoriesArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetRepositoriesArgs) error); ok { + r1 = returnFunc(context1, getRepositoriesArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5478,32 +5312,32 @@ type Client_GetRepositories_Call struct { } // GetRepositories is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetRepositoriesArgs -func (_e *Client_Expecter) GetRepositories(_a0 interface{}, _a1 interface{}) *Client_GetRepositories_Call { - return &Client_GetRepositories_Call{Call: _e.mock.On("GetRepositories", _a0, _a1)} +// - context1 +// - getRepositoriesArgs +func (_e *Client_Expecter) GetRepositories(context1 interface{}, getRepositoriesArgs interface{}) *Client_GetRepositories_Call { + return &Client_GetRepositories_Call{Call: _e.mock.On("GetRepositories", context1, getRepositoriesArgs)} } -func (_c *Client_GetRepositories_Call) Run(run func(_a0 context.Context, _a1 git.GetRepositoriesArgs)) *Client_GetRepositories_Call { +func (_c *Client_GetRepositories_Call) Run(run func(context1 context.Context, getRepositoriesArgs git.GetRepositoriesArgs)) *Client_GetRepositories_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetRepositoriesArgs)) }) return _c } -func (_c *Client_GetRepositories_Call) Return(_a0 *[]git.GitRepository, _a1 error) *Client_GetRepositories_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetRepositories_Call) Return(gitRepositorys *[]git.GitRepository, err error) *Client_GetRepositories_Call { + _c.Call.Return(gitRepositorys, err) return _c } -func (_c *Client_GetRepositories_Call) RunAndReturn(run func(context.Context, git.GetRepositoriesArgs) (*[]git.GitRepository, error)) *Client_GetRepositories_Call { +func (_c *Client_GetRepositories_Call) RunAndReturn(run func(context1 context.Context, getRepositoriesArgs git.GetRepositoriesArgs) (*[]git.GitRepository, error)) *Client_GetRepositories_Call { _c.Call.Return(run) return _c } -// GetRepository provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetRepository(_a0 context.Context, _a1 git.GetRepositoryArgs) (*git.GitRepository, error) { - ret := _m.Called(_a0, _a1) +// GetRepository provides a mock function for the type Client +func (_mock *Client) GetRepository(context1 context.Context, getRepositoryArgs git.GetRepositoryArgs) (*git.GitRepository, error) { + ret := _mock.Called(context1, getRepositoryArgs) if len(ret) == 0 { panic("no return value specified for GetRepository") @@ -5511,23 +5345,21 @@ func (_m *Client) GetRepository(_a0 context.Context, _a1 git.GetRepositoryArgs) var r0 *git.GitRepository var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetRepositoryArgs) (*git.GitRepository, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRepositoryArgs) (*git.GitRepository, error)); ok { + return returnFunc(context1, getRepositoryArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetRepositoryArgs) *git.GitRepository); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRepositoryArgs) *git.GitRepository); ok { + r0 = returnFunc(context1, getRepositoryArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitRepository) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetRepositoryArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetRepositoryArgs) error); ok { + r1 = returnFunc(context1, getRepositoryArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5537,32 +5369,32 @@ type Client_GetRepository_Call struct { } // GetRepository is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetRepositoryArgs -func (_e *Client_Expecter) GetRepository(_a0 interface{}, _a1 interface{}) *Client_GetRepository_Call { - return &Client_GetRepository_Call{Call: _e.mock.On("GetRepository", _a0, _a1)} +// - context1 +// - getRepositoryArgs +func (_e *Client_Expecter) GetRepository(context1 interface{}, getRepositoryArgs interface{}) *Client_GetRepository_Call { + return &Client_GetRepository_Call{Call: _e.mock.On("GetRepository", context1, getRepositoryArgs)} } -func (_c *Client_GetRepository_Call) Run(run func(_a0 context.Context, _a1 git.GetRepositoryArgs)) *Client_GetRepository_Call { +func (_c *Client_GetRepository_Call) Run(run func(context1 context.Context, getRepositoryArgs git.GetRepositoryArgs)) *Client_GetRepository_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetRepositoryArgs)) }) return _c } -func (_c *Client_GetRepository_Call) Return(_a0 *git.GitRepository, _a1 error) *Client_GetRepository_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetRepository_Call) Return(gitRepository *git.GitRepository, err error) *Client_GetRepository_Call { + _c.Call.Return(gitRepository, err) return _c } -func (_c *Client_GetRepository_Call) RunAndReturn(run func(context.Context, git.GetRepositoryArgs) (*git.GitRepository, error)) *Client_GetRepository_Call { +func (_c *Client_GetRepository_Call) RunAndReturn(run func(context1 context.Context, getRepositoryArgs git.GetRepositoryArgs) (*git.GitRepository, error)) *Client_GetRepository_Call { _c.Call.Return(run) return _c } -// GetRepositoryWithParent provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetRepositoryWithParent(_a0 context.Context, _a1 git.GetRepositoryWithParentArgs) (*git.GitRepository, error) { - ret := _m.Called(_a0, _a1) +// GetRepositoryWithParent provides a mock function for the type Client +func (_mock *Client) GetRepositoryWithParent(context1 context.Context, getRepositoryWithParentArgs git.GetRepositoryWithParentArgs) (*git.GitRepository, error) { + ret := _mock.Called(context1, getRepositoryWithParentArgs) if len(ret) == 0 { panic("no return value specified for GetRepositoryWithParent") @@ -5570,23 +5402,21 @@ func (_m *Client) GetRepositoryWithParent(_a0 context.Context, _a1 git.GetReposi var r0 *git.GitRepository var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetRepositoryWithParentArgs) (*git.GitRepository, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRepositoryWithParentArgs) (*git.GitRepository, error)); ok { + return returnFunc(context1, getRepositoryWithParentArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetRepositoryWithParentArgs) *git.GitRepository); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRepositoryWithParentArgs) *git.GitRepository); ok { + r0 = returnFunc(context1, getRepositoryWithParentArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitRepository) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetRepositoryWithParentArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetRepositoryWithParentArgs) error); ok { + r1 = returnFunc(context1, getRepositoryWithParentArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5596,32 +5426,32 @@ type Client_GetRepositoryWithParent_Call struct { } // GetRepositoryWithParent is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetRepositoryWithParentArgs -func (_e *Client_Expecter) GetRepositoryWithParent(_a0 interface{}, _a1 interface{}) *Client_GetRepositoryWithParent_Call { - return &Client_GetRepositoryWithParent_Call{Call: _e.mock.On("GetRepositoryWithParent", _a0, _a1)} +// - context1 +// - getRepositoryWithParentArgs +func (_e *Client_Expecter) GetRepositoryWithParent(context1 interface{}, getRepositoryWithParentArgs interface{}) *Client_GetRepositoryWithParent_Call { + return &Client_GetRepositoryWithParent_Call{Call: _e.mock.On("GetRepositoryWithParent", context1, getRepositoryWithParentArgs)} } -func (_c *Client_GetRepositoryWithParent_Call) Run(run func(_a0 context.Context, _a1 git.GetRepositoryWithParentArgs)) *Client_GetRepositoryWithParent_Call { +func (_c *Client_GetRepositoryWithParent_Call) Run(run func(context1 context.Context, getRepositoryWithParentArgs git.GetRepositoryWithParentArgs)) *Client_GetRepositoryWithParent_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetRepositoryWithParentArgs)) }) return _c } -func (_c *Client_GetRepositoryWithParent_Call) Return(_a0 *git.GitRepository, _a1 error) *Client_GetRepositoryWithParent_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetRepositoryWithParent_Call) Return(gitRepository *git.GitRepository, err error) *Client_GetRepositoryWithParent_Call { + _c.Call.Return(gitRepository, err) return _c } -func (_c *Client_GetRepositoryWithParent_Call) RunAndReturn(run func(context.Context, git.GetRepositoryWithParentArgs) (*git.GitRepository, error)) *Client_GetRepositoryWithParent_Call { +func (_c *Client_GetRepositoryWithParent_Call) RunAndReturn(run func(context1 context.Context, getRepositoryWithParentArgs git.GetRepositoryWithParentArgs) (*git.GitRepository, error)) *Client_GetRepositoryWithParent_Call { _c.Call.Return(run) return _c } -// GetRevert provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetRevert(_a0 context.Context, _a1 git.GetRevertArgs) (*git.GitRevert, error) { - ret := _m.Called(_a0, _a1) +// GetRevert provides a mock function for the type Client +func (_mock *Client) GetRevert(context1 context.Context, getRevertArgs git.GetRevertArgs) (*git.GitRevert, error) { + ret := _mock.Called(context1, getRevertArgs) if len(ret) == 0 { panic("no return value specified for GetRevert") @@ -5629,23 +5459,21 @@ func (_m *Client) GetRevert(_a0 context.Context, _a1 git.GetRevertArgs) (*git.Gi var r0 *git.GitRevert var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetRevertArgs) (*git.GitRevert, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRevertArgs) (*git.GitRevert, error)); ok { + return returnFunc(context1, getRevertArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetRevertArgs) *git.GitRevert); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRevertArgs) *git.GitRevert); ok { + r0 = returnFunc(context1, getRevertArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitRevert) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetRevertArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetRevertArgs) error); ok { + r1 = returnFunc(context1, getRevertArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5655,32 +5483,32 @@ type Client_GetRevert_Call struct { } // GetRevert is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetRevertArgs -func (_e *Client_Expecter) GetRevert(_a0 interface{}, _a1 interface{}) *Client_GetRevert_Call { - return &Client_GetRevert_Call{Call: _e.mock.On("GetRevert", _a0, _a1)} +// - context1 +// - getRevertArgs +func (_e *Client_Expecter) GetRevert(context1 interface{}, getRevertArgs interface{}) *Client_GetRevert_Call { + return &Client_GetRevert_Call{Call: _e.mock.On("GetRevert", context1, getRevertArgs)} } -func (_c *Client_GetRevert_Call) Run(run func(_a0 context.Context, _a1 git.GetRevertArgs)) *Client_GetRevert_Call { +func (_c *Client_GetRevert_Call) Run(run func(context1 context.Context, getRevertArgs git.GetRevertArgs)) *Client_GetRevert_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetRevertArgs)) }) return _c } -func (_c *Client_GetRevert_Call) Return(_a0 *git.GitRevert, _a1 error) *Client_GetRevert_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetRevert_Call) Return(gitRevert *git.GitRevert, err error) *Client_GetRevert_Call { + _c.Call.Return(gitRevert, err) return _c } -func (_c *Client_GetRevert_Call) RunAndReturn(run func(context.Context, git.GetRevertArgs) (*git.GitRevert, error)) *Client_GetRevert_Call { +func (_c *Client_GetRevert_Call) RunAndReturn(run func(context1 context.Context, getRevertArgs git.GetRevertArgs) (*git.GitRevert, error)) *Client_GetRevert_Call { _c.Call.Return(run) return _c } -// GetRevertForRefName provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetRevertForRefName(_a0 context.Context, _a1 git.GetRevertForRefNameArgs) (*git.GitRevert, error) { - ret := _m.Called(_a0, _a1) +// GetRevertForRefName provides a mock function for the type Client +func (_mock *Client) GetRevertForRefName(context1 context.Context, getRevertForRefNameArgs git.GetRevertForRefNameArgs) (*git.GitRevert, error) { + ret := _mock.Called(context1, getRevertForRefNameArgs) if len(ret) == 0 { panic("no return value specified for GetRevertForRefName") @@ -5688,23 +5516,21 @@ func (_m *Client) GetRevertForRefName(_a0 context.Context, _a1 git.GetRevertForR var r0 *git.GitRevert var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetRevertForRefNameArgs) (*git.GitRevert, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRevertForRefNameArgs) (*git.GitRevert, error)); ok { + return returnFunc(context1, getRevertForRefNameArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetRevertForRefNameArgs) *git.GitRevert); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetRevertForRefNameArgs) *git.GitRevert); ok { + r0 = returnFunc(context1, getRevertForRefNameArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitRevert) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetRevertForRefNameArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetRevertForRefNameArgs) error); ok { + r1 = returnFunc(context1, getRevertForRefNameArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5714,32 +5540,32 @@ type Client_GetRevertForRefName_Call struct { } // GetRevertForRefName is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetRevertForRefNameArgs -func (_e *Client_Expecter) GetRevertForRefName(_a0 interface{}, _a1 interface{}) *Client_GetRevertForRefName_Call { - return &Client_GetRevertForRefName_Call{Call: _e.mock.On("GetRevertForRefName", _a0, _a1)} +// - context1 +// - getRevertForRefNameArgs +func (_e *Client_Expecter) GetRevertForRefName(context1 interface{}, getRevertForRefNameArgs interface{}) *Client_GetRevertForRefName_Call { + return &Client_GetRevertForRefName_Call{Call: _e.mock.On("GetRevertForRefName", context1, getRevertForRefNameArgs)} } -func (_c *Client_GetRevertForRefName_Call) Run(run func(_a0 context.Context, _a1 git.GetRevertForRefNameArgs)) *Client_GetRevertForRefName_Call { +func (_c *Client_GetRevertForRefName_Call) Run(run func(context1 context.Context, getRevertForRefNameArgs git.GetRevertForRefNameArgs)) *Client_GetRevertForRefName_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetRevertForRefNameArgs)) }) return _c } -func (_c *Client_GetRevertForRefName_Call) Return(_a0 *git.GitRevert, _a1 error) *Client_GetRevertForRefName_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetRevertForRefName_Call) Return(gitRevert *git.GitRevert, err error) *Client_GetRevertForRefName_Call { + _c.Call.Return(gitRevert, err) return _c } -func (_c *Client_GetRevertForRefName_Call) RunAndReturn(run func(context.Context, git.GetRevertForRefNameArgs) (*git.GitRevert, error)) *Client_GetRevertForRefName_Call { +func (_c *Client_GetRevertForRefName_Call) RunAndReturn(run func(context1 context.Context, getRevertForRefNameArgs git.GetRevertForRefNameArgs) (*git.GitRevert, error)) *Client_GetRevertForRefName_Call { _c.Call.Return(run) return _c } -// GetStatuses provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetStatuses(_a0 context.Context, _a1 git.GetStatusesArgs) (*[]git.GitStatus, error) { - ret := _m.Called(_a0, _a1) +// GetStatuses provides a mock function for the type Client +func (_mock *Client) GetStatuses(context1 context.Context, getStatusesArgs git.GetStatusesArgs) (*[]git.GitStatus, error) { + ret := _mock.Called(context1, getStatusesArgs) if len(ret) == 0 { panic("no return value specified for GetStatuses") @@ -5747,23 +5573,21 @@ func (_m *Client) GetStatuses(_a0 context.Context, _a1 git.GetStatusesArgs) (*[] var r0 *[]git.GitStatus var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetStatusesArgs) (*[]git.GitStatus, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetStatusesArgs) (*[]git.GitStatus, error)); ok { + return returnFunc(context1, getStatusesArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetStatusesArgs) *[]git.GitStatus); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetStatusesArgs) *[]git.GitStatus); ok { + r0 = returnFunc(context1, getStatusesArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitStatus) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetStatusesArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetStatusesArgs) error); ok { + r1 = returnFunc(context1, getStatusesArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5773,32 +5597,32 @@ type Client_GetStatuses_Call struct { } // GetStatuses is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetStatusesArgs -func (_e *Client_Expecter) GetStatuses(_a0 interface{}, _a1 interface{}) *Client_GetStatuses_Call { - return &Client_GetStatuses_Call{Call: _e.mock.On("GetStatuses", _a0, _a1)} +// - context1 +// - getStatusesArgs +func (_e *Client_Expecter) GetStatuses(context1 interface{}, getStatusesArgs interface{}) *Client_GetStatuses_Call { + return &Client_GetStatuses_Call{Call: _e.mock.On("GetStatuses", context1, getStatusesArgs)} } -func (_c *Client_GetStatuses_Call) Run(run func(_a0 context.Context, _a1 git.GetStatusesArgs)) *Client_GetStatuses_Call { +func (_c *Client_GetStatuses_Call) Run(run func(context1 context.Context, getStatusesArgs git.GetStatusesArgs)) *Client_GetStatuses_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetStatusesArgs)) }) return _c } -func (_c *Client_GetStatuses_Call) Return(_a0 *[]git.GitStatus, _a1 error) *Client_GetStatuses_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetStatuses_Call) Return(gitStatuss *[]git.GitStatus, err error) *Client_GetStatuses_Call { + _c.Call.Return(gitStatuss, err) return _c } -func (_c *Client_GetStatuses_Call) RunAndReturn(run func(context.Context, git.GetStatusesArgs) (*[]git.GitStatus, error)) *Client_GetStatuses_Call { +func (_c *Client_GetStatuses_Call) RunAndReturn(run func(context1 context.Context, getStatusesArgs git.GetStatusesArgs) (*[]git.GitStatus, error)) *Client_GetStatuses_Call { _c.Call.Return(run) return _c } -// GetSuggestions provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetSuggestions(_a0 context.Context, _a1 git.GetSuggestionsArgs) (*[]git.GitSuggestion, error) { - ret := _m.Called(_a0, _a1) +// GetSuggestions provides a mock function for the type Client +func (_mock *Client) GetSuggestions(context1 context.Context, getSuggestionsArgs git.GetSuggestionsArgs) (*[]git.GitSuggestion, error) { + ret := _mock.Called(context1, getSuggestionsArgs) if len(ret) == 0 { panic("no return value specified for GetSuggestions") @@ -5806,23 +5630,21 @@ func (_m *Client) GetSuggestions(_a0 context.Context, _a1 git.GetSuggestionsArgs var r0 *[]git.GitSuggestion var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetSuggestionsArgs) (*[]git.GitSuggestion, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetSuggestionsArgs) (*[]git.GitSuggestion, error)); ok { + return returnFunc(context1, getSuggestionsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetSuggestionsArgs) *[]git.GitSuggestion); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetSuggestionsArgs) *[]git.GitSuggestion); ok { + r0 = returnFunc(context1, getSuggestionsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitSuggestion) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetSuggestionsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetSuggestionsArgs) error); ok { + r1 = returnFunc(context1, getSuggestionsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5832,32 +5654,32 @@ type Client_GetSuggestions_Call struct { } // GetSuggestions is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetSuggestionsArgs -func (_e *Client_Expecter) GetSuggestions(_a0 interface{}, _a1 interface{}) *Client_GetSuggestions_Call { - return &Client_GetSuggestions_Call{Call: _e.mock.On("GetSuggestions", _a0, _a1)} +// - context1 +// - getSuggestionsArgs +func (_e *Client_Expecter) GetSuggestions(context1 interface{}, getSuggestionsArgs interface{}) *Client_GetSuggestions_Call { + return &Client_GetSuggestions_Call{Call: _e.mock.On("GetSuggestions", context1, getSuggestionsArgs)} } -func (_c *Client_GetSuggestions_Call) Run(run func(_a0 context.Context, _a1 git.GetSuggestionsArgs)) *Client_GetSuggestions_Call { +func (_c *Client_GetSuggestions_Call) Run(run func(context1 context.Context, getSuggestionsArgs git.GetSuggestionsArgs)) *Client_GetSuggestions_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetSuggestionsArgs)) }) return _c } -func (_c *Client_GetSuggestions_Call) Return(_a0 *[]git.GitSuggestion, _a1 error) *Client_GetSuggestions_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetSuggestions_Call) Return(gitSuggestions *[]git.GitSuggestion, err error) *Client_GetSuggestions_Call { + _c.Call.Return(gitSuggestions, err) return _c } -func (_c *Client_GetSuggestions_Call) RunAndReturn(run func(context.Context, git.GetSuggestionsArgs) (*[]git.GitSuggestion, error)) *Client_GetSuggestions_Call { +func (_c *Client_GetSuggestions_Call) RunAndReturn(run func(context1 context.Context, getSuggestionsArgs git.GetSuggestionsArgs) (*[]git.GitSuggestion, error)) *Client_GetSuggestions_Call { _c.Call.Return(run) return _c } -// GetThreads provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetThreads(_a0 context.Context, _a1 git.GetThreadsArgs) (*[]git.GitPullRequestCommentThread, error) { - ret := _m.Called(_a0, _a1) +// GetThreads provides a mock function for the type Client +func (_mock *Client) GetThreads(context1 context.Context, getThreadsArgs git.GetThreadsArgs) (*[]git.GitPullRequestCommentThread, error) { + ret := _mock.Called(context1, getThreadsArgs) if len(ret) == 0 { panic("no return value specified for GetThreads") @@ -5865,23 +5687,21 @@ func (_m *Client) GetThreads(_a0 context.Context, _a1 git.GetThreadsArgs) (*[]gi var r0 *[]git.GitPullRequestCommentThread var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetThreadsArgs) (*[]git.GitPullRequestCommentThread, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetThreadsArgs) (*[]git.GitPullRequestCommentThread, error)); ok { + return returnFunc(context1, getThreadsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetThreadsArgs) *[]git.GitPullRequestCommentThread); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetThreadsArgs) *[]git.GitPullRequestCommentThread); ok { + r0 = returnFunc(context1, getThreadsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitPullRequestCommentThread) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetThreadsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetThreadsArgs) error); ok { + r1 = returnFunc(context1, getThreadsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5891,32 +5711,32 @@ type Client_GetThreads_Call struct { } // GetThreads is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetThreadsArgs -func (_e *Client_Expecter) GetThreads(_a0 interface{}, _a1 interface{}) *Client_GetThreads_Call { - return &Client_GetThreads_Call{Call: _e.mock.On("GetThreads", _a0, _a1)} +// - context1 +// - getThreadsArgs +func (_e *Client_Expecter) GetThreads(context1 interface{}, getThreadsArgs interface{}) *Client_GetThreads_Call { + return &Client_GetThreads_Call{Call: _e.mock.On("GetThreads", context1, getThreadsArgs)} } -func (_c *Client_GetThreads_Call) Run(run func(_a0 context.Context, _a1 git.GetThreadsArgs)) *Client_GetThreads_Call { +func (_c *Client_GetThreads_Call) Run(run func(context1 context.Context, getThreadsArgs git.GetThreadsArgs)) *Client_GetThreads_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetThreadsArgs)) }) return _c } -func (_c *Client_GetThreads_Call) Return(_a0 *[]git.GitPullRequestCommentThread, _a1 error) *Client_GetThreads_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetThreads_Call) Return(gitPullRequestCommentThreads *[]git.GitPullRequestCommentThread, err error) *Client_GetThreads_Call { + _c.Call.Return(gitPullRequestCommentThreads, err) return _c } -func (_c *Client_GetThreads_Call) RunAndReturn(run func(context.Context, git.GetThreadsArgs) (*[]git.GitPullRequestCommentThread, error)) *Client_GetThreads_Call { +func (_c *Client_GetThreads_Call) RunAndReturn(run func(context1 context.Context, getThreadsArgs git.GetThreadsArgs) (*[]git.GitPullRequestCommentThread, error)) *Client_GetThreads_Call { _c.Call.Return(run) return _c } -// GetTree provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetTree(_a0 context.Context, _a1 git.GetTreeArgs) (*git.GitTreeRef, error) { - ret := _m.Called(_a0, _a1) +// GetTree provides a mock function for the type Client +func (_mock *Client) GetTree(context1 context.Context, getTreeArgs git.GetTreeArgs) (*git.GitTreeRef, error) { + ret := _mock.Called(context1, getTreeArgs) if len(ret) == 0 { panic("no return value specified for GetTree") @@ -5924,23 +5744,21 @@ func (_m *Client) GetTree(_a0 context.Context, _a1 git.GetTreeArgs) (*git.GitTre var r0 *git.GitTreeRef var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetTreeArgs) (*git.GitTreeRef, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetTreeArgs) (*git.GitTreeRef, error)); ok { + return returnFunc(context1, getTreeArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetTreeArgs) *git.GitTreeRef); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetTreeArgs) *git.GitTreeRef); ok { + r0 = returnFunc(context1, getTreeArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitTreeRef) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetTreeArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetTreeArgs) error); ok { + r1 = returnFunc(context1, getTreeArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -5950,32 +5768,32 @@ type Client_GetTree_Call struct { } // GetTree is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetTreeArgs -func (_e *Client_Expecter) GetTree(_a0 interface{}, _a1 interface{}) *Client_GetTree_Call { - return &Client_GetTree_Call{Call: _e.mock.On("GetTree", _a0, _a1)} +// - context1 +// - getTreeArgs +func (_e *Client_Expecter) GetTree(context1 interface{}, getTreeArgs interface{}) *Client_GetTree_Call { + return &Client_GetTree_Call{Call: _e.mock.On("GetTree", context1, getTreeArgs)} } -func (_c *Client_GetTree_Call) Run(run func(_a0 context.Context, _a1 git.GetTreeArgs)) *Client_GetTree_Call { +func (_c *Client_GetTree_Call) Run(run func(context1 context.Context, getTreeArgs git.GetTreeArgs)) *Client_GetTree_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetTreeArgs)) }) return _c } -func (_c *Client_GetTree_Call) Return(_a0 *git.GitTreeRef, _a1 error) *Client_GetTree_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetTree_Call) Return(gitTreeRef *git.GitTreeRef, err error) *Client_GetTree_Call { + _c.Call.Return(gitTreeRef, err) return _c } -func (_c *Client_GetTree_Call) RunAndReturn(run func(context.Context, git.GetTreeArgs) (*git.GitTreeRef, error)) *Client_GetTree_Call { +func (_c *Client_GetTree_Call) RunAndReturn(run func(context1 context.Context, getTreeArgs git.GetTreeArgs) (*git.GitTreeRef, error)) *Client_GetTree_Call { _c.Call.Return(run) return _c } -// GetTreeZip provides a mock function with given fields: _a0, _a1 -func (_m *Client) GetTreeZip(_a0 context.Context, _a1 git.GetTreeZipArgs) (io.ReadCloser, error) { - ret := _m.Called(_a0, _a1) +// GetTreeZip provides a mock function for the type Client +func (_mock *Client) GetTreeZip(context1 context.Context, getTreeZipArgs git.GetTreeZipArgs) (io.ReadCloser, error) { + ret := _mock.Called(context1, getTreeZipArgs) if len(ret) == 0 { panic("no return value specified for GetTreeZip") @@ -5983,23 +5801,21 @@ func (_m *Client) GetTreeZip(_a0 context.Context, _a1 git.GetTreeZipArgs) (io.Re var r0 io.ReadCloser var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.GetTreeZipArgs) (io.ReadCloser, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetTreeZipArgs) (io.ReadCloser, error)); ok { + return returnFunc(context1, getTreeZipArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.GetTreeZipArgs) io.ReadCloser); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.GetTreeZipArgs) io.ReadCloser); ok { + r0 = returnFunc(context1, getTreeZipArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(io.ReadCloser) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.GetTreeZipArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.GetTreeZipArgs) error); ok { + r1 = returnFunc(context1, getTreeZipArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -6009,32 +5825,32 @@ type Client_GetTreeZip_Call struct { } // GetTreeZip is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.GetTreeZipArgs -func (_e *Client_Expecter) GetTreeZip(_a0 interface{}, _a1 interface{}) *Client_GetTreeZip_Call { - return &Client_GetTreeZip_Call{Call: _e.mock.On("GetTreeZip", _a0, _a1)} +// - context1 +// - getTreeZipArgs +func (_e *Client_Expecter) GetTreeZip(context1 interface{}, getTreeZipArgs interface{}) *Client_GetTreeZip_Call { + return &Client_GetTreeZip_Call{Call: _e.mock.On("GetTreeZip", context1, getTreeZipArgs)} } -func (_c *Client_GetTreeZip_Call) Run(run func(_a0 context.Context, _a1 git.GetTreeZipArgs)) *Client_GetTreeZip_Call { +func (_c *Client_GetTreeZip_Call) Run(run func(context1 context.Context, getTreeZipArgs git.GetTreeZipArgs)) *Client_GetTreeZip_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.GetTreeZipArgs)) }) return _c } -func (_c *Client_GetTreeZip_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_GetTreeZip_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetTreeZip_Call) Return(readCloser io.ReadCloser, err error) *Client_GetTreeZip_Call { + _c.Call.Return(readCloser, err) return _c } -func (_c *Client_GetTreeZip_Call) RunAndReturn(run func(context.Context, git.GetTreeZipArgs) (io.ReadCloser, error)) *Client_GetTreeZip_Call { +func (_c *Client_GetTreeZip_Call) RunAndReturn(run func(context1 context.Context, getTreeZipArgs git.GetTreeZipArgs) (io.ReadCloser, error)) *Client_GetTreeZip_Call { _c.Call.Return(run) return _c } -// QueryImportRequests provides a mock function with given fields: _a0, _a1 -func (_m *Client) QueryImportRequests(_a0 context.Context, _a1 git.QueryImportRequestsArgs) (*[]git.GitImportRequest, error) { - ret := _m.Called(_a0, _a1) +// QueryImportRequests provides a mock function for the type Client +func (_mock *Client) QueryImportRequests(context1 context.Context, queryImportRequestsArgs git.QueryImportRequestsArgs) (*[]git.GitImportRequest, error) { + ret := _mock.Called(context1, queryImportRequestsArgs) if len(ret) == 0 { panic("no return value specified for QueryImportRequests") @@ -6042,23 +5858,21 @@ func (_m *Client) QueryImportRequests(_a0 context.Context, _a1 git.QueryImportRe var r0 *[]git.GitImportRequest var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.QueryImportRequestsArgs) (*[]git.GitImportRequest, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.QueryImportRequestsArgs) (*[]git.GitImportRequest, error)); ok { + return returnFunc(context1, queryImportRequestsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.QueryImportRequestsArgs) *[]git.GitImportRequest); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.QueryImportRequestsArgs) *[]git.GitImportRequest); ok { + r0 = returnFunc(context1, queryImportRequestsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitImportRequest) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.QueryImportRequestsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.QueryImportRequestsArgs) error); ok { + r1 = returnFunc(context1, queryImportRequestsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -6068,32 +5882,32 @@ type Client_QueryImportRequests_Call struct { } // QueryImportRequests is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.QueryImportRequestsArgs -func (_e *Client_Expecter) QueryImportRequests(_a0 interface{}, _a1 interface{}) *Client_QueryImportRequests_Call { - return &Client_QueryImportRequests_Call{Call: _e.mock.On("QueryImportRequests", _a0, _a1)} +// - context1 +// - queryImportRequestsArgs +func (_e *Client_Expecter) QueryImportRequests(context1 interface{}, queryImportRequestsArgs interface{}) *Client_QueryImportRequests_Call { + return &Client_QueryImportRequests_Call{Call: _e.mock.On("QueryImportRequests", context1, queryImportRequestsArgs)} } -func (_c *Client_QueryImportRequests_Call) Run(run func(_a0 context.Context, _a1 git.QueryImportRequestsArgs)) *Client_QueryImportRequests_Call { +func (_c *Client_QueryImportRequests_Call) Run(run func(context1 context.Context, queryImportRequestsArgs git.QueryImportRequestsArgs)) *Client_QueryImportRequests_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.QueryImportRequestsArgs)) }) return _c } -func (_c *Client_QueryImportRequests_Call) Return(_a0 *[]git.GitImportRequest, _a1 error) *Client_QueryImportRequests_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_QueryImportRequests_Call) Return(gitImportRequests *[]git.GitImportRequest, err error) *Client_QueryImportRequests_Call { + _c.Call.Return(gitImportRequests, err) return _c } -func (_c *Client_QueryImportRequests_Call) RunAndReturn(run func(context.Context, git.QueryImportRequestsArgs) (*[]git.GitImportRequest, error)) *Client_QueryImportRequests_Call { +func (_c *Client_QueryImportRequests_Call) RunAndReturn(run func(context1 context.Context, queryImportRequestsArgs git.QueryImportRequestsArgs) (*[]git.GitImportRequest, error)) *Client_QueryImportRequests_Call { _c.Call.Return(run) return _c } -// RestoreRepositoryFromRecycleBin provides a mock function with given fields: _a0, _a1 -func (_m *Client) RestoreRepositoryFromRecycleBin(_a0 context.Context, _a1 git.RestoreRepositoryFromRecycleBinArgs) (*git.GitRepository, error) { - ret := _m.Called(_a0, _a1) +// RestoreRepositoryFromRecycleBin provides a mock function for the type Client +func (_mock *Client) RestoreRepositoryFromRecycleBin(context1 context.Context, restoreRepositoryFromRecycleBinArgs git.RestoreRepositoryFromRecycleBinArgs) (*git.GitRepository, error) { + ret := _mock.Called(context1, restoreRepositoryFromRecycleBinArgs) if len(ret) == 0 { panic("no return value specified for RestoreRepositoryFromRecycleBin") @@ -6101,23 +5915,21 @@ func (_m *Client) RestoreRepositoryFromRecycleBin(_a0 context.Context, _a1 git.R var r0 *git.GitRepository var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.RestoreRepositoryFromRecycleBinArgs) (*git.GitRepository, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.RestoreRepositoryFromRecycleBinArgs) (*git.GitRepository, error)); ok { + return returnFunc(context1, restoreRepositoryFromRecycleBinArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.RestoreRepositoryFromRecycleBinArgs) *git.GitRepository); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.RestoreRepositoryFromRecycleBinArgs) *git.GitRepository); ok { + r0 = returnFunc(context1, restoreRepositoryFromRecycleBinArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitRepository) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.RestoreRepositoryFromRecycleBinArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.RestoreRepositoryFromRecycleBinArgs) error); ok { + r1 = returnFunc(context1, restoreRepositoryFromRecycleBinArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -6127,44 +5939,43 @@ type Client_RestoreRepositoryFromRecycleBin_Call struct { } // RestoreRepositoryFromRecycleBin is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.RestoreRepositoryFromRecycleBinArgs -func (_e *Client_Expecter) RestoreRepositoryFromRecycleBin(_a0 interface{}, _a1 interface{}) *Client_RestoreRepositoryFromRecycleBin_Call { - return &Client_RestoreRepositoryFromRecycleBin_Call{Call: _e.mock.On("RestoreRepositoryFromRecycleBin", _a0, _a1)} +// - context1 +// - restoreRepositoryFromRecycleBinArgs +func (_e *Client_Expecter) RestoreRepositoryFromRecycleBin(context1 interface{}, restoreRepositoryFromRecycleBinArgs interface{}) *Client_RestoreRepositoryFromRecycleBin_Call { + return &Client_RestoreRepositoryFromRecycleBin_Call{Call: _e.mock.On("RestoreRepositoryFromRecycleBin", context1, restoreRepositoryFromRecycleBinArgs)} } -func (_c *Client_RestoreRepositoryFromRecycleBin_Call) Run(run func(_a0 context.Context, _a1 git.RestoreRepositoryFromRecycleBinArgs)) *Client_RestoreRepositoryFromRecycleBin_Call { +func (_c *Client_RestoreRepositoryFromRecycleBin_Call) Run(run func(context1 context.Context, restoreRepositoryFromRecycleBinArgs git.RestoreRepositoryFromRecycleBinArgs)) *Client_RestoreRepositoryFromRecycleBin_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.RestoreRepositoryFromRecycleBinArgs)) }) return _c } -func (_c *Client_RestoreRepositoryFromRecycleBin_Call) Return(_a0 *git.GitRepository, _a1 error) *Client_RestoreRepositoryFromRecycleBin_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_RestoreRepositoryFromRecycleBin_Call) Return(gitRepository *git.GitRepository, err error) *Client_RestoreRepositoryFromRecycleBin_Call { + _c.Call.Return(gitRepository, err) return _c } -func (_c *Client_RestoreRepositoryFromRecycleBin_Call) RunAndReturn(run func(context.Context, git.RestoreRepositoryFromRecycleBinArgs) (*git.GitRepository, error)) *Client_RestoreRepositoryFromRecycleBin_Call { +func (_c *Client_RestoreRepositoryFromRecycleBin_Call) RunAndReturn(run func(context1 context.Context, restoreRepositoryFromRecycleBinArgs git.RestoreRepositoryFromRecycleBinArgs) (*git.GitRepository, error)) *Client_RestoreRepositoryFromRecycleBin_Call { _c.Call.Return(run) return _c } -// SharePullRequest provides a mock function with given fields: _a0, _a1 -func (_m *Client) SharePullRequest(_a0 context.Context, _a1 git.SharePullRequestArgs) error { - ret := _m.Called(_a0, _a1) +// SharePullRequest provides a mock function for the type Client +func (_mock *Client) SharePullRequest(context1 context.Context, sharePullRequestArgs git.SharePullRequestArgs) error { + ret := _mock.Called(context1, sharePullRequestArgs) if len(ret) == 0 { panic("no return value specified for SharePullRequest") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, git.SharePullRequestArgs) error); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.SharePullRequestArgs) error); ok { + r0 = returnFunc(context1, sharePullRequestArgs) } else { r0 = ret.Error(0) } - return r0 } @@ -6174,32 +5985,32 @@ type Client_SharePullRequest_Call struct { } // SharePullRequest is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.SharePullRequestArgs -func (_e *Client_Expecter) SharePullRequest(_a0 interface{}, _a1 interface{}) *Client_SharePullRequest_Call { - return &Client_SharePullRequest_Call{Call: _e.mock.On("SharePullRequest", _a0, _a1)} +// - context1 +// - sharePullRequestArgs +func (_e *Client_Expecter) SharePullRequest(context1 interface{}, sharePullRequestArgs interface{}) *Client_SharePullRequest_Call { + return &Client_SharePullRequest_Call{Call: _e.mock.On("SharePullRequest", context1, sharePullRequestArgs)} } -func (_c *Client_SharePullRequest_Call) Run(run func(_a0 context.Context, _a1 git.SharePullRequestArgs)) *Client_SharePullRequest_Call { +func (_c *Client_SharePullRequest_Call) Run(run func(context1 context.Context, sharePullRequestArgs git.SharePullRequestArgs)) *Client_SharePullRequest_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.SharePullRequestArgs)) }) return _c } -func (_c *Client_SharePullRequest_Call) Return(_a0 error) *Client_SharePullRequest_Call { - _c.Call.Return(_a0) +func (_c *Client_SharePullRequest_Call) Return(err error) *Client_SharePullRequest_Call { + _c.Call.Return(err) return _c } -func (_c *Client_SharePullRequest_Call) RunAndReturn(run func(context.Context, git.SharePullRequestArgs) error) *Client_SharePullRequest_Call { +func (_c *Client_SharePullRequest_Call) RunAndReturn(run func(context1 context.Context, sharePullRequestArgs git.SharePullRequestArgs) error) *Client_SharePullRequest_Call { _c.Call.Return(run) return _c } -// UpdateComment provides a mock function with given fields: _a0, _a1 -func (_m *Client) UpdateComment(_a0 context.Context, _a1 git.UpdateCommentArgs) (*git.Comment, error) { - ret := _m.Called(_a0, _a1) +// UpdateComment provides a mock function for the type Client +func (_mock *Client) UpdateComment(context1 context.Context, updateCommentArgs git.UpdateCommentArgs) (*git.Comment, error) { + ret := _mock.Called(context1, updateCommentArgs) if len(ret) == 0 { panic("no return value specified for UpdateComment") @@ -6207,23 +6018,21 @@ func (_m *Client) UpdateComment(_a0 context.Context, _a1 git.UpdateCommentArgs) var r0 *git.Comment var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.UpdateCommentArgs) (*git.Comment, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdateCommentArgs) (*git.Comment, error)); ok { + return returnFunc(context1, updateCommentArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.UpdateCommentArgs) *git.Comment); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdateCommentArgs) *git.Comment); ok { + r0 = returnFunc(context1, updateCommentArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.Comment) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.UpdateCommentArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.UpdateCommentArgs) error); ok { + r1 = returnFunc(context1, updateCommentArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -6233,32 +6042,32 @@ type Client_UpdateComment_Call struct { } // UpdateComment is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.UpdateCommentArgs -func (_e *Client_Expecter) UpdateComment(_a0 interface{}, _a1 interface{}) *Client_UpdateComment_Call { - return &Client_UpdateComment_Call{Call: _e.mock.On("UpdateComment", _a0, _a1)} +// - context1 +// - updateCommentArgs +func (_e *Client_Expecter) UpdateComment(context1 interface{}, updateCommentArgs interface{}) *Client_UpdateComment_Call { + return &Client_UpdateComment_Call{Call: _e.mock.On("UpdateComment", context1, updateCommentArgs)} } -func (_c *Client_UpdateComment_Call) Run(run func(_a0 context.Context, _a1 git.UpdateCommentArgs)) *Client_UpdateComment_Call { +func (_c *Client_UpdateComment_Call) Run(run func(context1 context.Context, updateCommentArgs git.UpdateCommentArgs)) *Client_UpdateComment_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.UpdateCommentArgs)) }) return _c } -func (_c *Client_UpdateComment_Call) Return(_a0 *git.Comment, _a1 error) *Client_UpdateComment_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_UpdateComment_Call) Return(comment *git.Comment, err error) *Client_UpdateComment_Call { + _c.Call.Return(comment, err) return _c } -func (_c *Client_UpdateComment_Call) RunAndReturn(run func(context.Context, git.UpdateCommentArgs) (*git.Comment, error)) *Client_UpdateComment_Call { +func (_c *Client_UpdateComment_Call) RunAndReturn(run func(context1 context.Context, updateCommentArgs git.UpdateCommentArgs) (*git.Comment, error)) *Client_UpdateComment_Call { _c.Call.Return(run) return _c } -// UpdateImportRequest provides a mock function with given fields: _a0, _a1 -func (_m *Client) UpdateImportRequest(_a0 context.Context, _a1 git.UpdateImportRequestArgs) (*git.GitImportRequest, error) { - ret := _m.Called(_a0, _a1) +// UpdateImportRequest provides a mock function for the type Client +func (_mock *Client) UpdateImportRequest(context1 context.Context, updateImportRequestArgs git.UpdateImportRequestArgs) (*git.GitImportRequest, error) { + ret := _mock.Called(context1, updateImportRequestArgs) if len(ret) == 0 { panic("no return value specified for UpdateImportRequest") @@ -6266,23 +6075,21 @@ func (_m *Client) UpdateImportRequest(_a0 context.Context, _a1 git.UpdateImportR var r0 *git.GitImportRequest var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.UpdateImportRequestArgs) (*git.GitImportRequest, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdateImportRequestArgs) (*git.GitImportRequest, error)); ok { + return returnFunc(context1, updateImportRequestArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.UpdateImportRequestArgs) *git.GitImportRequest); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdateImportRequestArgs) *git.GitImportRequest); ok { + r0 = returnFunc(context1, updateImportRequestArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitImportRequest) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.UpdateImportRequestArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.UpdateImportRequestArgs) error); ok { + r1 = returnFunc(context1, updateImportRequestArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -6292,32 +6099,32 @@ type Client_UpdateImportRequest_Call struct { } // UpdateImportRequest is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.UpdateImportRequestArgs -func (_e *Client_Expecter) UpdateImportRequest(_a0 interface{}, _a1 interface{}) *Client_UpdateImportRequest_Call { - return &Client_UpdateImportRequest_Call{Call: _e.mock.On("UpdateImportRequest", _a0, _a1)} +// - context1 +// - updateImportRequestArgs +func (_e *Client_Expecter) UpdateImportRequest(context1 interface{}, updateImportRequestArgs interface{}) *Client_UpdateImportRequest_Call { + return &Client_UpdateImportRequest_Call{Call: _e.mock.On("UpdateImportRequest", context1, updateImportRequestArgs)} } -func (_c *Client_UpdateImportRequest_Call) Run(run func(_a0 context.Context, _a1 git.UpdateImportRequestArgs)) *Client_UpdateImportRequest_Call { +func (_c *Client_UpdateImportRequest_Call) Run(run func(context1 context.Context, updateImportRequestArgs git.UpdateImportRequestArgs)) *Client_UpdateImportRequest_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.UpdateImportRequestArgs)) }) return _c } -func (_c *Client_UpdateImportRequest_Call) Return(_a0 *git.GitImportRequest, _a1 error) *Client_UpdateImportRequest_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_UpdateImportRequest_Call) Return(gitImportRequest *git.GitImportRequest, err error) *Client_UpdateImportRequest_Call { + _c.Call.Return(gitImportRequest, err) return _c } -func (_c *Client_UpdateImportRequest_Call) RunAndReturn(run func(context.Context, git.UpdateImportRequestArgs) (*git.GitImportRequest, error)) *Client_UpdateImportRequest_Call { +func (_c *Client_UpdateImportRequest_Call) RunAndReturn(run func(context1 context.Context, updateImportRequestArgs git.UpdateImportRequestArgs) (*git.GitImportRequest, error)) *Client_UpdateImportRequest_Call { _c.Call.Return(run) return _c } -// UpdatePullRequest provides a mock function with given fields: _a0, _a1 -func (_m *Client) UpdatePullRequest(_a0 context.Context, _a1 git.UpdatePullRequestArgs) (*git.GitPullRequest, error) { - ret := _m.Called(_a0, _a1) +// UpdatePullRequest provides a mock function for the type Client +func (_mock *Client) UpdatePullRequest(context1 context.Context, updatePullRequestArgs git.UpdatePullRequestArgs) (*git.GitPullRequest, error) { + ret := _mock.Called(context1, updatePullRequestArgs) if len(ret) == 0 { panic("no return value specified for UpdatePullRequest") @@ -6325,23 +6132,21 @@ func (_m *Client) UpdatePullRequest(_a0 context.Context, _a1 git.UpdatePullReque var r0 *git.GitPullRequest var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestArgs) (*git.GitPullRequest, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestArgs) (*git.GitPullRequest, error)); ok { + return returnFunc(context1, updatePullRequestArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestArgs) *git.GitPullRequest); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestArgs) *git.GitPullRequest); ok { + r0 = returnFunc(context1, updatePullRequestArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPullRequest) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.UpdatePullRequestArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.UpdatePullRequestArgs) error); ok { + r1 = returnFunc(context1, updatePullRequestArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -6351,44 +6156,43 @@ type Client_UpdatePullRequest_Call struct { } // UpdatePullRequest is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.UpdatePullRequestArgs -func (_e *Client_Expecter) UpdatePullRequest(_a0 interface{}, _a1 interface{}) *Client_UpdatePullRequest_Call { - return &Client_UpdatePullRequest_Call{Call: _e.mock.On("UpdatePullRequest", _a0, _a1)} +// - context1 +// - updatePullRequestArgs +func (_e *Client_Expecter) UpdatePullRequest(context1 interface{}, updatePullRequestArgs interface{}) *Client_UpdatePullRequest_Call { + return &Client_UpdatePullRequest_Call{Call: _e.mock.On("UpdatePullRequest", context1, updatePullRequestArgs)} } -func (_c *Client_UpdatePullRequest_Call) Run(run func(_a0 context.Context, _a1 git.UpdatePullRequestArgs)) *Client_UpdatePullRequest_Call { +func (_c *Client_UpdatePullRequest_Call) Run(run func(context1 context.Context, updatePullRequestArgs git.UpdatePullRequestArgs)) *Client_UpdatePullRequest_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.UpdatePullRequestArgs)) }) return _c } -func (_c *Client_UpdatePullRequest_Call) Return(_a0 *git.GitPullRequest, _a1 error) *Client_UpdatePullRequest_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_UpdatePullRequest_Call) Return(gitPullRequest *git.GitPullRequest, err error) *Client_UpdatePullRequest_Call { + _c.Call.Return(gitPullRequest, err) return _c } -func (_c *Client_UpdatePullRequest_Call) RunAndReturn(run func(context.Context, git.UpdatePullRequestArgs) (*git.GitPullRequest, error)) *Client_UpdatePullRequest_Call { +func (_c *Client_UpdatePullRequest_Call) RunAndReturn(run func(context1 context.Context, updatePullRequestArgs git.UpdatePullRequestArgs) (*git.GitPullRequest, error)) *Client_UpdatePullRequest_Call { _c.Call.Return(run) return _c } -// UpdatePullRequestIterationStatuses provides a mock function with given fields: _a0, _a1 -func (_m *Client) UpdatePullRequestIterationStatuses(_a0 context.Context, _a1 git.UpdatePullRequestIterationStatusesArgs) error { - ret := _m.Called(_a0, _a1) +// UpdatePullRequestIterationStatuses provides a mock function for the type Client +func (_mock *Client) UpdatePullRequestIterationStatuses(context1 context.Context, updatePullRequestIterationStatusesArgs git.UpdatePullRequestIterationStatusesArgs) error { + ret := _mock.Called(context1, updatePullRequestIterationStatusesArgs) if len(ret) == 0 { panic("no return value specified for UpdatePullRequestIterationStatuses") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestIterationStatusesArgs) error); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestIterationStatusesArgs) error); ok { + r0 = returnFunc(context1, updatePullRequestIterationStatusesArgs) } else { r0 = ret.Error(0) } - return r0 } @@ -6398,32 +6202,32 @@ type Client_UpdatePullRequestIterationStatuses_Call struct { } // UpdatePullRequestIterationStatuses is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.UpdatePullRequestIterationStatusesArgs -func (_e *Client_Expecter) UpdatePullRequestIterationStatuses(_a0 interface{}, _a1 interface{}) *Client_UpdatePullRequestIterationStatuses_Call { - return &Client_UpdatePullRequestIterationStatuses_Call{Call: _e.mock.On("UpdatePullRequestIterationStatuses", _a0, _a1)} +// - context1 +// - updatePullRequestIterationStatusesArgs +func (_e *Client_Expecter) UpdatePullRequestIterationStatuses(context1 interface{}, updatePullRequestIterationStatusesArgs interface{}) *Client_UpdatePullRequestIterationStatuses_Call { + return &Client_UpdatePullRequestIterationStatuses_Call{Call: _e.mock.On("UpdatePullRequestIterationStatuses", context1, updatePullRequestIterationStatusesArgs)} } -func (_c *Client_UpdatePullRequestIterationStatuses_Call) Run(run func(_a0 context.Context, _a1 git.UpdatePullRequestIterationStatusesArgs)) *Client_UpdatePullRequestIterationStatuses_Call { +func (_c *Client_UpdatePullRequestIterationStatuses_Call) Run(run func(context1 context.Context, updatePullRequestIterationStatusesArgs git.UpdatePullRequestIterationStatusesArgs)) *Client_UpdatePullRequestIterationStatuses_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.UpdatePullRequestIterationStatusesArgs)) }) return _c } -func (_c *Client_UpdatePullRequestIterationStatuses_Call) Return(_a0 error) *Client_UpdatePullRequestIterationStatuses_Call { - _c.Call.Return(_a0) +func (_c *Client_UpdatePullRequestIterationStatuses_Call) Return(err error) *Client_UpdatePullRequestIterationStatuses_Call { + _c.Call.Return(err) return _c } -func (_c *Client_UpdatePullRequestIterationStatuses_Call) RunAndReturn(run func(context.Context, git.UpdatePullRequestIterationStatusesArgs) error) *Client_UpdatePullRequestIterationStatuses_Call { +func (_c *Client_UpdatePullRequestIterationStatuses_Call) RunAndReturn(run func(context1 context.Context, updatePullRequestIterationStatusesArgs git.UpdatePullRequestIterationStatusesArgs) error) *Client_UpdatePullRequestIterationStatuses_Call { _c.Call.Return(run) return _c } -// UpdatePullRequestProperties provides a mock function with given fields: _a0, _a1 -func (_m *Client) UpdatePullRequestProperties(_a0 context.Context, _a1 git.UpdatePullRequestPropertiesArgs) (interface{}, error) { - ret := _m.Called(_a0, _a1) +// UpdatePullRequestProperties provides a mock function for the type Client +func (_mock *Client) UpdatePullRequestProperties(context1 context.Context, updatePullRequestPropertiesArgs git.UpdatePullRequestPropertiesArgs) (interface{}, error) { + ret := _mock.Called(context1, updatePullRequestPropertiesArgs) if len(ret) == 0 { panic("no return value specified for UpdatePullRequestProperties") @@ -6431,23 +6235,21 @@ func (_m *Client) UpdatePullRequestProperties(_a0 context.Context, _a1 git.Updat var r0 interface{} var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestPropertiesArgs) (interface{}, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestPropertiesArgs) (interface{}, error)); ok { + return returnFunc(context1, updatePullRequestPropertiesArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestPropertiesArgs) interface{}); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestPropertiesArgs) interface{}); ok { + r0 = returnFunc(context1, updatePullRequestPropertiesArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(interface{}) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.UpdatePullRequestPropertiesArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.UpdatePullRequestPropertiesArgs) error); ok { + r1 = returnFunc(context1, updatePullRequestPropertiesArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -6457,32 +6259,32 @@ type Client_UpdatePullRequestProperties_Call struct { } // UpdatePullRequestProperties is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.UpdatePullRequestPropertiesArgs -func (_e *Client_Expecter) UpdatePullRequestProperties(_a0 interface{}, _a1 interface{}) *Client_UpdatePullRequestProperties_Call { - return &Client_UpdatePullRequestProperties_Call{Call: _e.mock.On("UpdatePullRequestProperties", _a0, _a1)} +// - context1 +// - updatePullRequestPropertiesArgs +func (_e *Client_Expecter) UpdatePullRequestProperties(context1 interface{}, updatePullRequestPropertiesArgs interface{}) *Client_UpdatePullRequestProperties_Call { + return &Client_UpdatePullRequestProperties_Call{Call: _e.mock.On("UpdatePullRequestProperties", context1, updatePullRequestPropertiesArgs)} } -func (_c *Client_UpdatePullRequestProperties_Call) Run(run func(_a0 context.Context, _a1 git.UpdatePullRequestPropertiesArgs)) *Client_UpdatePullRequestProperties_Call { +func (_c *Client_UpdatePullRequestProperties_Call) Run(run func(context1 context.Context, updatePullRequestPropertiesArgs git.UpdatePullRequestPropertiesArgs)) *Client_UpdatePullRequestProperties_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.UpdatePullRequestPropertiesArgs)) }) return _c } -func (_c *Client_UpdatePullRequestProperties_Call) Return(_a0 interface{}, _a1 error) *Client_UpdatePullRequestProperties_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_UpdatePullRequestProperties_Call) Return(ifaceVal interface{}, err error) *Client_UpdatePullRequestProperties_Call { + _c.Call.Return(ifaceVal, err) return _c } -func (_c *Client_UpdatePullRequestProperties_Call) RunAndReturn(run func(context.Context, git.UpdatePullRequestPropertiesArgs) (interface{}, error)) *Client_UpdatePullRequestProperties_Call { +func (_c *Client_UpdatePullRequestProperties_Call) RunAndReturn(run func(context1 context.Context, updatePullRequestPropertiesArgs git.UpdatePullRequestPropertiesArgs) (interface{}, error)) *Client_UpdatePullRequestProperties_Call { _c.Call.Return(run) return _c } -// UpdatePullRequestReviewer provides a mock function with given fields: _a0, _a1 -func (_m *Client) UpdatePullRequestReviewer(_a0 context.Context, _a1 git.UpdatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error) { - ret := _m.Called(_a0, _a1) +// UpdatePullRequestReviewer provides a mock function for the type Client +func (_mock *Client) UpdatePullRequestReviewer(context1 context.Context, updatePullRequestReviewerArgs git.UpdatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error) { + ret := _mock.Called(context1, updatePullRequestReviewerArgs) if len(ret) == 0 { panic("no return value specified for UpdatePullRequestReviewer") @@ -6490,23 +6292,21 @@ func (_m *Client) UpdatePullRequestReviewer(_a0 context.Context, _a1 git.UpdateP var r0 *git.IdentityRefWithVote var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error)); ok { + return returnFunc(context1, updatePullRequestReviewerArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestReviewerArgs) *git.IdentityRefWithVote); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestReviewerArgs) *git.IdentityRefWithVote); ok { + r0 = returnFunc(context1, updatePullRequestReviewerArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.IdentityRefWithVote) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.UpdatePullRequestReviewerArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.UpdatePullRequestReviewerArgs) error); ok { + r1 = returnFunc(context1, updatePullRequestReviewerArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -6516,44 +6316,43 @@ type Client_UpdatePullRequestReviewer_Call struct { } // UpdatePullRequestReviewer is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.UpdatePullRequestReviewerArgs -func (_e *Client_Expecter) UpdatePullRequestReviewer(_a0 interface{}, _a1 interface{}) *Client_UpdatePullRequestReviewer_Call { - return &Client_UpdatePullRequestReviewer_Call{Call: _e.mock.On("UpdatePullRequestReviewer", _a0, _a1)} +// - context1 +// - updatePullRequestReviewerArgs +func (_e *Client_Expecter) UpdatePullRequestReviewer(context1 interface{}, updatePullRequestReviewerArgs interface{}) *Client_UpdatePullRequestReviewer_Call { + return &Client_UpdatePullRequestReviewer_Call{Call: _e.mock.On("UpdatePullRequestReviewer", context1, updatePullRequestReviewerArgs)} } -func (_c *Client_UpdatePullRequestReviewer_Call) Run(run func(_a0 context.Context, _a1 git.UpdatePullRequestReviewerArgs)) *Client_UpdatePullRequestReviewer_Call { +func (_c *Client_UpdatePullRequestReviewer_Call) Run(run func(context1 context.Context, updatePullRequestReviewerArgs git.UpdatePullRequestReviewerArgs)) *Client_UpdatePullRequestReviewer_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.UpdatePullRequestReviewerArgs)) }) return _c } -func (_c *Client_UpdatePullRequestReviewer_Call) Return(_a0 *git.IdentityRefWithVote, _a1 error) *Client_UpdatePullRequestReviewer_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_UpdatePullRequestReviewer_Call) Return(identityRefWithVote *git.IdentityRefWithVote, err error) *Client_UpdatePullRequestReviewer_Call { + _c.Call.Return(identityRefWithVote, err) return _c } -func (_c *Client_UpdatePullRequestReviewer_Call) RunAndReturn(run func(context.Context, git.UpdatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error)) *Client_UpdatePullRequestReviewer_Call { +func (_c *Client_UpdatePullRequestReviewer_Call) RunAndReturn(run func(context1 context.Context, updatePullRequestReviewerArgs git.UpdatePullRequestReviewerArgs) (*git.IdentityRefWithVote, error)) *Client_UpdatePullRequestReviewer_Call { _c.Call.Return(run) return _c } -// UpdatePullRequestReviewers provides a mock function with given fields: _a0, _a1 -func (_m *Client) UpdatePullRequestReviewers(_a0 context.Context, _a1 git.UpdatePullRequestReviewersArgs) error { - ret := _m.Called(_a0, _a1) +// UpdatePullRequestReviewers provides a mock function for the type Client +func (_mock *Client) UpdatePullRequestReviewers(context1 context.Context, updatePullRequestReviewersArgs git.UpdatePullRequestReviewersArgs) error { + ret := _mock.Called(context1, updatePullRequestReviewersArgs) if len(ret) == 0 { panic("no return value specified for UpdatePullRequestReviewers") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestReviewersArgs) error); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestReviewersArgs) error); ok { + r0 = returnFunc(context1, updatePullRequestReviewersArgs) } else { r0 = ret.Error(0) } - return r0 } @@ -6563,44 +6362,43 @@ type Client_UpdatePullRequestReviewers_Call struct { } // UpdatePullRequestReviewers is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.UpdatePullRequestReviewersArgs -func (_e *Client_Expecter) UpdatePullRequestReviewers(_a0 interface{}, _a1 interface{}) *Client_UpdatePullRequestReviewers_Call { - return &Client_UpdatePullRequestReviewers_Call{Call: _e.mock.On("UpdatePullRequestReviewers", _a0, _a1)} +// - context1 +// - updatePullRequestReviewersArgs +func (_e *Client_Expecter) UpdatePullRequestReviewers(context1 interface{}, updatePullRequestReviewersArgs interface{}) *Client_UpdatePullRequestReviewers_Call { + return &Client_UpdatePullRequestReviewers_Call{Call: _e.mock.On("UpdatePullRequestReviewers", context1, updatePullRequestReviewersArgs)} } -func (_c *Client_UpdatePullRequestReviewers_Call) Run(run func(_a0 context.Context, _a1 git.UpdatePullRequestReviewersArgs)) *Client_UpdatePullRequestReviewers_Call { +func (_c *Client_UpdatePullRequestReviewers_Call) Run(run func(context1 context.Context, updatePullRequestReviewersArgs git.UpdatePullRequestReviewersArgs)) *Client_UpdatePullRequestReviewers_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.UpdatePullRequestReviewersArgs)) }) return _c } -func (_c *Client_UpdatePullRequestReviewers_Call) Return(_a0 error) *Client_UpdatePullRequestReviewers_Call { - _c.Call.Return(_a0) +func (_c *Client_UpdatePullRequestReviewers_Call) Return(err error) *Client_UpdatePullRequestReviewers_Call { + _c.Call.Return(err) return _c } -func (_c *Client_UpdatePullRequestReviewers_Call) RunAndReturn(run func(context.Context, git.UpdatePullRequestReviewersArgs) error) *Client_UpdatePullRequestReviewers_Call { +func (_c *Client_UpdatePullRequestReviewers_Call) RunAndReturn(run func(context1 context.Context, updatePullRequestReviewersArgs git.UpdatePullRequestReviewersArgs) error) *Client_UpdatePullRequestReviewers_Call { _c.Call.Return(run) return _c } -// UpdatePullRequestStatuses provides a mock function with given fields: _a0, _a1 -func (_m *Client) UpdatePullRequestStatuses(_a0 context.Context, _a1 git.UpdatePullRequestStatusesArgs) error { - ret := _m.Called(_a0, _a1) +// UpdatePullRequestStatuses provides a mock function for the type Client +func (_mock *Client) UpdatePullRequestStatuses(context1 context.Context, updatePullRequestStatusesArgs git.UpdatePullRequestStatusesArgs) error { + ret := _mock.Called(context1, updatePullRequestStatusesArgs) if len(ret) == 0 { panic("no return value specified for UpdatePullRequestStatuses") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestStatusesArgs) error); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdatePullRequestStatusesArgs) error); ok { + r0 = returnFunc(context1, updatePullRequestStatusesArgs) } else { r0 = ret.Error(0) } - return r0 } @@ -6610,32 +6408,32 @@ type Client_UpdatePullRequestStatuses_Call struct { } // UpdatePullRequestStatuses is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.UpdatePullRequestStatusesArgs -func (_e *Client_Expecter) UpdatePullRequestStatuses(_a0 interface{}, _a1 interface{}) *Client_UpdatePullRequestStatuses_Call { - return &Client_UpdatePullRequestStatuses_Call{Call: _e.mock.On("UpdatePullRequestStatuses", _a0, _a1)} +// - context1 +// - updatePullRequestStatusesArgs +func (_e *Client_Expecter) UpdatePullRequestStatuses(context1 interface{}, updatePullRequestStatusesArgs interface{}) *Client_UpdatePullRequestStatuses_Call { + return &Client_UpdatePullRequestStatuses_Call{Call: _e.mock.On("UpdatePullRequestStatuses", context1, updatePullRequestStatusesArgs)} } -func (_c *Client_UpdatePullRequestStatuses_Call) Run(run func(_a0 context.Context, _a1 git.UpdatePullRequestStatusesArgs)) *Client_UpdatePullRequestStatuses_Call { +func (_c *Client_UpdatePullRequestStatuses_Call) Run(run func(context1 context.Context, updatePullRequestStatusesArgs git.UpdatePullRequestStatusesArgs)) *Client_UpdatePullRequestStatuses_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.UpdatePullRequestStatusesArgs)) }) return _c } -func (_c *Client_UpdatePullRequestStatuses_Call) Return(_a0 error) *Client_UpdatePullRequestStatuses_Call { - _c.Call.Return(_a0) +func (_c *Client_UpdatePullRequestStatuses_Call) Return(err error) *Client_UpdatePullRequestStatuses_Call { + _c.Call.Return(err) return _c } -func (_c *Client_UpdatePullRequestStatuses_Call) RunAndReturn(run func(context.Context, git.UpdatePullRequestStatusesArgs) error) *Client_UpdatePullRequestStatuses_Call { +func (_c *Client_UpdatePullRequestStatuses_Call) RunAndReturn(run func(context1 context.Context, updatePullRequestStatusesArgs git.UpdatePullRequestStatusesArgs) error) *Client_UpdatePullRequestStatuses_Call { _c.Call.Return(run) return _c } -// UpdateRef provides a mock function with given fields: _a0, _a1 -func (_m *Client) UpdateRef(_a0 context.Context, _a1 git.UpdateRefArgs) (*git.GitRef, error) { - ret := _m.Called(_a0, _a1) +// UpdateRef provides a mock function for the type Client +func (_mock *Client) UpdateRef(context1 context.Context, updateRefArgs git.UpdateRefArgs) (*git.GitRef, error) { + ret := _mock.Called(context1, updateRefArgs) if len(ret) == 0 { panic("no return value specified for UpdateRef") @@ -6643,23 +6441,21 @@ func (_m *Client) UpdateRef(_a0 context.Context, _a1 git.UpdateRefArgs) (*git.Gi var r0 *git.GitRef var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.UpdateRefArgs) (*git.GitRef, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdateRefArgs) (*git.GitRef, error)); ok { + return returnFunc(context1, updateRefArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.UpdateRefArgs) *git.GitRef); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdateRefArgs) *git.GitRef); ok { + r0 = returnFunc(context1, updateRefArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitRef) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.UpdateRefArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.UpdateRefArgs) error); ok { + r1 = returnFunc(context1, updateRefArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -6669,32 +6465,32 @@ type Client_UpdateRef_Call struct { } // UpdateRef is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.UpdateRefArgs -func (_e *Client_Expecter) UpdateRef(_a0 interface{}, _a1 interface{}) *Client_UpdateRef_Call { - return &Client_UpdateRef_Call{Call: _e.mock.On("UpdateRef", _a0, _a1)} +// - context1 +// - updateRefArgs +func (_e *Client_Expecter) UpdateRef(context1 interface{}, updateRefArgs interface{}) *Client_UpdateRef_Call { + return &Client_UpdateRef_Call{Call: _e.mock.On("UpdateRef", context1, updateRefArgs)} } -func (_c *Client_UpdateRef_Call) Run(run func(_a0 context.Context, _a1 git.UpdateRefArgs)) *Client_UpdateRef_Call { +func (_c *Client_UpdateRef_Call) Run(run func(context1 context.Context, updateRefArgs git.UpdateRefArgs)) *Client_UpdateRef_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.UpdateRefArgs)) }) return _c } -func (_c *Client_UpdateRef_Call) Return(_a0 *git.GitRef, _a1 error) *Client_UpdateRef_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_UpdateRef_Call) Return(gitRef *git.GitRef, err error) *Client_UpdateRef_Call { + _c.Call.Return(gitRef, err) return _c } -func (_c *Client_UpdateRef_Call) RunAndReturn(run func(context.Context, git.UpdateRefArgs) (*git.GitRef, error)) *Client_UpdateRef_Call { +func (_c *Client_UpdateRef_Call) RunAndReturn(run func(context1 context.Context, updateRefArgs git.UpdateRefArgs) (*git.GitRef, error)) *Client_UpdateRef_Call { _c.Call.Return(run) return _c } -// UpdateRefs provides a mock function with given fields: _a0, _a1 -func (_m *Client) UpdateRefs(_a0 context.Context, _a1 git.UpdateRefsArgs) (*[]git.GitRefUpdateResult, error) { - ret := _m.Called(_a0, _a1) +// UpdateRefs provides a mock function for the type Client +func (_mock *Client) UpdateRefs(context1 context.Context, updateRefsArgs git.UpdateRefsArgs) (*[]git.GitRefUpdateResult, error) { + ret := _mock.Called(context1, updateRefsArgs) if len(ret) == 0 { panic("no return value specified for UpdateRefs") @@ -6702,23 +6498,21 @@ func (_m *Client) UpdateRefs(_a0 context.Context, _a1 git.UpdateRefsArgs) (*[]gi var r0 *[]git.GitRefUpdateResult var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.UpdateRefsArgs) (*[]git.GitRefUpdateResult, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdateRefsArgs) (*[]git.GitRefUpdateResult, error)); ok { + return returnFunc(context1, updateRefsArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.UpdateRefsArgs) *[]git.GitRefUpdateResult); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdateRefsArgs) *[]git.GitRefUpdateResult); ok { + r0 = returnFunc(context1, updateRefsArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*[]git.GitRefUpdateResult) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.UpdateRefsArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.UpdateRefsArgs) error); ok { + r1 = returnFunc(context1, updateRefsArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -6728,32 +6522,32 @@ type Client_UpdateRefs_Call struct { } // UpdateRefs is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.UpdateRefsArgs -func (_e *Client_Expecter) UpdateRefs(_a0 interface{}, _a1 interface{}) *Client_UpdateRefs_Call { - return &Client_UpdateRefs_Call{Call: _e.mock.On("UpdateRefs", _a0, _a1)} +// - context1 +// - updateRefsArgs +func (_e *Client_Expecter) UpdateRefs(context1 interface{}, updateRefsArgs interface{}) *Client_UpdateRefs_Call { + return &Client_UpdateRefs_Call{Call: _e.mock.On("UpdateRefs", context1, updateRefsArgs)} } -func (_c *Client_UpdateRefs_Call) Run(run func(_a0 context.Context, _a1 git.UpdateRefsArgs)) *Client_UpdateRefs_Call { +func (_c *Client_UpdateRefs_Call) Run(run func(context1 context.Context, updateRefsArgs git.UpdateRefsArgs)) *Client_UpdateRefs_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.UpdateRefsArgs)) }) return _c } -func (_c *Client_UpdateRefs_Call) Return(_a0 *[]git.GitRefUpdateResult, _a1 error) *Client_UpdateRefs_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_UpdateRefs_Call) Return(gitRefUpdateResults *[]git.GitRefUpdateResult, err error) *Client_UpdateRefs_Call { + _c.Call.Return(gitRefUpdateResults, err) return _c } -func (_c *Client_UpdateRefs_Call) RunAndReturn(run func(context.Context, git.UpdateRefsArgs) (*[]git.GitRefUpdateResult, error)) *Client_UpdateRefs_Call { +func (_c *Client_UpdateRefs_Call) RunAndReturn(run func(context1 context.Context, updateRefsArgs git.UpdateRefsArgs) (*[]git.GitRefUpdateResult, error)) *Client_UpdateRefs_Call { _c.Call.Return(run) return _c } -// UpdateRepository provides a mock function with given fields: _a0, _a1 -func (_m *Client) UpdateRepository(_a0 context.Context, _a1 git.UpdateRepositoryArgs) (*git.GitRepository, error) { - ret := _m.Called(_a0, _a1) +// UpdateRepository provides a mock function for the type Client +func (_mock *Client) UpdateRepository(context1 context.Context, updateRepositoryArgs git.UpdateRepositoryArgs) (*git.GitRepository, error) { + ret := _mock.Called(context1, updateRepositoryArgs) if len(ret) == 0 { panic("no return value specified for UpdateRepository") @@ -6761,23 +6555,21 @@ func (_m *Client) UpdateRepository(_a0 context.Context, _a1 git.UpdateRepository var r0 *git.GitRepository var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.UpdateRepositoryArgs) (*git.GitRepository, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdateRepositoryArgs) (*git.GitRepository, error)); ok { + return returnFunc(context1, updateRepositoryArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.UpdateRepositoryArgs) *git.GitRepository); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdateRepositoryArgs) *git.GitRepository); ok { + r0 = returnFunc(context1, updateRepositoryArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitRepository) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.UpdateRepositoryArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.UpdateRepositoryArgs) error); ok { + r1 = returnFunc(context1, updateRepositoryArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -6787,32 +6579,32 @@ type Client_UpdateRepository_Call struct { } // UpdateRepository is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.UpdateRepositoryArgs -func (_e *Client_Expecter) UpdateRepository(_a0 interface{}, _a1 interface{}) *Client_UpdateRepository_Call { - return &Client_UpdateRepository_Call{Call: _e.mock.On("UpdateRepository", _a0, _a1)} +// - context1 +// - updateRepositoryArgs +func (_e *Client_Expecter) UpdateRepository(context1 interface{}, updateRepositoryArgs interface{}) *Client_UpdateRepository_Call { + return &Client_UpdateRepository_Call{Call: _e.mock.On("UpdateRepository", context1, updateRepositoryArgs)} } -func (_c *Client_UpdateRepository_Call) Run(run func(_a0 context.Context, _a1 git.UpdateRepositoryArgs)) *Client_UpdateRepository_Call { +func (_c *Client_UpdateRepository_Call) Run(run func(context1 context.Context, updateRepositoryArgs git.UpdateRepositoryArgs)) *Client_UpdateRepository_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.UpdateRepositoryArgs)) }) return _c } -func (_c *Client_UpdateRepository_Call) Return(_a0 *git.GitRepository, _a1 error) *Client_UpdateRepository_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_UpdateRepository_Call) Return(gitRepository *git.GitRepository, err error) *Client_UpdateRepository_Call { + _c.Call.Return(gitRepository, err) return _c } -func (_c *Client_UpdateRepository_Call) RunAndReturn(run func(context.Context, git.UpdateRepositoryArgs) (*git.GitRepository, error)) *Client_UpdateRepository_Call { +func (_c *Client_UpdateRepository_Call) RunAndReturn(run func(context1 context.Context, updateRepositoryArgs git.UpdateRepositoryArgs) (*git.GitRepository, error)) *Client_UpdateRepository_Call { _c.Call.Return(run) return _c } -// UpdateThread provides a mock function with given fields: _a0, _a1 -func (_m *Client) UpdateThread(_a0 context.Context, _a1 git.UpdateThreadArgs) (*git.GitPullRequestCommentThread, error) { - ret := _m.Called(_a0, _a1) +// UpdateThread provides a mock function for the type Client +func (_mock *Client) UpdateThread(context1 context.Context, updateThreadArgs git.UpdateThreadArgs) (*git.GitPullRequestCommentThread, error) { + ret := _mock.Called(context1, updateThreadArgs) if len(ret) == 0 { panic("no return value specified for UpdateThread") @@ -6820,23 +6612,21 @@ func (_m *Client) UpdateThread(_a0 context.Context, _a1 git.UpdateThreadArgs) (* var r0 *git.GitPullRequestCommentThread var r1 error - if rf, ok := ret.Get(0).(func(context.Context, git.UpdateThreadArgs) (*git.GitPullRequestCommentThread, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdateThreadArgs) (*git.GitPullRequestCommentThread, error)); ok { + return returnFunc(context1, updateThreadArgs) } - if rf, ok := ret.Get(0).(func(context.Context, git.UpdateThreadArgs) *git.GitPullRequestCommentThread); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, git.UpdateThreadArgs) *git.GitPullRequestCommentThread); ok { + r0 = returnFunc(context1, updateThreadArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.GitPullRequestCommentThread) } } - - if rf, ok := ret.Get(1).(func(context.Context, git.UpdateThreadArgs) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, git.UpdateThreadArgs) error); ok { + r1 = returnFunc(context1, updateThreadArgs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -6846,39 +6636,25 @@ type Client_UpdateThread_Call struct { } // UpdateThread is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 git.UpdateThreadArgs -func (_e *Client_Expecter) UpdateThread(_a0 interface{}, _a1 interface{}) *Client_UpdateThread_Call { - return &Client_UpdateThread_Call{Call: _e.mock.On("UpdateThread", _a0, _a1)} +// - context1 +// - updateThreadArgs +func (_e *Client_Expecter) UpdateThread(context1 interface{}, updateThreadArgs interface{}) *Client_UpdateThread_Call { + return &Client_UpdateThread_Call{Call: _e.mock.On("UpdateThread", context1, updateThreadArgs)} } -func (_c *Client_UpdateThread_Call) Run(run func(_a0 context.Context, _a1 git.UpdateThreadArgs)) *Client_UpdateThread_Call { +func (_c *Client_UpdateThread_Call) Run(run func(context1 context.Context, updateThreadArgs git.UpdateThreadArgs)) *Client_UpdateThread_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(git.UpdateThreadArgs)) }) return _c } -func (_c *Client_UpdateThread_Call) Return(_a0 *git.GitPullRequestCommentThread, _a1 error) *Client_UpdateThread_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_UpdateThread_Call) Return(gitPullRequestCommentThread *git.GitPullRequestCommentThread, err error) *Client_UpdateThread_Call { + _c.Call.Return(gitPullRequestCommentThread, err) return _c } -func (_c *Client_UpdateThread_Call) RunAndReturn(run func(context.Context, git.UpdateThreadArgs) (*git.GitPullRequestCommentThread, error)) *Client_UpdateThread_Call { +func (_c *Client_UpdateThread_Call) RunAndReturn(run func(context1 context.Context, updateThreadArgs git.UpdateThreadArgs) (*git.GitPullRequestCommentThread, error)) *Client_UpdateThread_Call { _c.Call.Return(run) return _c } - -// NewClient creates a new instance of Client. 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 NewClient(t interface { - mock.TestingT - Cleanup(func()) -}) *Client { - mock := &Client{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/applicationset/utils/mocks/Renderer.go b/applicationset/utils/mocks/Renderer.go index 40d39c8c0b3c8..e16665dd30b0a 100644 --- a/applicationset/utils/mocks/Renderer.go +++ b/applicationset/utils/mocks/Renderer.go @@ -1,13 +1,28 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( + "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" mock "github.com/stretchr/testify/mock" - - v1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" ) +// NewRenderer creates a new instance of Renderer. 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 NewRenderer(t interface { + mock.TestingT + Cleanup(func()) +}) *Renderer { + mock := &Renderer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // Renderer is an autogenerated mock type for the Renderer type type Renderer struct { mock.Mock @@ -21,9 +36,9 @@ func (_m *Renderer) EXPECT() *Renderer_Expecter { return &Renderer_Expecter{mock: &_m.Mock} } -// RenderTemplateParams provides a mock function with given fields: tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions -func (_m *Renderer) RenderTemplateParams(tmpl *v1alpha1.Application, syncPolicy *v1alpha1.ApplicationSetSyncPolicy, params map[string]any, useGoTemplate bool, goTemplateOptions []string) (*v1alpha1.Application, error) { - ret := _m.Called(tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions) +// RenderTemplateParams provides a mock function for the type Renderer +func (_mock *Renderer) RenderTemplateParams(tmpl *v1alpha1.Application, syncPolicy *v1alpha1.ApplicationSetSyncPolicy, params map[string]any, useGoTemplate bool, goTemplateOptions []string) (*v1alpha1.Application, error) { + ret := _mock.Called(tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions) if len(ret) == 0 { panic("no return value specified for RenderTemplateParams") @@ -31,23 +46,21 @@ func (_m *Renderer) RenderTemplateParams(tmpl *v1alpha1.Application, syncPolicy var r0 *v1alpha1.Application var r1 error - if rf, ok := ret.Get(0).(func(*v1alpha1.Application, *v1alpha1.ApplicationSetSyncPolicy, map[string]any, bool, []string) (*v1alpha1.Application, error)); ok { - return rf(tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Application, *v1alpha1.ApplicationSetSyncPolicy, map[string]any, bool, []string) (*v1alpha1.Application, error)); ok { + return returnFunc(tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions) } - if rf, ok := ret.Get(0).(func(*v1alpha1.Application, *v1alpha1.ApplicationSetSyncPolicy, map[string]any, bool, []string) *v1alpha1.Application); ok { - r0 = rf(tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Application, *v1alpha1.ApplicationSetSyncPolicy, map[string]any, bool, []string) *v1alpha1.Application); ok { + r0 = returnFunc(tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.Application) } } - - if rf, ok := ret.Get(1).(func(*v1alpha1.Application, *v1alpha1.ApplicationSetSyncPolicy, map[string]any, bool, []string) error); ok { - r1 = rf(tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions) + if returnFunc, ok := ret.Get(1).(func(*v1alpha1.Application, *v1alpha1.ApplicationSetSyncPolicy, map[string]any, bool, []string) error); ok { + r1 = returnFunc(tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -57,11 +70,11 @@ type Renderer_RenderTemplateParams_Call struct { } // RenderTemplateParams is a helper method to define mock.On call -// - tmpl *v1alpha1.Application -// - syncPolicy *v1alpha1.ApplicationSetSyncPolicy -// - params map[string]any -// - useGoTemplate bool -// - goTemplateOptions []string +// - tmpl +// - syncPolicy +// - params +// - useGoTemplate +// - goTemplateOptions func (_e *Renderer_Expecter) RenderTemplateParams(tmpl interface{}, syncPolicy interface{}, params interface{}, useGoTemplate interface{}, goTemplateOptions interface{}) *Renderer_RenderTemplateParams_Call { return &Renderer_RenderTemplateParams_Call{Call: _e.mock.On("RenderTemplateParams", tmpl, syncPolicy, params, useGoTemplate, goTemplateOptions)} } @@ -73,19 +86,19 @@ func (_c *Renderer_RenderTemplateParams_Call) Run(run func(tmpl *v1alpha1.Applic return _c } -func (_c *Renderer_RenderTemplateParams_Call) Return(_a0 *v1alpha1.Application, _a1 error) *Renderer_RenderTemplateParams_Call { - _c.Call.Return(_a0, _a1) +func (_c *Renderer_RenderTemplateParams_Call) Return(application *v1alpha1.Application, err error) *Renderer_RenderTemplateParams_Call { + _c.Call.Return(application, err) return _c } -func (_c *Renderer_RenderTemplateParams_Call) RunAndReturn(run func(*v1alpha1.Application, *v1alpha1.ApplicationSetSyncPolicy, map[string]any, bool, []string) (*v1alpha1.Application, error)) *Renderer_RenderTemplateParams_Call { +func (_c *Renderer_RenderTemplateParams_Call) RunAndReturn(run func(tmpl *v1alpha1.Application, syncPolicy *v1alpha1.ApplicationSetSyncPolicy, params map[string]any, useGoTemplate bool, goTemplateOptions []string) (*v1alpha1.Application, error)) *Renderer_RenderTemplateParams_Call { _c.Call.Return(run) return _c } -// Replace provides a mock function with given fields: tmpl, replaceMap, useGoTemplate, goTemplateOptions -func (_m *Renderer) Replace(tmpl string, replaceMap map[string]any, useGoTemplate bool, goTemplateOptions []string) (string, error) { - ret := _m.Called(tmpl, replaceMap, useGoTemplate, goTemplateOptions) +// Replace provides a mock function for the type Renderer +func (_mock *Renderer) Replace(tmpl string, replaceMap map[string]any, useGoTemplate bool, goTemplateOptions []string) (string, error) { + ret := _mock.Called(tmpl, replaceMap, useGoTemplate, goTemplateOptions) if len(ret) == 0 { panic("no return value specified for Replace") @@ -93,21 +106,19 @@ func (_m *Renderer) Replace(tmpl string, replaceMap map[string]any, useGoTemplat var r0 string var r1 error - if rf, ok := ret.Get(0).(func(string, map[string]any, bool, []string) (string, error)); ok { - return rf(tmpl, replaceMap, useGoTemplate, goTemplateOptions) + if returnFunc, ok := ret.Get(0).(func(string, map[string]any, bool, []string) (string, error)); ok { + return returnFunc(tmpl, replaceMap, useGoTemplate, goTemplateOptions) } - if rf, ok := ret.Get(0).(func(string, map[string]any, bool, []string) string); ok { - r0 = rf(tmpl, replaceMap, useGoTemplate, goTemplateOptions) + if returnFunc, ok := ret.Get(0).(func(string, map[string]any, bool, []string) string); ok { + r0 = returnFunc(tmpl, replaceMap, useGoTemplate, goTemplateOptions) } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func(string, map[string]any, bool, []string) error); ok { - r1 = rf(tmpl, replaceMap, useGoTemplate, goTemplateOptions) + if returnFunc, ok := ret.Get(1).(func(string, map[string]any, bool, []string) error); ok { + r1 = returnFunc(tmpl, replaceMap, useGoTemplate, goTemplateOptions) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -117,10 +128,10 @@ type Renderer_Replace_Call struct { } // Replace is a helper method to define mock.On call -// - tmpl string -// - replaceMap map[string]any -// - useGoTemplate bool -// - goTemplateOptions []string +// - tmpl +// - replaceMap +// - useGoTemplate +// - goTemplateOptions func (_e *Renderer_Expecter) Replace(tmpl interface{}, replaceMap interface{}, useGoTemplate interface{}, goTemplateOptions interface{}) *Renderer_Replace_Call { return &Renderer_Replace_Call{Call: _e.mock.On("Replace", tmpl, replaceMap, useGoTemplate, goTemplateOptions)} } @@ -132,26 +143,12 @@ func (_c *Renderer_Replace_Call) Run(run func(tmpl string, replaceMap map[string return _c } -func (_c *Renderer_Replace_Call) Return(_a0 string, _a1 error) *Renderer_Replace_Call { - _c.Call.Return(_a0, _a1) +func (_c *Renderer_Replace_Call) Return(s string, err error) *Renderer_Replace_Call { + _c.Call.Return(s, err) return _c } -func (_c *Renderer_Replace_Call) RunAndReturn(run func(string, map[string]any, bool, []string) (string, error)) *Renderer_Replace_Call { +func (_c *Renderer_Replace_Call) RunAndReturn(run func(tmpl string, replaceMap map[string]any, useGoTemplate bool, goTemplateOptions []string) (string, error)) *Renderer_Replace_Call { _c.Call.Return(run) return _c } - -// NewRenderer creates a new instance of Renderer. 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 NewRenderer(t interface { - mock.TestingT - Cleanup(func()) -}) *Renderer { - mock := &Renderer{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/commitserver/apiclient/mocks/Clientset.go b/commitserver/apiclient/mocks/Clientset.go index b2150b0930005..4e156f6e7ec2c 100644 --- a/commitserver/apiclient/mocks/Clientset.go +++ b/commitserver/apiclient/mocks/Clientset.go @@ -1,14 +1,29 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - apiclient "github.com/argoproj/argo-cd/v3/commitserver/apiclient" - io "github.com/argoproj/argo-cd/v3/util/io" - + "github.com/argoproj/argo-cd/v3/commitserver/apiclient" + "github.com/argoproj/argo-cd/v3/util/io" mock "github.com/stretchr/testify/mock" ) +// NewClientset creates a new instance of Clientset. 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 NewClientset(t interface { + mock.TestingT + Cleanup(func()) +}) *Clientset { + mock := &Clientset{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // Clientset is an autogenerated mock type for the Clientset type type Clientset struct { mock.Mock @@ -22,9 +37,9 @@ func (_m *Clientset) EXPECT() *Clientset_Expecter { return &Clientset_Expecter{mock: &_m.Mock} } -// NewCommitServerClient provides a mock function with no fields -func (_m *Clientset) NewCommitServerClient() (io.Closer, apiclient.CommitServiceClient, error) { - ret := _m.Called() +// NewCommitServerClient provides a mock function for the type Clientset +func (_mock *Clientset) NewCommitServerClient() (io.Closer, apiclient.CommitServiceClient, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for NewCommitServerClient") @@ -33,31 +48,28 @@ func (_m *Clientset) NewCommitServerClient() (io.Closer, apiclient.CommitService var r0 io.Closer var r1 apiclient.CommitServiceClient var r2 error - if rf, ok := ret.Get(0).(func() (io.Closer, apiclient.CommitServiceClient, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (io.Closer, apiclient.CommitServiceClient, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() io.Closer); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() io.Closer); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(io.Closer) } } - - if rf, ok := ret.Get(1).(func() apiclient.CommitServiceClient); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() apiclient.CommitServiceClient); ok { + r1 = returnFunc() } else { if ret.Get(1) != nil { r1 = ret.Get(1).(apiclient.CommitServiceClient) } } - - if rf, ok := ret.Get(2).(func() error); ok { - r2 = rf() + if returnFunc, ok := ret.Get(2).(func() error); ok { + r2 = returnFunc() } else { r2 = ret.Error(2) } - return r0, r1, r2 } @@ -78,8 +90,8 @@ func (_c *Clientset_NewCommitServerClient_Call) Run(run func()) *Clientset_NewCo return _c } -func (_c *Clientset_NewCommitServerClient_Call) Return(_a0 io.Closer, _a1 apiclient.CommitServiceClient, _a2 error) *Clientset_NewCommitServerClient_Call { - _c.Call.Return(_a0, _a1, _a2) +func (_c *Clientset_NewCommitServerClient_Call) Return(closer io.Closer, commitServiceClient apiclient.CommitServiceClient, err error) *Clientset_NewCommitServerClient_Call { + _c.Call.Return(closer, commitServiceClient, err) return _c } @@ -87,17 +99,3 @@ func (_c *Clientset_NewCommitServerClient_Call) RunAndReturn(run func() (io.Clos _c.Call.Return(run) return _c } - -// NewClientset creates a new instance of Clientset. 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 NewClientset(t interface { - mock.TestingT - Cleanup(func()) -}) *Clientset { - mock := &Clientset{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/commitserver/apiclient/mocks/CommitServiceClient.go b/commitserver/apiclient/mocks/CommitServiceClient.go index f6d3fd1daefa3..03588692ea450 100644 --- a/commitserver/apiclient/mocks/CommitServiceClient.go +++ b/commitserver/apiclient/mocks/CommitServiceClient.go @@ -1,17 +1,31 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - context "context" - - apiclient "github.com/argoproj/argo-cd/v3/commitserver/apiclient" - - grpc "google.golang.org/grpc" + "context" + "github.com/argoproj/argo-cd/v3/commitserver/apiclient" mock "github.com/stretchr/testify/mock" + "google.golang.org/grpc" ) +// NewCommitServiceClient creates a new instance of CommitServiceClient. 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 NewCommitServiceClient(t interface { + mock.TestingT + Cleanup(func()) +}) *CommitServiceClient { + mock := &CommitServiceClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // CommitServiceClient is an autogenerated mock type for the CommitServiceClient type type CommitServiceClient struct { mock.Mock @@ -25,8 +39,9 @@ func (_m *CommitServiceClient) EXPECT() *CommitServiceClient_Expecter { return &CommitServiceClient_Expecter{mock: &_m.Mock} } -// CommitHydratedManifests provides a mock function with given fields: ctx, in, opts -func (_m *CommitServiceClient) CommitHydratedManifests(ctx context.Context, in *apiclient.CommitHydratedManifestsRequest, opts ...grpc.CallOption) (*apiclient.CommitHydratedManifestsResponse, error) { +// CommitHydratedManifests provides a mock function for the type CommitServiceClient +func (_mock *CommitServiceClient) CommitHydratedManifests(ctx context.Context, in *apiclient.CommitHydratedManifestsRequest, opts ...grpc.CallOption) (*apiclient.CommitHydratedManifestsResponse, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -34,7 +49,7 @@ func (_m *CommitServiceClient) CommitHydratedManifests(ctx context.Context, in * var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for CommitHydratedManifests") @@ -42,23 +57,21 @@ func (_m *CommitServiceClient) CommitHydratedManifests(ctx context.Context, in * var r0 *apiclient.CommitHydratedManifestsResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.CommitHydratedManifestsRequest, ...grpc.CallOption) (*apiclient.CommitHydratedManifestsResponse, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.CommitHydratedManifestsRequest, ...grpc.CallOption) (*apiclient.CommitHydratedManifestsResponse, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.CommitHydratedManifestsRequest, ...grpc.CallOption) *apiclient.CommitHydratedManifestsResponse); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.CommitHydratedManifestsRequest, ...grpc.CallOption) *apiclient.CommitHydratedManifestsResponse); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*apiclient.CommitHydratedManifestsResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *apiclient.CommitHydratedManifestsRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *apiclient.CommitHydratedManifestsRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -68,9 +81,9 @@ type CommitServiceClient_CommitHydratedManifests_Call struct { } // CommitHydratedManifests is a helper method to define mock.On call -// - ctx context.Context -// - in *apiclient.CommitHydratedManifestsRequest -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *CommitServiceClient_Expecter) CommitHydratedManifests(ctx interface{}, in interface{}, opts ...interface{}) *CommitServiceClient_CommitHydratedManifests_Call { return &CommitServiceClient_CommitHydratedManifests_Call{Call: _e.mock.On("CommitHydratedManifests", append([]interface{}{ctx, in}, opts...)...)} @@ -89,26 +102,12 @@ func (_c *CommitServiceClient_CommitHydratedManifests_Call) Run(run func(ctx con return _c } -func (_c *CommitServiceClient_CommitHydratedManifests_Call) Return(_a0 *apiclient.CommitHydratedManifestsResponse, _a1 error) *CommitServiceClient_CommitHydratedManifests_Call { - _c.Call.Return(_a0, _a1) +func (_c *CommitServiceClient_CommitHydratedManifests_Call) Return(commitHydratedManifestsResponse *apiclient.CommitHydratedManifestsResponse, err error) *CommitServiceClient_CommitHydratedManifests_Call { + _c.Call.Return(commitHydratedManifestsResponse, err) return _c } -func (_c *CommitServiceClient_CommitHydratedManifests_Call) RunAndReturn(run func(context.Context, *apiclient.CommitHydratedManifestsRequest, ...grpc.CallOption) (*apiclient.CommitHydratedManifestsResponse, error)) *CommitServiceClient_CommitHydratedManifests_Call { +func (_c *CommitServiceClient_CommitHydratedManifests_Call) RunAndReturn(run func(ctx context.Context, in *apiclient.CommitHydratedManifestsRequest, opts ...grpc.CallOption) (*apiclient.CommitHydratedManifestsResponse, error)) *CommitServiceClient_CommitHydratedManifests_Call { _c.Call.Return(run) return _c } - -// NewCommitServiceClient creates a new instance of CommitServiceClient. 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 NewCommitServiceClient(t interface { - mock.TestingT - Cleanup(func()) -}) *CommitServiceClient { - mock := &CommitServiceClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/commitserver/commit/mocks/RepoClientFactory.go b/commitserver/commit/mocks/RepoClientFactory.go index c16d118c3e5b5..eb571c901889e 100644 --- a/commitserver/commit/mocks/RepoClientFactory.go +++ b/commitserver/commit/mocks/RepoClientFactory.go @@ -1,14 +1,29 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - git "github.com/argoproj/argo-cd/v3/util/git" + "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" + "github.com/argoproj/argo-cd/v3/util/git" mock "github.com/stretchr/testify/mock" - - v1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" ) +// NewRepoClientFactory creates a new instance of RepoClientFactory. 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 NewRepoClientFactory(t interface { + mock.TestingT + Cleanup(func()) +}) *RepoClientFactory { + mock := &RepoClientFactory{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // RepoClientFactory is an autogenerated mock type for the RepoClientFactory type type RepoClientFactory struct { mock.Mock @@ -22,9 +37,9 @@ func (_m *RepoClientFactory) EXPECT() *RepoClientFactory_Expecter { return &RepoClientFactory_Expecter{mock: &_m.Mock} } -// NewClient provides a mock function with given fields: repo, rootPath -func (_m *RepoClientFactory) NewClient(repo *v1alpha1.Repository, rootPath string) (git.Client, error) { - ret := _m.Called(repo, rootPath) +// NewClient provides a mock function for the type RepoClientFactory +func (_mock *RepoClientFactory) NewClient(repo *v1alpha1.Repository, rootPath string) (git.Client, error) { + ret := _mock.Called(repo, rootPath) if len(ret) == 0 { panic("no return value specified for NewClient") @@ -32,23 +47,21 @@ func (_m *RepoClientFactory) NewClient(repo *v1alpha1.Repository, rootPath strin var r0 git.Client var r1 error - if rf, ok := ret.Get(0).(func(*v1alpha1.Repository, string) (git.Client, error)); ok { - return rf(repo, rootPath) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Repository, string) (git.Client, error)); ok { + return returnFunc(repo, rootPath) } - if rf, ok := ret.Get(0).(func(*v1alpha1.Repository, string) git.Client); ok { - r0 = rf(repo, rootPath) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Repository, string) git.Client); ok { + r0 = returnFunc(repo, rootPath) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(git.Client) } } - - if rf, ok := ret.Get(1).(func(*v1alpha1.Repository, string) error); ok { - r1 = rf(repo, rootPath) + if returnFunc, ok := ret.Get(1).(func(*v1alpha1.Repository, string) error); ok { + r1 = returnFunc(repo, rootPath) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -58,8 +71,8 @@ type RepoClientFactory_NewClient_Call struct { } // NewClient is a helper method to define mock.On call -// - repo *v1alpha1.Repository -// - rootPath string +// - repo +// - rootPath func (_e *RepoClientFactory_Expecter) NewClient(repo interface{}, rootPath interface{}) *RepoClientFactory_NewClient_Call { return &RepoClientFactory_NewClient_Call{Call: _e.mock.On("NewClient", repo, rootPath)} } @@ -71,26 +84,12 @@ func (_c *RepoClientFactory_NewClient_Call) Run(run func(repo *v1alpha1.Reposito return _c } -func (_c *RepoClientFactory_NewClient_Call) Return(_a0 git.Client, _a1 error) *RepoClientFactory_NewClient_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoClientFactory_NewClient_Call) Return(client git.Client, err error) *RepoClientFactory_NewClient_Call { + _c.Call.Return(client, err) return _c } -func (_c *RepoClientFactory_NewClient_Call) RunAndReturn(run func(*v1alpha1.Repository, string) (git.Client, error)) *RepoClientFactory_NewClient_Call { +func (_c *RepoClientFactory_NewClient_Call) RunAndReturn(run func(repo *v1alpha1.Repository, rootPath string) (git.Client, error)) *RepoClientFactory_NewClient_Call { _c.Call.Return(run) return _c } - -// NewRepoClientFactory creates a new instance of RepoClientFactory. 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 NewRepoClientFactory(t interface { - mock.TestingT - Cleanup(func()) -}) *RepoClientFactory { - mock := &RepoClientFactory{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/controller/cache/mocks/LiveStateCache.go b/controller/cache/mocks/LiveStateCache.go index 99148679070ac..378338c17073a 100644 --- a/controller/cache/mocks/LiveStateCache.go +++ b/controller/cache/mocks/LiveStateCache.go @@ -1,24 +1,34 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - context "context" - - cache "github.com/argoproj/gitops-engine/pkg/cache" - - controllercache "github.com/argoproj/argo-cd/v3/controller/cache" - - kube "github.com/argoproj/gitops-engine/pkg/utils/kube" + "context" + cache0 "github.com/argoproj/argo-cd/v3/controller/cache" + "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" + "github.com/argoproj/gitops-engine/pkg/cache" + "github.com/argoproj/gitops-engine/pkg/utils/kube" mock "github.com/stretchr/testify/mock" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" +) - schema "k8s.io/apimachinery/pkg/runtime/schema" +// NewLiveStateCache creates a new instance of LiveStateCache. 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 NewLiveStateCache(t interface { + mock.TestingT + Cleanup(func()) +}) *LiveStateCache { + mock := &LiveStateCache{} + mock.Mock.Test(t) - unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + t.Cleanup(func() { mock.AssertExpectations(t) }) - v1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" -) + return mock +} // LiveStateCache is an autogenerated mock type for the LiveStateCache type type LiveStateCache struct { @@ -33,9 +43,9 @@ func (_m *LiveStateCache) EXPECT() *LiveStateCache_Expecter { return &LiveStateCache_Expecter{mock: &_m.Mock} } -// GetClusterCache provides a mock function with given fields: server -func (_m *LiveStateCache) GetClusterCache(server *v1alpha1.Cluster) (cache.ClusterCache, error) { - ret := _m.Called(server) +// GetClusterCache provides a mock function for the type LiveStateCache +func (_mock *LiveStateCache) GetClusterCache(server *v1alpha1.Cluster) (cache.ClusterCache, error) { + ret := _mock.Called(server) if len(ret) == 0 { panic("no return value specified for GetClusterCache") @@ -43,23 +53,21 @@ func (_m *LiveStateCache) GetClusterCache(server *v1alpha1.Cluster) (cache.Clust var r0 cache.ClusterCache var r1 error - if rf, ok := ret.Get(0).(func(*v1alpha1.Cluster) (cache.ClusterCache, error)); ok { - return rf(server) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Cluster) (cache.ClusterCache, error)); ok { + return returnFunc(server) } - if rf, ok := ret.Get(0).(func(*v1alpha1.Cluster) cache.ClusterCache); ok { - r0 = rf(server) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Cluster) cache.ClusterCache); ok { + r0 = returnFunc(server) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(cache.ClusterCache) } } - - if rf, ok := ret.Get(1).(func(*v1alpha1.Cluster) error); ok { - r1 = rf(server) + if returnFunc, ok := ret.Get(1).(func(*v1alpha1.Cluster) error); ok { + r1 = returnFunc(server) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -69,7 +77,7 @@ type LiveStateCache_GetClusterCache_Call struct { } // GetClusterCache is a helper method to define mock.On call -// - server *v1alpha1.Cluster +// - server func (_e *LiveStateCache_Expecter) GetClusterCache(server interface{}) *LiveStateCache_GetClusterCache_Call { return &LiveStateCache_GetClusterCache_Call{Call: _e.mock.On("GetClusterCache", server)} } @@ -81,33 +89,32 @@ func (_c *LiveStateCache_GetClusterCache_Call) Run(run func(server *v1alpha1.Clu return _c } -func (_c *LiveStateCache_GetClusterCache_Call) Return(_a0 cache.ClusterCache, _a1 error) *LiveStateCache_GetClusterCache_Call { - _c.Call.Return(_a0, _a1) +func (_c *LiveStateCache_GetClusterCache_Call) Return(clusterCache cache.ClusterCache, err error) *LiveStateCache_GetClusterCache_Call { + _c.Call.Return(clusterCache, err) return _c } -func (_c *LiveStateCache_GetClusterCache_Call) RunAndReturn(run func(*v1alpha1.Cluster) (cache.ClusterCache, error)) *LiveStateCache_GetClusterCache_Call { +func (_c *LiveStateCache_GetClusterCache_Call) RunAndReturn(run func(server *v1alpha1.Cluster) (cache.ClusterCache, error)) *LiveStateCache_GetClusterCache_Call { _c.Call.Return(run) return _c } -// GetClustersInfo provides a mock function with no fields -func (_m *LiveStateCache) GetClustersInfo() []cache.ClusterInfo { - ret := _m.Called() +// GetClustersInfo provides a mock function for the type LiveStateCache +func (_mock *LiveStateCache) GetClustersInfo() []cache.ClusterInfo { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetClustersInfo") } var r0 []cache.ClusterInfo - if rf, ok := ret.Get(0).(func() []cache.ClusterInfo); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []cache.ClusterInfo); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]cache.ClusterInfo) } } - return r0 } @@ -128,8 +135,8 @@ func (_c *LiveStateCache_GetClustersInfo_Call) Run(run func()) *LiveStateCache_G return _c } -func (_c *LiveStateCache_GetClustersInfo_Call) Return(_a0 []cache.ClusterInfo) *LiveStateCache_GetClustersInfo_Call { - _c.Call.Return(_a0) +func (_c *LiveStateCache_GetClustersInfo_Call) Return(clusterInfos []cache.ClusterInfo) *LiveStateCache_GetClustersInfo_Call { + _c.Call.Return(clusterInfos) return _c } @@ -138,9 +145,9 @@ func (_c *LiveStateCache_GetClustersInfo_Call) RunAndReturn(run func() []cache.C return _c } -// GetManagedLiveObjs provides a mock function with given fields: destCluster, a, targetObjs -func (_m *LiveStateCache) GetManagedLiveObjs(destCluster *v1alpha1.Cluster, a *v1alpha1.Application, targetObjs []*unstructured.Unstructured) (map[kube.ResourceKey]*unstructured.Unstructured, error) { - ret := _m.Called(destCluster, a, targetObjs) +// GetManagedLiveObjs provides a mock function for the type LiveStateCache +func (_mock *LiveStateCache) GetManagedLiveObjs(destCluster *v1alpha1.Cluster, a *v1alpha1.Application, targetObjs []*unstructured.Unstructured) (map[kube.ResourceKey]*unstructured.Unstructured, error) { + ret := _mock.Called(destCluster, a, targetObjs) if len(ret) == 0 { panic("no return value specified for GetManagedLiveObjs") @@ -148,23 +155,21 @@ func (_m *LiveStateCache) GetManagedLiveObjs(destCluster *v1alpha1.Cluster, a *v var r0 map[kube.ResourceKey]*unstructured.Unstructured var r1 error - if rf, ok := ret.Get(0).(func(*v1alpha1.Cluster, *v1alpha1.Application, []*unstructured.Unstructured) (map[kube.ResourceKey]*unstructured.Unstructured, error)); ok { - return rf(destCluster, a, targetObjs) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Cluster, *v1alpha1.Application, []*unstructured.Unstructured) (map[kube.ResourceKey]*unstructured.Unstructured, error)); ok { + return returnFunc(destCluster, a, targetObjs) } - if rf, ok := ret.Get(0).(func(*v1alpha1.Cluster, *v1alpha1.Application, []*unstructured.Unstructured) map[kube.ResourceKey]*unstructured.Unstructured); ok { - r0 = rf(destCluster, a, targetObjs) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Cluster, *v1alpha1.Application, []*unstructured.Unstructured) map[kube.ResourceKey]*unstructured.Unstructured); ok { + r0 = returnFunc(destCluster, a, targetObjs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[kube.ResourceKey]*unstructured.Unstructured) } } - - if rf, ok := ret.Get(1).(func(*v1alpha1.Cluster, *v1alpha1.Application, []*unstructured.Unstructured) error); ok { - r1 = rf(destCluster, a, targetObjs) + if returnFunc, ok := ret.Get(1).(func(*v1alpha1.Cluster, *v1alpha1.Application, []*unstructured.Unstructured) error); ok { + r1 = returnFunc(destCluster, a, targetObjs) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -174,9 +179,9 @@ type LiveStateCache_GetManagedLiveObjs_Call struct { } // GetManagedLiveObjs is a helper method to define mock.On call -// - destCluster *v1alpha1.Cluster -// - a *v1alpha1.Application -// - targetObjs []*unstructured.Unstructured +// - destCluster +// - a +// - targetObjs func (_e *LiveStateCache_Expecter) GetManagedLiveObjs(destCluster interface{}, a interface{}, targetObjs interface{}) *LiveStateCache_GetManagedLiveObjs_Call { return &LiveStateCache_GetManagedLiveObjs_Call{Call: _e.mock.On("GetManagedLiveObjs", destCluster, a, targetObjs)} } @@ -188,19 +193,19 @@ func (_c *LiveStateCache_GetManagedLiveObjs_Call) Run(run func(destCluster *v1al return _c } -func (_c *LiveStateCache_GetManagedLiveObjs_Call) Return(_a0 map[kube.ResourceKey]*unstructured.Unstructured, _a1 error) *LiveStateCache_GetManagedLiveObjs_Call { - _c.Call.Return(_a0, _a1) +func (_c *LiveStateCache_GetManagedLiveObjs_Call) Return(resourceKeyToUnstructured map[kube.ResourceKey]*unstructured.Unstructured, err error) *LiveStateCache_GetManagedLiveObjs_Call { + _c.Call.Return(resourceKeyToUnstructured, err) return _c } -func (_c *LiveStateCache_GetManagedLiveObjs_Call) RunAndReturn(run func(*v1alpha1.Cluster, *v1alpha1.Application, []*unstructured.Unstructured) (map[kube.ResourceKey]*unstructured.Unstructured, error)) *LiveStateCache_GetManagedLiveObjs_Call { +func (_c *LiveStateCache_GetManagedLiveObjs_Call) RunAndReturn(run func(destCluster *v1alpha1.Cluster, a *v1alpha1.Application, targetObjs []*unstructured.Unstructured) (map[kube.ResourceKey]*unstructured.Unstructured, error)) *LiveStateCache_GetManagedLiveObjs_Call { _c.Call.Return(run) return _c } -// GetNamespaceTopLevelResources provides a mock function with given fields: server, namespace -func (_m *LiveStateCache) GetNamespaceTopLevelResources(server *v1alpha1.Cluster, namespace string) (map[kube.ResourceKey]v1alpha1.ResourceNode, error) { - ret := _m.Called(server, namespace) +// GetNamespaceTopLevelResources provides a mock function for the type LiveStateCache +func (_mock *LiveStateCache) GetNamespaceTopLevelResources(server *v1alpha1.Cluster, namespace string) (map[kube.ResourceKey]v1alpha1.ResourceNode, error) { + ret := _mock.Called(server, namespace) if len(ret) == 0 { panic("no return value specified for GetNamespaceTopLevelResources") @@ -208,23 +213,21 @@ func (_m *LiveStateCache) GetNamespaceTopLevelResources(server *v1alpha1.Cluster var r0 map[kube.ResourceKey]v1alpha1.ResourceNode var r1 error - if rf, ok := ret.Get(0).(func(*v1alpha1.Cluster, string) (map[kube.ResourceKey]v1alpha1.ResourceNode, error)); ok { - return rf(server, namespace) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Cluster, string) (map[kube.ResourceKey]v1alpha1.ResourceNode, error)); ok { + return returnFunc(server, namespace) } - if rf, ok := ret.Get(0).(func(*v1alpha1.Cluster, string) map[kube.ResourceKey]v1alpha1.ResourceNode); ok { - r0 = rf(server, namespace) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Cluster, string) map[kube.ResourceKey]v1alpha1.ResourceNode); ok { + r0 = returnFunc(server, namespace) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[kube.ResourceKey]v1alpha1.ResourceNode) } } - - if rf, ok := ret.Get(1).(func(*v1alpha1.Cluster, string) error); ok { - r1 = rf(server, namespace) + if returnFunc, ok := ret.Get(1).(func(*v1alpha1.Cluster, string) error); ok { + r1 = returnFunc(server, namespace) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -234,8 +237,8 @@ type LiveStateCache_GetNamespaceTopLevelResources_Call struct { } // GetNamespaceTopLevelResources is a helper method to define mock.On call -// - server *v1alpha1.Cluster -// - namespace string +// - server +// - namespace func (_e *LiveStateCache_Expecter) GetNamespaceTopLevelResources(server interface{}, namespace interface{}) *LiveStateCache_GetNamespaceTopLevelResources_Call { return &LiveStateCache_GetNamespaceTopLevelResources_Call{Call: _e.mock.On("GetNamespaceTopLevelResources", server, namespace)} } @@ -247,19 +250,19 @@ func (_c *LiveStateCache_GetNamespaceTopLevelResources_Call) Run(run func(server return _c } -func (_c *LiveStateCache_GetNamespaceTopLevelResources_Call) Return(_a0 map[kube.ResourceKey]v1alpha1.ResourceNode, _a1 error) *LiveStateCache_GetNamespaceTopLevelResources_Call { - _c.Call.Return(_a0, _a1) +func (_c *LiveStateCache_GetNamespaceTopLevelResources_Call) Return(resourceKeyToResourceNode map[kube.ResourceKey]v1alpha1.ResourceNode, err error) *LiveStateCache_GetNamespaceTopLevelResources_Call { + _c.Call.Return(resourceKeyToResourceNode, err) return _c } -func (_c *LiveStateCache_GetNamespaceTopLevelResources_Call) RunAndReturn(run func(*v1alpha1.Cluster, string) (map[kube.ResourceKey]v1alpha1.ResourceNode, error)) *LiveStateCache_GetNamespaceTopLevelResources_Call { +func (_c *LiveStateCache_GetNamespaceTopLevelResources_Call) RunAndReturn(run func(server *v1alpha1.Cluster, namespace string) (map[kube.ResourceKey]v1alpha1.ResourceNode, error)) *LiveStateCache_GetNamespaceTopLevelResources_Call { _c.Call.Return(run) return _c } -// GetVersionsInfo provides a mock function with given fields: server -func (_m *LiveStateCache) GetVersionsInfo(server *v1alpha1.Cluster) (string, []kube.APIResourceInfo, error) { - ret := _m.Called(server) +// GetVersionsInfo provides a mock function for the type LiveStateCache +func (_mock *LiveStateCache) GetVersionsInfo(server *v1alpha1.Cluster) (string, []kube.APIResourceInfo, error) { + ret := _mock.Called(server) if len(ret) == 0 { panic("no return value specified for GetVersionsInfo") @@ -268,29 +271,26 @@ func (_m *LiveStateCache) GetVersionsInfo(server *v1alpha1.Cluster) (string, []k var r0 string var r1 []kube.APIResourceInfo var r2 error - if rf, ok := ret.Get(0).(func(*v1alpha1.Cluster) (string, []kube.APIResourceInfo, error)); ok { - return rf(server) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Cluster) (string, []kube.APIResourceInfo, error)); ok { + return returnFunc(server) } - if rf, ok := ret.Get(0).(func(*v1alpha1.Cluster) string); ok { - r0 = rf(server) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Cluster) string); ok { + r0 = returnFunc(server) } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func(*v1alpha1.Cluster) []kube.APIResourceInfo); ok { - r1 = rf(server) + if returnFunc, ok := ret.Get(1).(func(*v1alpha1.Cluster) []kube.APIResourceInfo); ok { + r1 = returnFunc(server) } else { if ret.Get(1) != nil { r1 = ret.Get(1).([]kube.APIResourceInfo) } } - - if rf, ok := ret.Get(2).(func(*v1alpha1.Cluster) error); ok { - r2 = rf(server) + if returnFunc, ok := ret.Get(2).(func(*v1alpha1.Cluster) error); ok { + r2 = returnFunc(server) } else { r2 = ret.Error(2) } - return r0, r1, r2 } @@ -300,7 +300,7 @@ type LiveStateCache_GetVersionsInfo_Call struct { } // GetVersionsInfo is a helper method to define mock.On call -// - server *v1alpha1.Cluster +// - server func (_e *LiveStateCache_Expecter) GetVersionsInfo(server interface{}) *LiveStateCache_GetVersionsInfo_Call { return &LiveStateCache_GetVersionsInfo_Call{Call: _e.mock.On("GetVersionsInfo", server)} } @@ -312,31 +312,30 @@ func (_c *LiveStateCache_GetVersionsInfo_Call) Run(run func(server *v1alpha1.Clu return _c } -func (_c *LiveStateCache_GetVersionsInfo_Call) Return(_a0 string, _a1 []kube.APIResourceInfo, _a2 error) *LiveStateCache_GetVersionsInfo_Call { - _c.Call.Return(_a0, _a1, _a2) +func (_c *LiveStateCache_GetVersionsInfo_Call) Return(s string, aPIResourceInfos []kube.APIResourceInfo, err error) *LiveStateCache_GetVersionsInfo_Call { + _c.Call.Return(s, aPIResourceInfos, err) return _c } -func (_c *LiveStateCache_GetVersionsInfo_Call) RunAndReturn(run func(*v1alpha1.Cluster) (string, []kube.APIResourceInfo, error)) *LiveStateCache_GetVersionsInfo_Call { +func (_c *LiveStateCache_GetVersionsInfo_Call) RunAndReturn(run func(server *v1alpha1.Cluster) (string, []kube.APIResourceInfo, error)) *LiveStateCache_GetVersionsInfo_Call { _c.Call.Return(run) return _c } -// Init provides a mock function with no fields -func (_m *LiveStateCache) Init() error { - ret := _m.Called() +// Init provides a mock function for the type LiveStateCache +func (_mock *LiveStateCache) Init() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Init") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -357,8 +356,8 @@ func (_c *LiveStateCache_Init_Call) Run(run func()) *LiveStateCache_Init_Call { return _c } -func (_c *LiveStateCache_Init_Call) Return(_a0 error) *LiveStateCache_Init_Call { - _c.Call.Return(_a0) +func (_c *LiveStateCache_Init_Call) Return(err error) *LiveStateCache_Init_Call { + _c.Call.Return(err) return _c } @@ -367,9 +366,9 @@ func (_c *LiveStateCache_Init_Call) RunAndReturn(run func() error) *LiveStateCac return _c } -// IsNamespaced provides a mock function with given fields: server, gk -func (_m *LiveStateCache) IsNamespaced(server *v1alpha1.Cluster, gk schema.GroupKind) (bool, error) { - ret := _m.Called(server, gk) +// IsNamespaced provides a mock function for the type LiveStateCache +func (_mock *LiveStateCache) IsNamespaced(server *v1alpha1.Cluster, gk schema.GroupKind) (bool, error) { + ret := _mock.Called(server, gk) if len(ret) == 0 { panic("no return value specified for IsNamespaced") @@ -377,21 +376,19 @@ func (_m *LiveStateCache) IsNamespaced(server *v1alpha1.Cluster, gk schema.Group var r0 bool var r1 error - if rf, ok := ret.Get(0).(func(*v1alpha1.Cluster, schema.GroupKind) (bool, error)); ok { - return rf(server, gk) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Cluster, schema.GroupKind) (bool, error)); ok { + return returnFunc(server, gk) } - if rf, ok := ret.Get(0).(func(*v1alpha1.Cluster, schema.GroupKind) bool); ok { - r0 = rf(server, gk) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Cluster, schema.GroupKind) bool); ok { + r0 = returnFunc(server, gk) } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func(*v1alpha1.Cluster, schema.GroupKind) error); ok { - r1 = rf(server, gk) + if returnFunc, ok := ret.Get(1).(func(*v1alpha1.Cluster, schema.GroupKind) error); ok { + r1 = returnFunc(server, gk) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -401,8 +398,8 @@ type LiveStateCache_IsNamespaced_Call struct { } // IsNamespaced is a helper method to define mock.On call -// - server *v1alpha1.Cluster -// - gk schema.GroupKind +// - server +// - gk func (_e *LiveStateCache_Expecter) IsNamespaced(server interface{}, gk interface{}) *LiveStateCache_IsNamespaced_Call { return &LiveStateCache_IsNamespaced_Call{Call: _e.mock.On("IsNamespaced", server, gk)} } @@ -414,31 +411,30 @@ func (_c *LiveStateCache_IsNamespaced_Call) Run(run func(server *v1alpha1.Cluste return _c } -func (_c *LiveStateCache_IsNamespaced_Call) Return(_a0 bool, _a1 error) *LiveStateCache_IsNamespaced_Call { - _c.Call.Return(_a0, _a1) +func (_c *LiveStateCache_IsNamespaced_Call) Return(b bool, err error) *LiveStateCache_IsNamespaced_Call { + _c.Call.Return(b, err) return _c } -func (_c *LiveStateCache_IsNamespaced_Call) RunAndReturn(run func(*v1alpha1.Cluster, schema.GroupKind) (bool, error)) *LiveStateCache_IsNamespaced_Call { +func (_c *LiveStateCache_IsNamespaced_Call) RunAndReturn(run func(server *v1alpha1.Cluster, gk schema.GroupKind) (bool, error)) *LiveStateCache_IsNamespaced_Call { _c.Call.Return(run) return _c } -// IterateHierarchy provides a mock function with given fields: server, key, action -func (_m *LiveStateCache) IterateHierarchy(server *v1alpha1.Cluster, key kube.ResourceKey, action func(v1alpha1.ResourceNode, string) bool) error { - ret := _m.Called(server, key, action) +// IterateHierarchy provides a mock function for the type LiveStateCache +func (_mock *LiveStateCache) IterateHierarchy(server *v1alpha1.Cluster, key kube.ResourceKey, action func(child v1alpha1.ResourceNode, appName string) bool) error { + ret := _mock.Called(server, key, action) if len(ret) == 0 { panic("no return value specified for IterateHierarchy") } var r0 error - if rf, ok := ret.Get(0).(func(*v1alpha1.Cluster, kube.ResourceKey, func(v1alpha1.ResourceNode, string) bool) error); ok { - r0 = rf(server, key, action) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Cluster, kube.ResourceKey, func(child v1alpha1.ResourceNode, appName string) bool) error); ok { + r0 = returnFunc(server, key, action) } else { r0 = ret.Error(0) } - return r0 } @@ -448,45 +444,44 @@ type LiveStateCache_IterateHierarchy_Call struct { } // IterateHierarchy is a helper method to define mock.On call -// - server *v1alpha1.Cluster -// - key kube.ResourceKey -// - action func(v1alpha1.ResourceNode , string) bool +// - server +// - key +// - action func (_e *LiveStateCache_Expecter) IterateHierarchy(server interface{}, key interface{}, action interface{}) *LiveStateCache_IterateHierarchy_Call { return &LiveStateCache_IterateHierarchy_Call{Call: _e.mock.On("IterateHierarchy", server, key, action)} } -func (_c *LiveStateCache_IterateHierarchy_Call) Run(run func(server *v1alpha1.Cluster, key kube.ResourceKey, action func(v1alpha1.ResourceNode, string) bool)) *LiveStateCache_IterateHierarchy_Call { +func (_c *LiveStateCache_IterateHierarchy_Call) Run(run func(server *v1alpha1.Cluster, key kube.ResourceKey, action func(child v1alpha1.ResourceNode, appName string) bool)) *LiveStateCache_IterateHierarchy_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1alpha1.Cluster), args[1].(kube.ResourceKey), args[2].(func(v1alpha1.ResourceNode, string) bool)) + run(args[0].(*v1alpha1.Cluster), args[1].(kube.ResourceKey), args[2].(func(child v1alpha1.ResourceNode, appName string) bool)) }) return _c } -func (_c *LiveStateCache_IterateHierarchy_Call) Return(_a0 error) *LiveStateCache_IterateHierarchy_Call { - _c.Call.Return(_a0) +func (_c *LiveStateCache_IterateHierarchy_Call) Return(err error) *LiveStateCache_IterateHierarchy_Call { + _c.Call.Return(err) return _c } -func (_c *LiveStateCache_IterateHierarchy_Call) RunAndReturn(run func(*v1alpha1.Cluster, kube.ResourceKey, func(v1alpha1.ResourceNode, string) bool) error) *LiveStateCache_IterateHierarchy_Call { +func (_c *LiveStateCache_IterateHierarchy_Call) RunAndReturn(run func(server *v1alpha1.Cluster, key kube.ResourceKey, action func(child v1alpha1.ResourceNode, appName string) bool) error) *LiveStateCache_IterateHierarchy_Call { _c.Call.Return(run) return _c } -// IterateHierarchyV2 provides a mock function with given fields: server, keys, action -func (_m *LiveStateCache) IterateHierarchyV2(server *v1alpha1.Cluster, keys []kube.ResourceKey, action func(v1alpha1.ResourceNode, string) bool) error { - ret := _m.Called(server, keys, action) +// IterateHierarchyV2 provides a mock function for the type LiveStateCache +func (_mock *LiveStateCache) IterateHierarchyV2(server *v1alpha1.Cluster, keys []kube.ResourceKey, action func(child v1alpha1.ResourceNode, appName string) bool) error { + ret := _mock.Called(server, keys, action) if len(ret) == 0 { panic("no return value specified for IterateHierarchyV2") } var r0 error - if rf, ok := ret.Get(0).(func(*v1alpha1.Cluster, []kube.ResourceKey, func(v1alpha1.ResourceNode, string) bool) error); ok { - r0 = rf(server, keys, action) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Cluster, []kube.ResourceKey, func(child v1alpha1.ResourceNode, appName string) bool) error); ok { + r0 = returnFunc(server, keys, action) } else { r0 = ret.Error(0) } - return r0 } @@ -496,45 +491,44 @@ type LiveStateCache_IterateHierarchyV2_Call struct { } // IterateHierarchyV2 is a helper method to define mock.On call -// - server *v1alpha1.Cluster -// - keys []kube.ResourceKey -// - action func(v1alpha1.ResourceNode , string) bool +// - server +// - keys +// - action func (_e *LiveStateCache_Expecter) IterateHierarchyV2(server interface{}, keys interface{}, action interface{}) *LiveStateCache_IterateHierarchyV2_Call { return &LiveStateCache_IterateHierarchyV2_Call{Call: _e.mock.On("IterateHierarchyV2", server, keys, action)} } -func (_c *LiveStateCache_IterateHierarchyV2_Call) Run(run func(server *v1alpha1.Cluster, keys []kube.ResourceKey, action func(v1alpha1.ResourceNode, string) bool)) *LiveStateCache_IterateHierarchyV2_Call { +func (_c *LiveStateCache_IterateHierarchyV2_Call) Run(run func(server *v1alpha1.Cluster, keys []kube.ResourceKey, action func(child v1alpha1.ResourceNode, appName string) bool)) *LiveStateCache_IterateHierarchyV2_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1alpha1.Cluster), args[1].([]kube.ResourceKey), args[2].(func(v1alpha1.ResourceNode, string) bool)) + run(args[0].(*v1alpha1.Cluster), args[1].([]kube.ResourceKey), args[2].(func(child v1alpha1.ResourceNode, appName string) bool)) }) return _c } -func (_c *LiveStateCache_IterateHierarchyV2_Call) Return(_a0 error) *LiveStateCache_IterateHierarchyV2_Call { - _c.Call.Return(_a0) +func (_c *LiveStateCache_IterateHierarchyV2_Call) Return(err error) *LiveStateCache_IterateHierarchyV2_Call { + _c.Call.Return(err) return _c } -func (_c *LiveStateCache_IterateHierarchyV2_Call) RunAndReturn(run func(*v1alpha1.Cluster, []kube.ResourceKey, func(v1alpha1.ResourceNode, string) bool) error) *LiveStateCache_IterateHierarchyV2_Call { +func (_c *LiveStateCache_IterateHierarchyV2_Call) RunAndReturn(run func(server *v1alpha1.Cluster, keys []kube.ResourceKey, action func(child v1alpha1.ResourceNode, appName string) bool) error) *LiveStateCache_IterateHierarchyV2_Call { _c.Call.Return(run) return _c } -// IterateResources provides a mock function with given fields: server, callback -func (_m *LiveStateCache) IterateResources(server *v1alpha1.Cluster, callback func(*cache.Resource, *controllercache.ResourceInfo)) error { - ret := _m.Called(server, callback) +// IterateResources provides a mock function for the type LiveStateCache +func (_mock *LiveStateCache) IterateResources(server *v1alpha1.Cluster, callback func(res *cache.Resource, info *cache0.ResourceInfo)) error { + ret := _mock.Called(server, callback) if len(ret) == 0 { panic("no return value specified for IterateResources") } var r0 error - if rf, ok := ret.Get(0).(func(*v1alpha1.Cluster, func(*cache.Resource, *controllercache.ResourceInfo)) error); ok { - r0 = rf(server, callback) + if returnFunc, ok := ret.Get(0).(func(*v1alpha1.Cluster, func(res *cache.Resource, info *cache0.ResourceInfo)) error); ok { + r0 = returnFunc(server, callback) } else { r0 = ret.Error(0) } - return r0 } @@ -544,44 +538,43 @@ type LiveStateCache_IterateResources_Call struct { } // IterateResources is a helper method to define mock.On call -// - server *v1alpha1.Cluster -// - callback func(*cache.Resource , *controllercache.ResourceInfo) +// - server +// - callback func (_e *LiveStateCache_Expecter) IterateResources(server interface{}, callback interface{}) *LiveStateCache_IterateResources_Call { return &LiveStateCache_IterateResources_Call{Call: _e.mock.On("IterateResources", server, callback)} } -func (_c *LiveStateCache_IterateResources_Call) Run(run func(server *v1alpha1.Cluster, callback func(*cache.Resource, *controllercache.ResourceInfo))) *LiveStateCache_IterateResources_Call { +func (_c *LiveStateCache_IterateResources_Call) Run(run func(server *v1alpha1.Cluster, callback func(res *cache.Resource, info *cache0.ResourceInfo))) *LiveStateCache_IterateResources_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*v1alpha1.Cluster), args[1].(func(*cache.Resource, *controllercache.ResourceInfo))) + run(args[0].(*v1alpha1.Cluster), args[1].(func(res *cache.Resource, info *cache0.ResourceInfo))) }) return _c } -func (_c *LiveStateCache_IterateResources_Call) Return(_a0 error) *LiveStateCache_IterateResources_Call { - _c.Call.Return(_a0) +func (_c *LiveStateCache_IterateResources_Call) Return(err error) *LiveStateCache_IterateResources_Call { + _c.Call.Return(err) return _c } -func (_c *LiveStateCache_IterateResources_Call) RunAndReturn(run func(*v1alpha1.Cluster, func(*cache.Resource, *controllercache.ResourceInfo)) error) *LiveStateCache_IterateResources_Call { +func (_c *LiveStateCache_IterateResources_Call) RunAndReturn(run func(server *v1alpha1.Cluster, callback func(res *cache.Resource, info *cache0.ResourceInfo)) error) *LiveStateCache_IterateResources_Call { _c.Call.Return(run) return _c } -// Run provides a mock function with given fields: ctx -func (_m *LiveStateCache) Run(ctx context.Context) error { - ret := _m.Called(ctx) +// Run provides a mock function for the type LiveStateCache +func (_mock *LiveStateCache) Run(ctx context.Context) error { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for Run") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = returnFunc(ctx) } else { r0 = ret.Error(0) } - return r0 } @@ -591,7 +584,7 @@ type LiveStateCache_Run_Call struct { } // Run is a helper method to define mock.On call -// - ctx context.Context +// - ctx func (_e *LiveStateCache_Expecter) Run(ctx interface{}) *LiveStateCache_Run_Call { return &LiveStateCache_Run_Call{Call: _e.mock.On("Run", ctx)} } @@ -603,31 +596,30 @@ func (_c *LiveStateCache_Run_Call) Run(run func(ctx context.Context)) *LiveState return _c } -func (_c *LiveStateCache_Run_Call) Return(_a0 error) *LiveStateCache_Run_Call { - _c.Call.Return(_a0) +func (_c *LiveStateCache_Run_Call) Return(err error) *LiveStateCache_Run_Call { + _c.Call.Return(err) return _c } -func (_c *LiveStateCache_Run_Call) RunAndReturn(run func(context.Context) error) *LiveStateCache_Run_Call { +func (_c *LiveStateCache_Run_Call) RunAndReturn(run func(ctx context.Context) error) *LiveStateCache_Run_Call { _c.Call.Return(run) return _c } -// UpdateShard provides a mock function with given fields: shard -func (_m *LiveStateCache) UpdateShard(shard int) bool { - ret := _m.Called(shard) +// UpdateShard provides a mock function for the type LiveStateCache +func (_mock *LiveStateCache) UpdateShard(shard int) bool { + ret := _mock.Called(shard) if len(ret) == 0 { panic("no return value specified for UpdateShard") } var r0 bool - if rf, ok := ret.Get(0).(func(int) bool); ok { - r0 = rf(shard) + if returnFunc, ok := ret.Get(0).(func(int) bool); ok { + r0 = returnFunc(shard) } else { r0 = ret.Get(0).(bool) } - return r0 } @@ -637,7 +629,7 @@ type LiveStateCache_UpdateShard_Call struct { } // UpdateShard is a helper method to define mock.On call -// - shard int +// - shard func (_e *LiveStateCache_Expecter) UpdateShard(shard interface{}) *LiveStateCache_UpdateShard_Call { return &LiveStateCache_UpdateShard_Call{Call: _e.mock.On("UpdateShard", shard)} } @@ -649,26 +641,12 @@ func (_c *LiveStateCache_UpdateShard_Call) Run(run func(shard int)) *LiveStateCa return _c } -func (_c *LiveStateCache_UpdateShard_Call) Return(_a0 bool) *LiveStateCache_UpdateShard_Call { - _c.Call.Return(_a0) +func (_c *LiveStateCache_UpdateShard_Call) Return(b bool) *LiveStateCache_UpdateShard_Call { + _c.Call.Return(b) return _c } -func (_c *LiveStateCache_UpdateShard_Call) RunAndReturn(run func(int) bool) *LiveStateCache_UpdateShard_Call { +func (_c *LiveStateCache_UpdateShard_Call) RunAndReturn(run func(shard int) bool) *LiveStateCache_UpdateShard_Call { _c.Call.Return(run) return _c } - -// NewLiveStateCache creates a new instance of LiveStateCache. 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 NewLiveStateCache(t interface { - mock.TestingT - Cleanup(func()) -}) *LiveStateCache { - mock := &LiveStateCache{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/hack/generate-mock.sh b/hack/generate-mock.sh index 0371b156ac139..f05061141e445 100755 --- a/hack/generate-mock.sh +++ b/hack/generate-mock.sh @@ -13,6 +13,6 @@ PROJECT_ROOT=$( PATH="${PROJECT_ROOT}/dist:${PATH}" # output tool versions -mockery --version +mockery version mockery --config ${PROJECT_ROOT}/.mockery.yaml \ No newline at end of file diff --git a/hack/installers/install-codegen-go-tools.sh b/hack/installers/install-codegen-go-tools.sh index 5ad5e8632863c..02d09484303d9 100755 --- a/hack/installers/install-codegen-go-tools.sh +++ b/hack/installers/install-codegen-go-tools.sh @@ -54,4 +54,4 @@ go install github.com/go-swagger/go-swagger/cmd/swagger@v0.28.0 go install golang.org/x/tools/cmd/goimports@v0.1.8 # mockery is used to generate mock -go install github.com/vektra/mockery/v2@v2.52.4 \ No newline at end of file +go install github.com/vektra/mockery/v3@v3.2.5 \ No newline at end of file diff --git a/pkg/apiclient/cluster/mocks/ClusterServiceServer.go b/pkg/apiclient/cluster/mocks/ClusterServiceServer.go index a08623bcb40c7..87971e7dc5653 100644 --- a/pkg/apiclient/cluster/mocks/ClusterServiceServer.go +++ b/pkg/apiclient/cluster/mocks/ClusterServiceServer.go @@ -1,17 +1,31 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - context "context" - - cluster "github.com/argoproj/argo-cd/v3/pkg/apiclient/cluster" + "context" + "github.com/argoproj/argo-cd/v3/pkg/apiclient/cluster" + "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" mock "github.com/stretchr/testify/mock" - - v1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" ) +// NewClusterServiceServer creates a new instance of ClusterServiceServer. 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 NewClusterServiceServer(t interface { + mock.TestingT + Cleanup(func()) +}) *ClusterServiceServer { + mock := &ClusterServiceServer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // ClusterServiceServer is an autogenerated mock type for the ClusterServiceServer type type ClusterServiceServer struct { mock.Mock @@ -25,9 +39,9 @@ func (_m *ClusterServiceServer) EXPECT() *ClusterServiceServer_Expecter { return &ClusterServiceServer_Expecter{mock: &_m.Mock} } -// Create provides a mock function with given fields: _a0, _a1 -func (_m *ClusterServiceServer) Create(_a0 context.Context, _a1 *cluster.ClusterCreateRequest) (*v1alpha1.Cluster, error) { - ret := _m.Called(_a0, _a1) +// Create provides a mock function for the type ClusterServiceServer +func (_mock *ClusterServiceServer) Create(context1 context.Context, clusterCreateRequest *cluster.ClusterCreateRequest) (*v1alpha1.Cluster, error) { + ret := _mock.Called(context1, clusterCreateRequest) if len(ret) == 0 { panic("no return value specified for Create") @@ -35,23 +49,21 @@ func (_m *ClusterServiceServer) Create(_a0 context.Context, _a1 *cluster.Cluster var r0 *v1alpha1.Cluster var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *cluster.ClusterCreateRequest) (*v1alpha1.Cluster, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *cluster.ClusterCreateRequest) (*v1alpha1.Cluster, error)); ok { + return returnFunc(context1, clusterCreateRequest) } - if rf, ok := ret.Get(0).(func(context.Context, *cluster.ClusterCreateRequest) *v1alpha1.Cluster); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *cluster.ClusterCreateRequest) *v1alpha1.Cluster); ok { + r0 = returnFunc(context1, clusterCreateRequest) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.Cluster) } } - - if rf, ok := ret.Get(1).(func(context.Context, *cluster.ClusterCreateRequest) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, *cluster.ClusterCreateRequest) error); ok { + r1 = returnFunc(context1, clusterCreateRequest) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -61,32 +73,32 @@ type ClusterServiceServer_Create_Call struct { } // Create is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *cluster.ClusterCreateRequest -func (_e *ClusterServiceServer_Expecter) Create(_a0 interface{}, _a1 interface{}) *ClusterServiceServer_Create_Call { - return &ClusterServiceServer_Create_Call{Call: _e.mock.On("Create", _a0, _a1)} +// - context1 +// - clusterCreateRequest +func (_e *ClusterServiceServer_Expecter) Create(context1 interface{}, clusterCreateRequest interface{}) *ClusterServiceServer_Create_Call { + return &ClusterServiceServer_Create_Call{Call: _e.mock.On("Create", context1, clusterCreateRequest)} } -func (_c *ClusterServiceServer_Create_Call) Run(run func(_a0 context.Context, _a1 *cluster.ClusterCreateRequest)) *ClusterServiceServer_Create_Call { +func (_c *ClusterServiceServer_Create_Call) Run(run func(context1 context.Context, clusterCreateRequest *cluster.ClusterCreateRequest)) *ClusterServiceServer_Create_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*cluster.ClusterCreateRequest)) }) return _c } -func (_c *ClusterServiceServer_Create_Call) Return(_a0 *v1alpha1.Cluster, _a1 error) *ClusterServiceServer_Create_Call { - _c.Call.Return(_a0, _a1) +func (_c *ClusterServiceServer_Create_Call) Return(cluster1 *v1alpha1.Cluster, err error) *ClusterServiceServer_Create_Call { + _c.Call.Return(cluster1, err) return _c } -func (_c *ClusterServiceServer_Create_Call) RunAndReturn(run func(context.Context, *cluster.ClusterCreateRequest) (*v1alpha1.Cluster, error)) *ClusterServiceServer_Create_Call { +func (_c *ClusterServiceServer_Create_Call) RunAndReturn(run func(context1 context.Context, clusterCreateRequest *cluster.ClusterCreateRequest) (*v1alpha1.Cluster, error)) *ClusterServiceServer_Create_Call { _c.Call.Return(run) return _c } -// Delete provides a mock function with given fields: _a0, _a1 -func (_m *ClusterServiceServer) Delete(_a0 context.Context, _a1 *cluster.ClusterQuery) (*cluster.ClusterResponse, error) { - ret := _m.Called(_a0, _a1) +// Delete provides a mock function for the type ClusterServiceServer +func (_mock *ClusterServiceServer) Delete(context1 context.Context, clusterQuery *cluster.ClusterQuery) (*cluster.ClusterResponse, error) { + ret := _mock.Called(context1, clusterQuery) if len(ret) == 0 { panic("no return value specified for Delete") @@ -94,23 +106,21 @@ func (_m *ClusterServiceServer) Delete(_a0 context.Context, _a1 *cluster.Cluster var r0 *cluster.ClusterResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) (*cluster.ClusterResponse, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) (*cluster.ClusterResponse, error)); ok { + return returnFunc(context1, clusterQuery) } - if rf, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) *cluster.ClusterResponse); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) *cluster.ClusterResponse); ok { + r0 = returnFunc(context1, clusterQuery) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*cluster.ClusterResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *cluster.ClusterQuery) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, *cluster.ClusterQuery) error); ok { + r1 = returnFunc(context1, clusterQuery) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -120,32 +130,32 @@ type ClusterServiceServer_Delete_Call struct { } // Delete is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *cluster.ClusterQuery -func (_e *ClusterServiceServer_Expecter) Delete(_a0 interface{}, _a1 interface{}) *ClusterServiceServer_Delete_Call { - return &ClusterServiceServer_Delete_Call{Call: _e.mock.On("Delete", _a0, _a1)} +// - context1 +// - clusterQuery +func (_e *ClusterServiceServer_Expecter) Delete(context1 interface{}, clusterQuery interface{}) *ClusterServiceServer_Delete_Call { + return &ClusterServiceServer_Delete_Call{Call: _e.mock.On("Delete", context1, clusterQuery)} } -func (_c *ClusterServiceServer_Delete_Call) Run(run func(_a0 context.Context, _a1 *cluster.ClusterQuery)) *ClusterServiceServer_Delete_Call { +func (_c *ClusterServiceServer_Delete_Call) Run(run func(context1 context.Context, clusterQuery *cluster.ClusterQuery)) *ClusterServiceServer_Delete_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*cluster.ClusterQuery)) }) return _c } -func (_c *ClusterServiceServer_Delete_Call) Return(_a0 *cluster.ClusterResponse, _a1 error) *ClusterServiceServer_Delete_Call { - _c.Call.Return(_a0, _a1) +func (_c *ClusterServiceServer_Delete_Call) Return(clusterResponse *cluster.ClusterResponse, err error) *ClusterServiceServer_Delete_Call { + _c.Call.Return(clusterResponse, err) return _c } -func (_c *ClusterServiceServer_Delete_Call) RunAndReturn(run func(context.Context, *cluster.ClusterQuery) (*cluster.ClusterResponse, error)) *ClusterServiceServer_Delete_Call { +func (_c *ClusterServiceServer_Delete_Call) RunAndReturn(run func(context1 context.Context, clusterQuery *cluster.ClusterQuery) (*cluster.ClusterResponse, error)) *ClusterServiceServer_Delete_Call { _c.Call.Return(run) return _c } -// Get provides a mock function with given fields: _a0, _a1 -func (_m *ClusterServiceServer) Get(_a0 context.Context, _a1 *cluster.ClusterQuery) (*v1alpha1.Cluster, error) { - ret := _m.Called(_a0, _a1) +// Get provides a mock function for the type ClusterServiceServer +func (_mock *ClusterServiceServer) Get(context1 context.Context, clusterQuery *cluster.ClusterQuery) (*v1alpha1.Cluster, error) { + ret := _mock.Called(context1, clusterQuery) if len(ret) == 0 { panic("no return value specified for Get") @@ -153,23 +163,21 @@ func (_m *ClusterServiceServer) Get(_a0 context.Context, _a1 *cluster.ClusterQue var r0 *v1alpha1.Cluster var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) (*v1alpha1.Cluster, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) (*v1alpha1.Cluster, error)); ok { + return returnFunc(context1, clusterQuery) } - if rf, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) *v1alpha1.Cluster); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) *v1alpha1.Cluster); ok { + r0 = returnFunc(context1, clusterQuery) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.Cluster) } } - - if rf, ok := ret.Get(1).(func(context.Context, *cluster.ClusterQuery) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, *cluster.ClusterQuery) error); ok { + r1 = returnFunc(context1, clusterQuery) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -179,32 +187,32 @@ type ClusterServiceServer_Get_Call struct { } // Get is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *cluster.ClusterQuery -func (_e *ClusterServiceServer_Expecter) Get(_a0 interface{}, _a1 interface{}) *ClusterServiceServer_Get_Call { - return &ClusterServiceServer_Get_Call{Call: _e.mock.On("Get", _a0, _a1)} +// - context1 +// - clusterQuery +func (_e *ClusterServiceServer_Expecter) Get(context1 interface{}, clusterQuery interface{}) *ClusterServiceServer_Get_Call { + return &ClusterServiceServer_Get_Call{Call: _e.mock.On("Get", context1, clusterQuery)} } -func (_c *ClusterServiceServer_Get_Call) Run(run func(_a0 context.Context, _a1 *cluster.ClusterQuery)) *ClusterServiceServer_Get_Call { +func (_c *ClusterServiceServer_Get_Call) Run(run func(context1 context.Context, clusterQuery *cluster.ClusterQuery)) *ClusterServiceServer_Get_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*cluster.ClusterQuery)) }) return _c } -func (_c *ClusterServiceServer_Get_Call) Return(_a0 *v1alpha1.Cluster, _a1 error) *ClusterServiceServer_Get_Call { - _c.Call.Return(_a0, _a1) +func (_c *ClusterServiceServer_Get_Call) Return(cluster1 *v1alpha1.Cluster, err error) *ClusterServiceServer_Get_Call { + _c.Call.Return(cluster1, err) return _c } -func (_c *ClusterServiceServer_Get_Call) RunAndReturn(run func(context.Context, *cluster.ClusterQuery) (*v1alpha1.Cluster, error)) *ClusterServiceServer_Get_Call { +func (_c *ClusterServiceServer_Get_Call) RunAndReturn(run func(context1 context.Context, clusterQuery *cluster.ClusterQuery) (*v1alpha1.Cluster, error)) *ClusterServiceServer_Get_Call { _c.Call.Return(run) return _c } -// InvalidateCache provides a mock function with given fields: _a0, _a1 -func (_m *ClusterServiceServer) InvalidateCache(_a0 context.Context, _a1 *cluster.ClusterQuery) (*v1alpha1.Cluster, error) { - ret := _m.Called(_a0, _a1) +// InvalidateCache provides a mock function for the type ClusterServiceServer +func (_mock *ClusterServiceServer) InvalidateCache(context1 context.Context, clusterQuery *cluster.ClusterQuery) (*v1alpha1.Cluster, error) { + ret := _mock.Called(context1, clusterQuery) if len(ret) == 0 { panic("no return value specified for InvalidateCache") @@ -212,23 +220,21 @@ func (_m *ClusterServiceServer) InvalidateCache(_a0 context.Context, _a1 *cluste var r0 *v1alpha1.Cluster var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) (*v1alpha1.Cluster, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) (*v1alpha1.Cluster, error)); ok { + return returnFunc(context1, clusterQuery) } - if rf, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) *v1alpha1.Cluster); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) *v1alpha1.Cluster); ok { + r0 = returnFunc(context1, clusterQuery) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.Cluster) } } - - if rf, ok := ret.Get(1).(func(context.Context, *cluster.ClusterQuery) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, *cluster.ClusterQuery) error); ok { + r1 = returnFunc(context1, clusterQuery) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -238,32 +244,32 @@ type ClusterServiceServer_InvalidateCache_Call struct { } // InvalidateCache is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *cluster.ClusterQuery -func (_e *ClusterServiceServer_Expecter) InvalidateCache(_a0 interface{}, _a1 interface{}) *ClusterServiceServer_InvalidateCache_Call { - return &ClusterServiceServer_InvalidateCache_Call{Call: _e.mock.On("InvalidateCache", _a0, _a1)} +// - context1 +// - clusterQuery +func (_e *ClusterServiceServer_Expecter) InvalidateCache(context1 interface{}, clusterQuery interface{}) *ClusterServiceServer_InvalidateCache_Call { + return &ClusterServiceServer_InvalidateCache_Call{Call: _e.mock.On("InvalidateCache", context1, clusterQuery)} } -func (_c *ClusterServiceServer_InvalidateCache_Call) Run(run func(_a0 context.Context, _a1 *cluster.ClusterQuery)) *ClusterServiceServer_InvalidateCache_Call { +func (_c *ClusterServiceServer_InvalidateCache_Call) Run(run func(context1 context.Context, clusterQuery *cluster.ClusterQuery)) *ClusterServiceServer_InvalidateCache_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*cluster.ClusterQuery)) }) return _c } -func (_c *ClusterServiceServer_InvalidateCache_Call) Return(_a0 *v1alpha1.Cluster, _a1 error) *ClusterServiceServer_InvalidateCache_Call { - _c.Call.Return(_a0, _a1) +func (_c *ClusterServiceServer_InvalidateCache_Call) Return(cluster1 *v1alpha1.Cluster, err error) *ClusterServiceServer_InvalidateCache_Call { + _c.Call.Return(cluster1, err) return _c } -func (_c *ClusterServiceServer_InvalidateCache_Call) RunAndReturn(run func(context.Context, *cluster.ClusterQuery) (*v1alpha1.Cluster, error)) *ClusterServiceServer_InvalidateCache_Call { +func (_c *ClusterServiceServer_InvalidateCache_Call) RunAndReturn(run func(context1 context.Context, clusterQuery *cluster.ClusterQuery) (*v1alpha1.Cluster, error)) *ClusterServiceServer_InvalidateCache_Call { _c.Call.Return(run) return _c } -// List provides a mock function with given fields: _a0, _a1 -func (_m *ClusterServiceServer) List(_a0 context.Context, _a1 *cluster.ClusterQuery) (*v1alpha1.ClusterList, error) { - ret := _m.Called(_a0, _a1) +// List provides a mock function for the type ClusterServiceServer +func (_mock *ClusterServiceServer) List(context1 context.Context, clusterQuery *cluster.ClusterQuery) (*v1alpha1.ClusterList, error) { + ret := _mock.Called(context1, clusterQuery) if len(ret) == 0 { panic("no return value specified for List") @@ -271,23 +277,21 @@ func (_m *ClusterServiceServer) List(_a0 context.Context, _a1 *cluster.ClusterQu var r0 *v1alpha1.ClusterList var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) (*v1alpha1.ClusterList, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) (*v1alpha1.ClusterList, error)); ok { + return returnFunc(context1, clusterQuery) } - if rf, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) *v1alpha1.ClusterList); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) *v1alpha1.ClusterList); ok { + r0 = returnFunc(context1, clusterQuery) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.ClusterList) } } - - if rf, ok := ret.Get(1).(func(context.Context, *cluster.ClusterQuery) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, *cluster.ClusterQuery) error); ok { + r1 = returnFunc(context1, clusterQuery) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -297,32 +301,32 @@ type ClusterServiceServer_List_Call struct { } // List is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *cluster.ClusterQuery -func (_e *ClusterServiceServer_Expecter) List(_a0 interface{}, _a1 interface{}) *ClusterServiceServer_List_Call { - return &ClusterServiceServer_List_Call{Call: _e.mock.On("List", _a0, _a1)} +// - context1 +// - clusterQuery +func (_e *ClusterServiceServer_Expecter) List(context1 interface{}, clusterQuery interface{}) *ClusterServiceServer_List_Call { + return &ClusterServiceServer_List_Call{Call: _e.mock.On("List", context1, clusterQuery)} } -func (_c *ClusterServiceServer_List_Call) Run(run func(_a0 context.Context, _a1 *cluster.ClusterQuery)) *ClusterServiceServer_List_Call { +func (_c *ClusterServiceServer_List_Call) Run(run func(context1 context.Context, clusterQuery *cluster.ClusterQuery)) *ClusterServiceServer_List_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*cluster.ClusterQuery)) }) return _c } -func (_c *ClusterServiceServer_List_Call) Return(_a0 *v1alpha1.ClusterList, _a1 error) *ClusterServiceServer_List_Call { - _c.Call.Return(_a0, _a1) +func (_c *ClusterServiceServer_List_Call) Return(clusterList *v1alpha1.ClusterList, err error) *ClusterServiceServer_List_Call { + _c.Call.Return(clusterList, err) return _c } -func (_c *ClusterServiceServer_List_Call) RunAndReturn(run func(context.Context, *cluster.ClusterQuery) (*v1alpha1.ClusterList, error)) *ClusterServiceServer_List_Call { +func (_c *ClusterServiceServer_List_Call) RunAndReturn(run func(context1 context.Context, clusterQuery *cluster.ClusterQuery) (*v1alpha1.ClusterList, error)) *ClusterServiceServer_List_Call { _c.Call.Return(run) return _c } -// RotateAuth provides a mock function with given fields: _a0, _a1 -func (_m *ClusterServiceServer) RotateAuth(_a0 context.Context, _a1 *cluster.ClusterQuery) (*cluster.ClusterResponse, error) { - ret := _m.Called(_a0, _a1) +// RotateAuth provides a mock function for the type ClusterServiceServer +func (_mock *ClusterServiceServer) RotateAuth(context1 context.Context, clusterQuery *cluster.ClusterQuery) (*cluster.ClusterResponse, error) { + ret := _mock.Called(context1, clusterQuery) if len(ret) == 0 { panic("no return value specified for RotateAuth") @@ -330,23 +334,21 @@ func (_m *ClusterServiceServer) RotateAuth(_a0 context.Context, _a1 *cluster.Clu var r0 *cluster.ClusterResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) (*cluster.ClusterResponse, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) (*cluster.ClusterResponse, error)); ok { + return returnFunc(context1, clusterQuery) } - if rf, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) *cluster.ClusterResponse); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *cluster.ClusterQuery) *cluster.ClusterResponse); ok { + r0 = returnFunc(context1, clusterQuery) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*cluster.ClusterResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *cluster.ClusterQuery) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, *cluster.ClusterQuery) error); ok { + r1 = returnFunc(context1, clusterQuery) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -356,32 +358,32 @@ type ClusterServiceServer_RotateAuth_Call struct { } // RotateAuth is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *cluster.ClusterQuery -func (_e *ClusterServiceServer_Expecter) RotateAuth(_a0 interface{}, _a1 interface{}) *ClusterServiceServer_RotateAuth_Call { - return &ClusterServiceServer_RotateAuth_Call{Call: _e.mock.On("RotateAuth", _a0, _a1)} +// - context1 +// - clusterQuery +func (_e *ClusterServiceServer_Expecter) RotateAuth(context1 interface{}, clusterQuery interface{}) *ClusterServiceServer_RotateAuth_Call { + return &ClusterServiceServer_RotateAuth_Call{Call: _e.mock.On("RotateAuth", context1, clusterQuery)} } -func (_c *ClusterServiceServer_RotateAuth_Call) Run(run func(_a0 context.Context, _a1 *cluster.ClusterQuery)) *ClusterServiceServer_RotateAuth_Call { +func (_c *ClusterServiceServer_RotateAuth_Call) Run(run func(context1 context.Context, clusterQuery *cluster.ClusterQuery)) *ClusterServiceServer_RotateAuth_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*cluster.ClusterQuery)) }) return _c } -func (_c *ClusterServiceServer_RotateAuth_Call) Return(_a0 *cluster.ClusterResponse, _a1 error) *ClusterServiceServer_RotateAuth_Call { - _c.Call.Return(_a0, _a1) +func (_c *ClusterServiceServer_RotateAuth_Call) Return(clusterResponse *cluster.ClusterResponse, err error) *ClusterServiceServer_RotateAuth_Call { + _c.Call.Return(clusterResponse, err) return _c } -func (_c *ClusterServiceServer_RotateAuth_Call) RunAndReturn(run func(context.Context, *cluster.ClusterQuery) (*cluster.ClusterResponse, error)) *ClusterServiceServer_RotateAuth_Call { +func (_c *ClusterServiceServer_RotateAuth_Call) RunAndReturn(run func(context1 context.Context, clusterQuery *cluster.ClusterQuery) (*cluster.ClusterResponse, error)) *ClusterServiceServer_RotateAuth_Call { _c.Call.Return(run) return _c } -// Update provides a mock function with given fields: _a0, _a1 -func (_m *ClusterServiceServer) Update(_a0 context.Context, _a1 *cluster.ClusterUpdateRequest) (*v1alpha1.Cluster, error) { - ret := _m.Called(_a0, _a1) +// Update provides a mock function for the type ClusterServiceServer +func (_mock *ClusterServiceServer) Update(context1 context.Context, clusterUpdateRequest *cluster.ClusterUpdateRequest) (*v1alpha1.Cluster, error) { + ret := _mock.Called(context1, clusterUpdateRequest) if len(ret) == 0 { panic("no return value specified for Update") @@ -389,23 +391,21 @@ func (_m *ClusterServiceServer) Update(_a0 context.Context, _a1 *cluster.Cluster var r0 *v1alpha1.Cluster var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *cluster.ClusterUpdateRequest) (*v1alpha1.Cluster, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *cluster.ClusterUpdateRequest) (*v1alpha1.Cluster, error)); ok { + return returnFunc(context1, clusterUpdateRequest) } - if rf, ok := ret.Get(0).(func(context.Context, *cluster.ClusterUpdateRequest) *v1alpha1.Cluster); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *cluster.ClusterUpdateRequest) *v1alpha1.Cluster); ok { + r0 = returnFunc(context1, clusterUpdateRequest) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.Cluster) } } - - if rf, ok := ret.Get(1).(func(context.Context, *cluster.ClusterUpdateRequest) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, *cluster.ClusterUpdateRequest) error); ok { + r1 = returnFunc(context1, clusterUpdateRequest) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -415,39 +415,25 @@ type ClusterServiceServer_Update_Call struct { } // Update is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *cluster.ClusterUpdateRequest -func (_e *ClusterServiceServer_Expecter) Update(_a0 interface{}, _a1 interface{}) *ClusterServiceServer_Update_Call { - return &ClusterServiceServer_Update_Call{Call: _e.mock.On("Update", _a0, _a1)} +// - context1 +// - clusterUpdateRequest +func (_e *ClusterServiceServer_Expecter) Update(context1 interface{}, clusterUpdateRequest interface{}) *ClusterServiceServer_Update_Call { + return &ClusterServiceServer_Update_Call{Call: _e.mock.On("Update", context1, clusterUpdateRequest)} } -func (_c *ClusterServiceServer_Update_Call) Run(run func(_a0 context.Context, _a1 *cluster.ClusterUpdateRequest)) *ClusterServiceServer_Update_Call { +func (_c *ClusterServiceServer_Update_Call) Run(run func(context1 context.Context, clusterUpdateRequest *cluster.ClusterUpdateRequest)) *ClusterServiceServer_Update_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*cluster.ClusterUpdateRequest)) }) return _c } -func (_c *ClusterServiceServer_Update_Call) Return(_a0 *v1alpha1.Cluster, _a1 error) *ClusterServiceServer_Update_Call { - _c.Call.Return(_a0, _a1) +func (_c *ClusterServiceServer_Update_Call) Return(cluster1 *v1alpha1.Cluster, err error) *ClusterServiceServer_Update_Call { + _c.Call.Return(cluster1, err) return _c } -func (_c *ClusterServiceServer_Update_Call) RunAndReturn(run func(context.Context, *cluster.ClusterUpdateRequest) (*v1alpha1.Cluster, error)) *ClusterServiceServer_Update_Call { +func (_c *ClusterServiceServer_Update_Call) RunAndReturn(run func(context1 context.Context, clusterUpdateRequest *cluster.ClusterUpdateRequest) (*v1alpha1.Cluster, error)) *ClusterServiceServer_Update_Call { _c.Call.Return(run) return _c } - -// NewClusterServiceServer creates a new instance of ClusterServiceServer. 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 NewClusterServiceServer(t interface { - mock.TestingT - Cleanup(func()) -}) *ClusterServiceServer { - mock := &ClusterServiceServer{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/apiclient/session/mocks/SessionServiceClient.go b/pkg/apiclient/session/mocks/SessionServiceClient.go index e677bbef4c301..6ebaaaf0106c6 100644 --- a/pkg/apiclient/session/mocks/SessionServiceClient.go +++ b/pkg/apiclient/session/mocks/SessionServiceClient.go @@ -1,17 +1,31 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - context "context" - - grpc "google.golang.org/grpc" + "context" + "github.com/argoproj/argo-cd/v3/pkg/apiclient/session" mock "github.com/stretchr/testify/mock" - - session "github.com/argoproj/argo-cd/v3/pkg/apiclient/session" + "google.golang.org/grpc" ) +// NewSessionServiceClient creates a new instance of SessionServiceClient. 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 NewSessionServiceClient(t interface { + mock.TestingT + Cleanup(func()) +}) *SessionServiceClient { + mock := &SessionServiceClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // SessionServiceClient is an autogenerated mock type for the SessionServiceClient type type SessionServiceClient struct { mock.Mock @@ -25,8 +39,9 @@ func (_m *SessionServiceClient) EXPECT() *SessionServiceClient_Expecter { return &SessionServiceClient_Expecter{mock: &_m.Mock} } -// Create provides a mock function with given fields: ctx, in, opts -func (_m *SessionServiceClient) Create(ctx context.Context, in *session.SessionCreateRequest, opts ...grpc.CallOption) (*session.SessionResponse, error) { +// Create provides a mock function for the type SessionServiceClient +func (_mock *SessionServiceClient) Create(ctx context.Context, in *session.SessionCreateRequest, opts ...grpc.CallOption) (*session.SessionResponse, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -34,7 +49,7 @@ func (_m *SessionServiceClient) Create(ctx context.Context, in *session.SessionC var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for Create") @@ -42,23 +57,21 @@ func (_m *SessionServiceClient) Create(ctx context.Context, in *session.SessionC var r0 *session.SessionResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *session.SessionCreateRequest, ...grpc.CallOption) (*session.SessionResponse, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *session.SessionCreateRequest, ...grpc.CallOption) (*session.SessionResponse, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *session.SessionCreateRequest, ...grpc.CallOption) *session.SessionResponse); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *session.SessionCreateRequest, ...grpc.CallOption) *session.SessionResponse); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*session.SessionResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *session.SessionCreateRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *session.SessionCreateRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -68,9 +81,9 @@ type SessionServiceClient_Create_Call struct { } // Create is a helper method to define mock.On call -// - ctx context.Context -// - in *session.SessionCreateRequest -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *SessionServiceClient_Expecter) Create(ctx interface{}, in interface{}, opts ...interface{}) *SessionServiceClient_Create_Call { return &SessionServiceClient_Create_Call{Call: _e.mock.On("Create", append([]interface{}{ctx, in}, opts...)...)} @@ -89,18 +102,19 @@ func (_c *SessionServiceClient_Create_Call) Run(run func(ctx context.Context, in return _c } -func (_c *SessionServiceClient_Create_Call) Return(_a0 *session.SessionResponse, _a1 error) *SessionServiceClient_Create_Call { - _c.Call.Return(_a0, _a1) +func (_c *SessionServiceClient_Create_Call) Return(sessionResponse *session.SessionResponse, err error) *SessionServiceClient_Create_Call { + _c.Call.Return(sessionResponse, err) return _c } -func (_c *SessionServiceClient_Create_Call) RunAndReturn(run func(context.Context, *session.SessionCreateRequest, ...grpc.CallOption) (*session.SessionResponse, error)) *SessionServiceClient_Create_Call { +func (_c *SessionServiceClient_Create_Call) RunAndReturn(run func(ctx context.Context, in *session.SessionCreateRequest, opts ...grpc.CallOption) (*session.SessionResponse, error)) *SessionServiceClient_Create_Call { _c.Call.Return(run) return _c } -// Delete provides a mock function with given fields: ctx, in, opts -func (_m *SessionServiceClient) Delete(ctx context.Context, in *session.SessionDeleteRequest, opts ...grpc.CallOption) (*session.SessionResponse, error) { +// Delete provides a mock function for the type SessionServiceClient +func (_mock *SessionServiceClient) Delete(ctx context.Context, in *session.SessionDeleteRequest, opts ...grpc.CallOption) (*session.SessionResponse, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -108,7 +122,7 @@ func (_m *SessionServiceClient) Delete(ctx context.Context, in *session.SessionD var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for Delete") @@ -116,23 +130,21 @@ func (_m *SessionServiceClient) Delete(ctx context.Context, in *session.SessionD var r0 *session.SessionResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *session.SessionDeleteRequest, ...grpc.CallOption) (*session.SessionResponse, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *session.SessionDeleteRequest, ...grpc.CallOption) (*session.SessionResponse, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *session.SessionDeleteRequest, ...grpc.CallOption) *session.SessionResponse); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *session.SessionDeleteRequest, ...grpc.CallOption) *session.SessionResponse); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*session.SessionResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *session.SessionDeleteRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *session.SessionDeleteRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -142,9 +154,9 @@ type SessionServiceClient_Delete_Call struct { } // Delete is a helper method to define mock.On call -// - ctx context.Context -// - in *session.SessionDeleteRequest -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *SessionServiceClient_Expecter) Delete(ctx interface{}, in interface{}, opts ...interface{}) *SessionServiceClient_Delete_Call { return &SessionServiceClient_Delete_Call{Call: _e.mock.On("Delete", append([]interface{}{ctx, in}, opts...)...)} @@ -163,18 +175,19 @@ func (_c *SessionServiceClient_Delete_Call) Run(run func(ctx context.Context, in return _c } -func (_c *SessionServiceClient_Delete_Call) Return(_a0 *session.SessionResponse, _a1 error) *SessionServiceClient_Delete_Call { - _c.Call.Return(_a0, _a1) +func (_c *SessionServiceClient_Delete_Call) Return(sessionResponse *session.SessionResponse, err error) *SessionServiceClient_Delete_Call { + _c.Call.Return(sessionResponse, err) return _c } -func (_c *SessionServiceClient_Delete_Call) RunAndReturn(run func(context.Context, *session.SessionDeleteRequest, ...grpc.CallOption) (*session.SessionResponse, error)) *SessionServiceClient_Delete_Call { +func (_c *SessionServiceClient_Delete_Call) RunAndReturn(run func(ctx context.Context, in *session.SessionDeleteRequest, opts ...grpc.CallOption) (*session.SessionResponse, error)) *SessionServiceClient_Delete_Call { _c.Call.Return(run) return _c } -// GetUserInfo provides a mock function with given fields: ctx, in, opts -func (_m *SessionServiceClient) GetUserInfo(ctx context.Context, in *session.GetUserInfoRequest, opts ...grpc.CallOption) (*session.GetUserInfoResponse, error) { +// GetUserInfo provides a mock function for the type SessionServiceClient +func (_mock *SessionServiceClient) GetUserInfo(ctx context.Context, in *session.GetUserInfoRequest, opts ...grpc.CallOption) (*session.GetUserInfoResponse, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -182,7 +195,7 @@ func (_m *SessionServiceClient) GetUserInfo(ctx context.Context, in *session.Get var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for GetUserInfo") @@ -190,23 +203,21 @@ func (_m *SessionServiceClient) GetUserInfo(ctx context.Context, in *session.Get var r0 *session.GetUserInfoResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *session.GetUserInfoRequest, ...grpc.CallOption) (*session.GetUserInfoResponse, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *session.GetUserInfoRequest, ...grpc.CallOption) (*session.GetUserInfoResponse, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *session.GetUserInfoRequest, ...grpc.CallOption) *session.GetUserInfoResponse); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *session.GetUserInfoRequest, ...grpc.CallOption) *session.GetUserInfoResponse); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*session.GetUserInfoResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *session.GetUserInfoRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *session.GetUserInfoRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -216,9 +227,9 @@ type SessionServiceClient_GetUserInfo_Call struct { } // GetUserInfo is a helper method to define mock.On call -// - ctx context.Context -// - in *session.GetUserInfoRequest -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *SessionServiceClient_Expecter) GetUserInfo(ctx interface{}, in interface{}, opts ...interface{}) *SessionServiceClient_GetUserInfo_Call { return &SessionServiceClient_GetUserInfo_Call{Call: _e.mock.On("GetUserInfo", append([]interface{}{ctx, in}, opts...)...)} @@ -237,26 +248,12 @@ func (_c *SessionServiceClient_GetUserInfo_Call) Run(run func(ctx context.Contex return _c } -func (_c *SessionServiceClient_GetUserInfo_Call) Return(_a0 *session.GetUserInfoResponse, _a1 error) *SessionServiceClient_GetUserInfo_Call { - _c.Call.Return(_a0, _a1) +func (_c *SessionServiceClient_GetUserInfo_Call) Return(getUserInfoResponse *session.GetUserInfoResponse, err error) *SessionServiceClient_GetUserInfo_Call { + _c.Call.Return(getUserInfoResponse, err) return _c } -func (_c *SessionServiceClient_GetUserInfo_Call) RunAndReturn(run func(context.Context, *session.GetUserInfoRequest, ...grpc.CallOption) (*session.GetUserInfoResponse, error)) *SessionServiceClient_GetUserInfo_Call { +func (_c *SessionServiceClient_GetUserInfo_Call) RunAndReturn(run func(ctx context.Context, in *session.GetUserInfoRequest, opts ...grpc.CallOption) (*session.GetUserInfoResponse, error)) *SessionServiceClient_GetUserInfo_Call { _c.Call.Return(run) return _c } - -// NewSessionServiceClient creates a new instance of SessionServiceClient. 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 NewSessionServiceClient(t interface { - mock.TestingT - Cleanup(func()) -}) *SessionServiceClient { - mock := &SessionServiceClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/apiclient/session/mocks/SessionServiceServer.go b/pkg/apiclient/session/mocks/SessionServiceServer.go index 70d04cd795abe..fe8486703f909 100644 --- a/pkg/apiclient/session/mocks/SessionServiceServer.go +++ b/pkg/apiclient/session/mocks/SessionServiceServer.go @@ -1,14 +1,30 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - context "context" + "context" - session "github.com/argoproj/argo-cd/v3/pkg/apiclient/session" + "github.com/argoproj/argo-cd/v3/pkg/apiclient/session" mock "github.com/stretchr/testify/mock" ) +// NewSessionServiceServer creates a new instance of SessionServiceServer. 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 NewSessionServiceServer(t interface { + mock.TestingT + Cleanup(func()) +}) *SessionServiceServer { + mock := &SessionServiceServer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // SessionServiceServer is an autogenerated mock type for the SessionServiceServer type type SessionServiceServer struct { mock.Mock @@ -22,9 +38,9 @@ func (_m *SessionServiceServer) EXPECT() *SessionServiceServer_Expecter { return &SessionServiceServer_Expecter{mock: &_m.Mock} } -// Create provides a mock function with given fields: _a0, _a1 -func (_m *SessionServiceServer) Create(_a0 context.Context, _a1 *session.SessionCreateRequest) (*session.SessionResponse, error) { - ret := _m.Called(_a0, _a1) +// Create provides a mock function for the type SessionServiceServer +func (_mock *SessionServiceServer) Create(context1 context.Context, sessionCreateRequest *session.SessionCreateRequest) (*session.SessionResponse, error) { + ret := _mock.Called(context1, sessionCreateRequest) if len(ret) == 0 { panic("no return value specified for Create") @@ -32,23 +48,21 @@ func (_m *SessionServiceServer) Create(_a0 context.Context, _a1 *session.Session var r0 *session.SessionResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *session.SessionCreateRequest) (*session.SessionResponse, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *session.SessionCreateRequest) (*session.SessionResponse, error)); ok { + return returnFunc(context1, sessionCreateRequest) } - if rf, ok := ret.Get(0).(func(context.Context, *session.SessionCreateRequest) *session.SessionResponse); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *session.SessionCreateRequest) *session.SessionResponse); ok { + r0 = returnFunc(context1, sessionCreateRequest) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*session.SessionResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *session.SessionCreateRequest) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, *session.SessionCreateRequest) error); ok { + r1 = returnFunc(context1, sessionCreateRequest) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -58,32 +72,32 @@ type SessionServiceServer_Create_Call struct { } // Create is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *session.SessionCreateRequest -func (_e *SessionServiceServer_Expecter) Create(_a0 interface{}, _a1 interface{}) *SessionServiceServer_Create_Call { - return &SessionServiceServer_Create_Call{Call: _e.mock.On("Create", _a0, _a1)} +// - context1 +// - sessionCreateRequest +func (_e *SessionServiceServer_Expecter) Create(context1 interface{}, sessionCreateRequest interface{}) *SessionServiceServer_Create_Call { + return &SessionServiceServer_Create_Call{Call: _e.mock.On("Create", context1, sessionCreateRequest)} } -func (_c *SessionServiceServer_Create_Call) Run(run func(_a0 context.Context, _a1 *session.SessionCreateRequest)) *SessionServiceServer_Create_Call { +func (_c *SessionServiceServer_Create_Call) Run(run func(context1 context.Context, sessionCreateRequest *session.SessionCreateRequest)) *SessionServiceServer_Create_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*session.SessionCreateRequest)) }) return _c } -func (_c *SessionServiceServer_Create_Call) Return(_a0 *session.SessionResponse, _a1 error) *SessionServiceServer_Create_Call { - _c.Call.Return(_a0, _a1) +func (_c *SessionServiceServer_Create_Call) Return(sessionResponse *session.SessionResponse, err error) *SessionServiceServer_Create_Call { + _c.Call.Return(sessionResponse, err) return _c } -func (_c *SessionServiceServer_Create_Call) RunAndReturn(run func(context.Context, *session.SessionCreateRequest) (*session.SessionResponse, error)) *SessionServiceServer_Create_Call { +func (_c *SessionServiceServer_Create_Call) RunAndReturn(run func(context1 context.Context, sessionCreateRequest *session.SessionCreateRequest) (*session.SessionResponse, error)) *SessionServiceServer_Create_Call { _c.Call.Return(run) return _c } -// Delete provides a mock function with given fields: _a0, _a1 -func (_m *SessionServiceServer) Delete(_a0 context.Context, _a1 *session.SessionDeleteRequest) (*session.SessionResponse, error) { - ret := _m.Called(_a0, _a1) +// Delete provides a mock function for the type SessionServiceServer +func (_mock *SessionServiceServer) Delete(context1 context.Context, sessionDeleteRequest *session.SessionDeleteRequest) (*session.SessionResponse, error) { + ret := _mock.Called(context1, sessionDeleteRequest) if len(ret) == 0 { panic("no return value specified for Delete") @@ -91,23 +105,21 @@ func (_m *SessionServiceServer) Delete(_a0 context.Context, _a1 *session.Session var r0 *session.SessionResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *session.SessionDeleteRequest) (*session.SessionResponse, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *session.SessionDeleteRequest) (*session.SessionResponse, error)); ok { + return returnFunc(context1, sessionDeleteRequest) } - if rf, ok := ret.Get(0).(func(context.Context, *session.SessionDeleteRequest) *session.SessionResponse); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *session.SessionDeleteRequest) *session.SessionResponse); ok { + r0 = returnFunc(context1, sessionDeleteRequest) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*session.SessionResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *session.SessionDeleteRequest) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, *session.SessionDeleteRequest) error); ok { + r1 = returnFunc(context1, sessionDeleteRequest) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -117,32 +129,32 @@ type SessionServiceServer_Delete_Call struct { } // Delete is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *session.SessionDeleteRequest -func (_e *SessionServiceServer_Expecter) Delete(_a0 interface{}, _a1 interface{}) *SessionServiceServer_Delete_Call { - return &SessionServiceServer_Delete_Call{Call: _e.mock.On("Delete", _a0, _a1)} +// - context1 +// - sessionDeleteRequest +func (_e *SessionServiceServer_Expecter) Delete(context1 interface{}, sessionDeleteRequest interface{}) *SessionServiceServer_Delete_Call { + return &SessionServiceServer_Delete_Call{Call: _e.mock.On("Delete", context1, sessionDeleteRequest)} } -func (_c *SessionServiceServer_Delete_Call) Run(run func(_a0 context.Context, _a1 *session.SessionDeleteRequest)) *SessionServiceServer_Delete_Call { +func (_c *SessionServiceServer_Delete_Call) Run(run func(context1 context.Context, sessionDeleteRequest *session.SessionDeleteRequest)) *SessionServiceServer_Delete_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*session.SessionDeleteRequest)) }) return _c } -func (_c *SessionServiceServer_Delete_Call) Return(_a0 *session.SessionResponse, _a1 error) *SessionServiceServer_Delete_Call { - _c.Call.Return(_a0, _a1) +func (_c *SessionServiceServer_Delete_Call) Return(sessionResponse *session.SessionResponse, err error) *SessionServiceServer_Delete_Call { + _c.Call.Return(sessionResponse, err) return _c } -func (_c *SessionServiceServer_Delete_Call) RunAndReturn(run func(context.Context, *session.SessionDeleteRequest) (*session.SessionResponse, error)) *SessionServiceServer_Delete_Call { +func (_c *SessionServiceServer_Delete_Call) RunAndReturn(run func(context1 context.Context, sessionDeleteRequest *session.SessionDeleteRequest) (*session.SessionResponse, error)) *SessionServiceServer_Delete_Call { _c.Call.Return(run) return _c } -// GetUserInfo provides a mock function with given fields: _a0, _a1 -func (_m *SessionServiceServer) GetUserInfo(_a0 context.Context, _a1 *session.GetUserInfoRequest) (*session.GetUserInfoResponse, error) { - ret := _m.Called(_a0, _a1) +// GetUserInfo provides a mock function for the type SessionServiceServer +func (_mock *SessionServiceServer) GetUserInfo(context1 context.Context, getUserInfoRequest *session.GetUserInfoRequest) (*session.GetUserInfoResponse, error) { + ret := _mock.Called(context1, getUserInfoRequest) if len(ret) == 0 { panic("no return value specified for GetUserInfo") @@ -150,23 +162,21 @@ func (_m *SessionServiceServer) GetUserInfo(_a0 context.Context, _a1 *session.Ge var r0 *session.GetUserInfoResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *session.GetUserInfoRequest) (*session.GetUserInfoResponse, error)); ok { - return rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *session.GetUserInfoRequest) (*session.GetUserInfoResponse, error)); ok { + return returnFunc(context1, getUserInfoRequest) } - if rf, ok := ret.Get(0).(func(context.Context, *session.GetUserInfoRequest) *session.GetUserInfoResponse); ok { - r0 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(0).(func(context.Context, *session.GetUserInfoRequest) *session.GetUserInfoResponse); ok { + r0 = returnFunc(context1, getUserInfoRequest) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*session.GetUserInfoResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *session.GetUserInfoRequest) error); ok { - r1 = rf(_a0, _a1) + if returnFunc, ok := ret.Get(1).(func(context.Context, *session.GetUserInfoRequest) error); ok { + r1 = returnFunc(context1, getUserInfoRequest) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -176,39 +186,25 @@ type SessionServiceServer_GetUserInfo_Call struct { } // GetUserInfo is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *session.GetUserInfoRequest -func (_e *SessionServiceServer_Expecter) GetUserInfo(_a0 interface{}, _a1 interface{}) *SessionServiceServer_GetUserInfo_Call { - return &SessionServiceServer_GetUserInfo_Call{Call: _e.mock.On("GetUserInfo", _a0, _a1)} +// - context1 +// - getUserInfoRequest +func (_e *SessionServiceServer_Expecter) GetUserInfo(context1 interface{}, getUserInfoRequest interface{}) *SessionServiceServer_GetUserInfo_Call { + return &SessionServiceServer_GetUserInfo_Call{Call: _e.mock.On("GetUserInfo", context1, getUserInfoRequest)} } -func (_c *SessionServiceServer_GetUserInfo_Call) Run(run func(_a0 context.Context, _a1 *session.GetUserInfoRequest)) *SessionServiceServer_GetUserInfo_Call { +func (_c *SessionServiceServer_GetUserInfo_Call) Run(run func(context1 context.Context, getUserInfoRequest *session.GetUserInfoRequest)) *SessionServiceServer_GetUserInfo_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*session.GetUserInfoRequest)) }) return _c } -func (_c *SessionServiceServer_GetUserInfo_Call) Return(_a0 *session.GetUserInfoResponse, _a1 error) *SessionServiceServer_GetUserInfo_Call { - _c.Call.Return(_a0, _a1) +func (_c *SessionServiceServer_GetUserInfo_Call) Return(getUserInfoResponse *session.GetUserInfoResponse, err error) *SessionServiceServer_GetUserInfo_Call { + _c.Call.Return(getUserInfoResponse, err) return _c } -func (_c *SessionServiceServer_GetUserInfo_Call) RunAndReturn(run func(context.Context, *session.GetUserInfoRequest) (*session.GetUserInfoResponse, error)) *SessionServiceServer_GetUserInfo_Call { +func (_c *SessionServiceServer_GetUserInfo_Call) RunAndReturn(run func(context1 context.Context, getUserInfoRequest *session.GetUserInfoRequest) (*session.GetUserInfoResponse, error)) *SessionServiceServer_GetUserInfo_Call { _c.Call.Return(run) return _c } - -// NewSessionServiceServer creates a new instance of SessionServiceServer. 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 NewSessionServiceServer(t interface { - mock.TestingT - Cleanup(func()) -}) *SessionServiceServer { - mock := &SessionServiceServer{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/client/clientset/versioned/typed/application/v1alpha1/mocks/AppProjectInterface.go b/pkg/client/clientset/versioned/typed/application/v1alpha1/mocks/AppProjectInterface.go index ec84052a9e64a..97a5cf4179cf4 100644 --- a/pkg/client/clientset/versioned/typed/application/v1alpha1/mocks/AppProjectInterface.go +++ b/pkg/client/clientset/versioned/typed/application/v1alpha1/mocks/AppProjectInterface.go @@ -1,19 +1,32 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - context "context" + "context" + "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" mock "github.com/stretchr/testify/mock" - types "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" +) - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +// NewAppProjectInterface creates a new instance of AppProjectInterface. 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 NewAppProjectInterface(t interface { + mock.TestingT + Cleanup(func()) +}) *AppProjectInterface { + mock := &AppProjectInterface{} + mock.Mock.Test(t) - v1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" + t.Cleanup(func() { mock.AssertExpectations(t) }) - watch "k8s.io/apimachinery/pkg/watch" -) + return mock +} // AppProjectInterface is an autogenerated mock type for the AppProjectInterface type type AppProjectInterface struct { @@ -28,9 +41,9 @@ func (_m *AppProjectInterface) EXPECT() *AppProjectInterface_Expecter { return &AppProjectInterface_Expecter{mock: &_m.Mock} } -// Create provides a mock function with given fields: ctx, appProject, opts -func (_m *AppProjectInterface) Create(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.CreateOptions) (*v1alpha1.AppProject, error) { - ret := _m.Called(ctx, appProject, opts) +// Create provides a mock function for the type AppProjectInterface +func (_mock *AppProjectInterface) Create(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.CreateOptions) (*v1alpha1.AppProject, error) { + ret := _mock.Called(ctx, appProject, opts) if len(ret) == 0 { panic("no return value specified for Create") @@ -38,23 +51,21 @@ func (_m *AppProjectInterface) Create(ctx context.Context, appProject *v1alpha1. var r0 *v1alpha1.AppProject var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.AppProject, v1.CreateOptions) (*v1alpha1.AppProject, error)); ok { - return rf(ctx, appProject, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.AppProject, v1.CreateOptions) (*v1alpha1.AppProject, error)); ok { + return returnFunc(ctx, appProject, opts) } - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.AppProject, v1.CreateOptions) *v1alpha1.AppProject); ok { - r0 = rf(ctx, appProject, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.AppProject, v1.CreateOptions) *v1alpha1.AppProject); ok { + r0 = returnFunc(ctx, appProject, opts) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.AppProject) } } - - if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.AppProject, v1.CreateOptions) error); ok { - r1 = rf(ctx, appProject, opts) + if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.AppProject, v1.CreateOptions) error); ok { + r1 = returnFunc(ctx, appProject, opts) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -64,9 +75,9 @@ type AppProjectInterface_Create_Call struct { } // Create is a helper method to define mock.On call -// - ctx context.Context -// - appProject *v1alpha1.AppProject -// - opts v1.CreateOptions +// - ctx +// - appProject +// - opts func (_e *AppProjectInterface_Expecter) Create(ctx interface{}, appProject interface{}, opts interface{}) *AppProjectInterface_Create_Call { return &AppProjectInterface_Create_Call{Call: _e.mock.On("Create", ctx, appProject, opts)} } @@ -78,31 +89,30 @@ func (_c *AppProjectInterface_Create_Call) Run(run func(ctx context.Context, app return _c } -func (_c *AppProjectInterface_Create_Call) Return(_a0 *v1alpha1.AppProject, _a1 error) *AppProjectInterface_Create_Call { - _c.Call.Return(_a0, _a1) +func (_c *AppProjectInterface_Create_Call) Return(appProject1 *v1alpha1.AppProject, err error) *AppProjectInterface_Create_Call { + _c.Call.Return(appProject1, err) return _c } -func (_c *AppProjectInterface_Create_Call) RunAndReturn(run func(context.Context, *v1alpha1.AppProject, v1.CreateOptions) (*v1alpha1.AppProject, error)) *AppProjectInterface_Create_Call { +func (_c *AppProjectInterface_Create_Call) RunAndReturn(run func(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.CreateOptions) (*v1alpha1.AppProject, error)) *AppProjectInterface_Create_Call { _c.Call.Return(run) return _c } -// Delete provides a mock function with given fields: ctx, name, opts -func (_m *AppProjectInterface) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - ret := _m.Called(ctx, name, opts) +// Delete provides a mock function for the type AppProjectInterface +func (_mock *AppProjectInterface) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + ret := _mock.Called(ctx, name, opts) if len(ret) == 0 { panic("no return value specified for Delete") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, v1.DeleteOptions) error); ok { - r0 = rf(ctx, name, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, v1.DeleteOptions) error); ok { + r0 = returnFunc(ctx, name, opts) } else { r0 = ret.Error(0) } - return r0 } @@ -112,9 +122,9 @@ type AppProjectInterface_Delete_Call struct { } // Delete is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - opts v1.DeleteOptions +// - ctx +// - name +// - opts func (_e *AppProjectInterface_Expecter) Delete(ctx interface{}, name interface{}, opts interface{}) *AppProjectInterface_Delete_Call { return &AppProjectInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, name, opts)} } @@ -126,31 +136,30 @@ func (_c *AppProjectInterface_Delete_Call) Run(run func(ctx context.Context, nam return _c } -func (_c *AppProjectInterface_Delete_Call) Return(_a0 error) *AppProjectInterface_Delete_Call { - _c.Call.Return(_a0) +func (_c *AppProjectInterface_Delete_Call) Return(err error) *AppProjectInterface_Delete_Call { + _c.Call.Return(err) return _c } -func (_c *AppProjectInterface_Delete_Call) RunAndReturn(run func(context.Context, string, v1.DeleteOptions) error) *AppProjectInterface_Delete_Call { +func (_c *AppProjectInterface_Delete_Call) RunAndReturn(run func(ctx context.Context, name string, opts v1.DeleteOptions) error) *AppProjectInterface_Delete_Call { _c.Call.Return(run) return _c } -// DeleteCollection provides a mock function with given fields: ctx, opts, listOpts -func (_m *AppProjectInterface) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - ret := _m.Called(ctx, opts, listOpts) +// DeleteCollection provides a mock function for the type AppProjectInterface +func (_mock *AppProjectInterface) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + ret := _mock.Called(ctx, opts, listOpts) if len(ret) == 0 { panic("no return value specified for DeleteCollection") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, v1.DeleteOptions, v1.ListOptions) error); ok { - r0 = rf(ctx, opts, listOpts) + if returnFunc, ok := ret.Get(0).(func(context.Context, v1.DeleteOptions, v1.ListOptions) error); ok { + r0 = returnFunc(ctx, opts, listOpts) } else { r0 = ret.Error(0) } - return r0 } @@ -160,9 +169,9 @@ type AppProjectInterface_DeleteCollection_Call struct { } // DeleteCollection is a helper method to define mock.On call -// - ctx context.Context -// - opts v1.DeleteOptions -// - listOpts v1.ListOptions +// - ctx +// - opts +// - listOpts func (_e *AppProjectInterface_Expecter) DeleteCollection(ctx interface{}, opts interface{}, listOpts interface{}) *AppProjectInterface_DeleteCollection_Call { return &AppProjectInterface_DeleteCollection_Call{Call: _e.mock.On("DeleteCollection", ctx, opts, listOpts)} } @@ -174,19 +183,19 @@ func (_c *AppProjectInterface_DeleteCollection_Call) Run(run func(ctx context.Co return _c } -func (_c *AppProjectInterface_DeleteCollection_Call) Return(_a0 error) *AppProjectInterface_DeleteCollection_Call { - _c.Call.Return(_a0) +func (_c *AppProjectInterface_DeleteCollection_Call) Return(err error) *AppProjectInterface_DeleteCollection_Call { + _c.Call.Return(err) return _c } -func (_c *AppProjectInterface_DeleteCollection_Call) RunAndReturn(run func(context.Context, v1.DeleteOptions, v1.ListOptions) error) *AppProjectInterface_DeleteCollection_Call { +func (_c *AppProjectInterface_DeleteCollection_Call) RunAndReturn(run func(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error) *AppProjectInterface_DeleteCollection_Call { _c.Call.Return(run) return _c } -// Get provides a mock function with given fields: ctx, name, opts -func (_m *AppProjectInterface) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.AppProject, error) { - ret := _m.Called(ctx, name, opts) +// Get provides a mock function for the type AppProjectInterface +func (_mock *AppProjectInterface) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.AppProject, error) { + ret := _mock.Called(ctx, name, opts) if len(ret) == 0 { panic("no return value specified for Get") @@ -194,23 +203,21 @@ func (_m *AppProjectInterface) Get(ctx context.Context, name string, opts v1.Get var r0 *v1alpha1.AppProject var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, v1.GetOptions) (*v1alpha1.AppProject, error)); ok { - return rf(ctx, name, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, v1.GetOptions) (*v1alpha1.AppProject, error)); ok { + return returnFunc(ctx, name, opts) } - if rf, ok := ret.Get(0).(func(context.Context, string, v1.GetOptions) *v1alpha1.AppProject); ok { - r0 = rf(ctx, name, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, v1.GetOptions) *v1alpha1.AppProject); ok { + r0 = returnFunc(ctx, name, opts) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.AppProject) } } - - if rf, ok := ret.Get(1).(func(context.Context, string, v1.GetOptions) error); ok { - r1 = rf(ctx, name, opts) + if returnFunc, ok := ret.Get(1).(func(context.Context, string, v1.GetOptions) error); ok { + r1 = returnFunc(ctx, name, opts) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -220,9 +227,9 @@ type AppProjectInterface_Get_Call struct { } // Get is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - opts v1.GetOptions +// - ctx +// - name +// - opts func (_e *AppProjectInterface_Expecter) Get(ctx interface{}, name interface{}, opts interface{}) *AppProjectInterface_Get_Call { return &AppProjectInterface_Get_Call{Call: _e.mock.On("Get", ctx, name, opts)} } @@ -234,19 +241,19 @@ func (_c *AppProjectInterface_Get_Call) Run(run func(ctx context.Context, name s return _c } -func (_c *AppProjectInterface_Get_Call) Return(_a0 *v1alpha1.AppProject, _a1 error) *AppProjectInterface_Get_Call { - _c.Call.Return(_a0, _a1) +func (_c *AppProjectInterface_Get_Call) Return(appProject *v1alpha1.AppProject, err error) *AppProjectInterface_Get_Call { + _c.Call.Return(appProject, err) return _c } -func (_c *AppProjectInterface_Get_Call) RunAndReturn(run func(context.Context, string, v1.GetOptions) (*v1alpha1.AppProject, error)) *AppProjectInterface_Get_Call { +func (_c *AppProjectInterface_Get_Call) RunAndReturn(run func(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.AppProject, error)) *AppProjectInterface_Get_Call { _c.Call.Return(run) return _c } -// List provides a mock function with given fields: ctx, opts -func (_m *AppProjectInterface) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AppProjectList, error) { - ret := _m.Called(ctx, opts) +// List provides a mock function for the type AppProjectInterface +func (_mock *AppProjectInterface) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AppProjectList, error) { + ret := _mock.Called(ctx, opts) if len(ret) == 0 { panic("no return value specified for List") @@ -254,23 +261,21 @@ func (_m *AppProjectInterface) List(ctx context.Context, opts v1.ListOptions) (* var r0 *v1alpha1.AppProjectList var r1 error - if rf, ok := ret.Get(0).(func(context.Context, v1.ListOptions) (*v1alpha1.AppProjectList, error)); ok { - return rf(ctx, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, v1.ListOptions) (*v1alpha1.AppProjectList, error)); ok { + return returnFunc(ctx, opts) } - if rf, ok := ret.Get(0).(func(context.Context, v1.ListOptions) *v1alpha1.AppProjectList); ok { - r0 = rf(ctx, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, v1.ListOptions) *v1alpha1.AppProjectList); ok { + r0 = returnFunc(ctx, opts) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.AppProjectList) } } - - if rf, ok := ret.Get(1).(func(context.Context, v1.ListOptions) error); ok { - r1 = rf(ctx, opts) + if returnFunc, ok := ret.Get(1).(func(context.Context, v1.ListOptions) error); ok { + r1 = returnFunc(ctx, opts) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -280,8 +285,8 @@ type AppProjectInterface_List_Call struct { } // List is a helper method to define mock.On call -// - ctx context.Context -// - opts v1.ListOptions +// - ctx +// - opts func (_e *AppProjectInterface_Expecter) List(ctx interface{}, opts interface{}) *AppProjectInterface_List_Call { return &AppProjectInterface_List_Call{Call: _e.mock.On("List", ctx, opts)} } @@ -293,18 +298,19 @@ func (_c *AppProjectInterface_List_Call) Run(run func(ctx context.Context, opts return _c } -func (_c *AppProjectInterface_List_Call) Return(_a0 *v1alpha1.AppProjectList, _a1 error) *AppProjectInterface_List_Call { - _c.Call.Return(_a0, _a1) +func (_c *AppProjectInterface_List_Call) Return(appProjectList *v1alpha1.AppProjectList, err error) *AppProjectInterface_List_Call { + _c.Call.Return(appProjectList, err) return _c } -func (_c *AppProjectInterface_List_Call) RunAndReturn(run func(context.Context, v1.ListOptions) (*v1alpha1.AppProjectList, error)) *AppProjectInterface_List_Call { +func (_c *AppProjectInterface_List_Call) RunAndReturn(run func(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AppProjectList, error)) *AppProjectInterface_List_Call { _c.Call.Return(run) return _c } -// Patch provides a mock function with given fields: ctx, name, pt, data, opts, subresources -func (_m *AppProjectInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (*v1alpha1.AppProject, error) { +// Patch provides a mock function for the type AppProjectInterface +func (_mock *AppProjectInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (*v1alpha1.AppProject, error) { + // string _va := make([]interface{}, len(subresources)) for _i := range subresources { _va[_i] = subresources[_i] @@ -312,7 +318,7 @@ func (_m *AppProjectInterface) Patch(ctx context.Context, name string, pt types. var _ca []interface{} _ca = append(_ca, ctx, name, pt, data, opts) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for Patch") @@ -320,23 +326,21 @@ func (_m *AppProjectInterface) Patch(ctx context.Context, name string, pt types. var r0 *v1alpha1.AppProject var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*v1alpha1.AppProject, error)); ok { - return rf(ctx, name, pt, data, opts, subresources...) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*v1alpha1.AppProject, error)); ok { + return returnFunc(ctx, name, pt, data, opts, subresources...) } - if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) *v1alpha1.AppProject); ok { - r0 = rf(ctx, name, pt, data, opts, subresources...) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) *v1alpha1.AppProject); ok { + r0 = returnFunc(ctx, name, pt, data, opts, subresources...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.AppProject) } } - - if rf, ok := ret.Get(1).(func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) error); ok { - r1 = rf(ctx, name, pt, data, opts, subresources...) + if returnFunc, ok := ret.Get(1).(func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) error); ok { + r1 = returnFunc(ctx, name, pt, data, opts, subresources...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -346,12 +350,12 @@ type AppProjectInterface_Patch_Call struct { } // Patch is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - pt types.PatchType -// - data []byte -// - opts v1.PatchOptions -// - subresources ...string +// - ctx +// - name +// - pt +// - data +// - opts +// - subresources func (_e *AppProjectInterface_Expecter) Patch(ctx interface{}, name interface{}, pt interface{}, data interface{}, opts interface{}, subresources ...interface{}) *AppProjectInterface_Patch_Call { return &AppProjectInterface_Patch_Call{Call: _e.mock.On("Patch", append([]interface{}{ctx, name, pt, data, opts}, subresources...)...)} @@ -375,14 +379,14 @@ func (_c *AppProjectInterface_Patch_Call) Return(result *v1alpha1.AppProject, er return _c } -func (_c *AppProjectInterface_Patch_Call) RunAndReturn(run func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*v1alpha1.AppProject, error)) *AppProjectInterface_Patch_Call { +func (_c *AppProjectInterface_Patch_Call) RunAndReturn(run func(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (*v1alpha1.AppProject, error)) *AppProjectInterface_Patch_Call { _c.Call.Return(run) return _c } -// Update provides a mock function with given fields: ctx, appProject, opts -func (_m *AppProjectInterface) Update(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.UpdateOptions) (*v1alpha1.AppProject, error) { - ret := _m.Called(ctx, appProject, opts) +// Update provides a mock function for the type AppProjectInterface +func (_mock *AppProjectInterface) Update(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.UpdateOptions) (*v1alpha1.AppProject, error) { + ret := _mock.Called(ctx, appProject, opts) if len(ret) == 0 { panic("no return value specified for Update") @@ -390,23 +394,21 @@ func (_m *AppProjectInterface) Update(ctx context.Context, appProject *v1alpha1. var r0 *v1alpha1.AppProject var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.AppProject, v1.UpdateOptions) (*v1alpha1.AppProject, error)); ok { - return rf(ctx, appProject, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.AppProject, v1.UpdateOptions) (*v1alpha1.AppProject, error)); ok { + return returnFunc(ctx, appProject, opts) } - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.AppProject, v1.UpdateOptions) *v1alpha1.AppProject); ok { - r0 = rf(ctx, appProject, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.AppProject, v1.UpdateOptions) *v1alpha1.AppProject); ok { + r0 = returnFunc(ctx, appProject, opts) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.AppProject) } } - - if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.AppProject, v1.UpdateOptions) error); ok { - r1 = rf(ctx, appProject, opts) + if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.AppProject, v1.UpdateOptions) error); ok { + r1 = returnFunc(ctx, appProject, opts) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -416,9 +418,9 @@ type AppProjectInterface_Update_Call struct { } // Update is a helper method to define mock.On call -// - ctx context.Context -// - appProject *v1alpha1.AppProject -// - opts v1.UpdateOptions +// - ctx +// - appProject +// - opts func (_e *AppProjectInterface_Expecter) Update(ctx interface{}, appProject interface{}, opts interface{}) *AppProjectInterface_Update_Call { return &AppProjectInterface_Update_Call{Call: _e.mock.On("Update", ctx, appProject, opts)} } @@ -430,19 +432,19 @@ func (_c *AppProjectInterface_Update_Call) Run(run func(ctx context.Context, app return _c } -func (_c *AppProjectInterface_Update_Call) Return(_a0 *v1alpha1.AppProject, _a1 error) *AppProjectInterface_Update_Call { - _c.Call.Return(_a0, _a1) +func (_c *AppProjectInterface_Update_Call) Return(appProject1 *v1alpha1.AppProject, err error) *AppProjectInterface_Update_Call { + _c.Call.Return(appProject1, err) return _c } -func (_c *AppProjectInterface_Update_Call) RunAndReturn(run func(context.Context, *v1alpha1.AppProject, v1.UpdateOptions) (*v1alpha1.AppProject, error)) *AppProjectInterface_Update_Call { +func (_c *AppProjectInterface_Update_Call) RunAndReturn(run func(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.UpdateOptions) (*v1alpha1.AppProject, error)) *AppProjectInterface_Update_Call { _c.Call.Return(run) return _c } -// Watch provides a mock function with given fields: ctx, opts -func (_m *AppProjectInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - ret := _m.Called(ctx, opts) +// Watch provides a mock function for the type AppProjectInterface +func (_mock *AppProjectInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + ret := _mock.Called(ctx, opts) if len(ret) == 0 { panic("no return value specified for Watch") @@ -450,23 +452,21 @@ func (_m *AppProjectInterface) Watch(ctx context.Context, opts v1.ListOptions) ( var r0 watch.Interface var r1 error - if rf, ok := ret.Get(0).(func(context.Context, v1.ListOptions) (watch.Interface, error)); ok { - return rf(ctx, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, v1.ListOptions) (watch.Interface, error)); ok { + return returnFunc(ctx, opts) } - if rf, ok := ret.Get(0).(func(context.Context, v1.ListOptions) watch.Interface); ok { - r0 = rf(ctx, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, v1.ListOptions) watch.Interface); ok { + r0 = returnFunc(ctx, opts) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(watch.Interface) } } - - if rf, ok := ret.Get(1).(func(context.Context, v1.ListOptions) error); ok { - r1 = rf(ctx, opts) + if returnFunc, ok := ret.Get(1).(func(context.Context, v1.ListOptions) error); ok { + r1 = returnFunc(ctx, opts) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -476,8 +476,8 @@ type AppProjectInterface_Watch_Call struct { } // Watch is a helper method to define mock.On call -// - ctx context.Context -// - opts v1.ListOptions +// - ctx +// - opts func (_e *AppProjectInterface_Expecter) Watch(ctx interface{}, opts interface{}) *AppProjectInterface_Watch_Call { return &AppProjectInterface_Watch_Call{Call: _e.mock.On("Watch", ctx, opts)} } @@ -489,26 +489,12 @@ func (_c *AppProjectInterface_Watch_Call) Run(run func(ctx context.Context, opts return _c } -func (_c *AppProjectInterface_Watch_Call) Return(_a0 watch.Interface, _a1 error) *AppProjectInterface_Watch_Call { - _c.Call.Return(_a0, _a1) +func (_c *AppProjectInterface_Watch_Call) Return(interfaceParam watch.Interface, err error) *AppProjectInterface_Watch_Call { + _c.Call.Return(interfaceParam, err) return _c } -func (_c *AppProjectInterface_Watch_Call) RunAndReturn(run func(context.Context, v1.ListOptions) (watch.Interface, error)) *AppProjectInterface_Watch_Call { +func (_c *AppProjectInterface_Watch_Call) RunAndReturn(run func(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)) *AppProjectInterface_Watch_Call { _c.Call.Return(run) return _c } - -// NewAppProjectInterface creates a new instance of AppProjectInterface. 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 NewAppProjectInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *AppProjectInterface { - mock := &AppProjectInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/reposerver/apiclient/mocks/RepoServerServiceClient.go b/reposerver/apiclient/mocks/RepoServerServiceClient.go index 494864b9a65fc..f12c683b3f8dc 100644 --- a/reposerver/apiclient/mocks/RepoServerServiceClient.go +++ b/reposerver/apiclient/mocks/RepoServerServiceClient.go @@ -1,20 +1,32 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - context "context" + "context" - apiclient "github.com/argoproj/argo-cd/v3/reposerver/apiclient" - - emptypb "google.golang.org/protobuf/types/known/emptypb" + "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" + "github.com/argoproj/argo-cd/v3/reposerver/apiclient" + mock "github.com/stretchr/testify/mock" + "google.golang.org/grpc" + "google.golang.org/protobuf/types/known/emptypb" +) - grpc "google.golang.org/grpc" +// NewRepoServerServiceClient creates a new instance of RepoServerServiceClient. 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 NewRepoServerServiceClient(t interface { + mock.TestingT + Cleanup(func()) +}) *RepoServerServiceClient { + mock := &RepoServerServiceClient{} + mock.Mock.Test(t) - mock "github.com/stretchr/testify/mock" + t.Cleanup(func() { mock.AssertExpectations(t) }) - v1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" -) + return mock +} // RepoServerServiceClient is an autogenerated mock type for the RepoServerServiceClient type type RepoServerServiceClient struct { @@ -29,8 +41,9 @@ func (_m *RepoServerServiceClient) EXPECT() *RepoServerServiceClient_Expecter { return &RepoServerServiceClient_Expecter{mock: &_m.Mock} } -// GenerateManifest provides a mock function with given fields: ctx, in, opts -func (_m *RepoServerServiceClient) GenerateManifest(ctx context.Context, in *apiclient.ManifestRequest, opts ...grpc.CallOption) (*apiclient.ManifestResponse, error) { +// GenerateManifest provides a mock function for the type RepoServerServiceClient +func (_mock *RepoServerServiceClient) GenerateManifest(ctx context.Context, in *apiclient.ManifestRequest, opts ...grpc.CallOption) (*apiclient.ManifestResponse, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -38,7 +51,7 @@ func (_m *RepoServerServiceClient) GenerateManifest(ctx context.Context, in *api var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for GenerateManifest") @@ -46,23 +59,21 @@ func (_m *RepoServerServiceClient) GenerateManifest(ctx context.Context, in *api var r0 *apiclient.ManifestResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.ManifestRequest, ...grpc.CallOption) (*apiclient.ManifestResponse, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.ManifestRequest, ...grpc.CallOption) (*apiclient.ManifestResponse, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.ManifestRequest, ...grpc.CallOption) *apiclient.ManifestResponse); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.ManifestRequest, ...grpc.CallOption) *apiclient.ManifestResponse); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*apiclient.ManifestResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *apiclient.ManifestRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *apiclient.ManifestRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -72,9 +83,9 @@ type RepoServerServiceClient_GenerateManifest_Call struct { } // GenerateManifest is a helper method to define mock.On call -// - ctx context.Context -// - in *apiclient.ManifestRequest -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *RepoServerServiceClient_Expecter) GenerateManifest(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_GenerateManifest_Call { return &RepoServerServiceClient_GenerateManifest_Call{Call: _e.mock.On("GenerateManifest", append([]interface{}{ctx, in}, opts...)...)} @@ -93,18 +104,19 @@ func (_c *RepoServerServiceClient_GenerateManifest_Call) Run(run func(ctx contex return _c } -func (_c *RepoServerServiceClient_GenerateManifest_Call) Return(_a0 *apiclient.ManifestResponse, _a1 error) *RepoServerServiceClient_GenerateManifest_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerServiceClient_GenerateManifest_Call) Return(manifestResponse *apiclient.ManifestResponse, err error) *RepoServerServiceClient_GenerateManifest_Call { + _c.Call.Return(manifestResponse, err) return _c } -func (_c *RepoServerServiceClient_GenerateManifest_Call) RunAndReturn(run func(context.Context, *apiclient.ManifestRequest, ...grpc.CallOption) (*apiclient.ManifestResponse, error)) *RepoServerServiceClient_GenerateManifest_Call { +func (_c *RepoServerServiceClient_GenerateManifest_Call) RunAndReturn(run func(ctx context.Context, in *apiclient.ManifestRequest, opts ...grpc.CallOption) (*apiclient.ManifestResponse, error)) *RepoServerServiceClient_GenerateManifest_Call { _c.Call.Return(run) return _c } -// GenerateManifestWithFiles provides a mock function with given fields: ctx, opts -func (_m *RepoServerServiceClient) GenerateManifestWithFiles(ctx context.Context, opts ...grpc.CallOption) (apiclient.RepoServerService_GenerateManifestWithFilesClient, error) { +// GenerateManifestWithFiles provides a mock function for the type RepoServerServiceClient +func (_mock *RepoServerServiceClient) GenerateManifestWithFiles(ctx context.Context, opts ...grpc.CallOption) (apiclient.RepoServerService_GenerateManifestWithFilesClient, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -112,7 +124,7 @@ func (_m *RepoServerServiceClient) GenerateManifestWithFiles(ctx context.Context var _ca []interface{} _ca = append(_ca, ctx) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for GenerateManifestWithFiles") @@ -120,23 +132,21 @@ func (_m *RepoServerServiceClient) GenerateManifestWithFiles(ctx context.Context var r0 apiclient.RepoServerService_GenerateManifestWithFilesClient var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ...grpc.CallOption) (apiclient.RepoServerService_GenerateManifestWithFilesClient, error)); ok { - return rf(ctx, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, ...grpc.CallOption) (apiclient.RepoServerService_GenerateManifestWithFilesClient, error)); ok { + return returnFunc(ctx, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, ...grpc.CallOption) apiclient.RepoServerService_GenerateManifestWithFilesClient); ok { - r0 = rf(ctx, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, ...grpc.CallOption) apiclient.RepoServerService_GenerateManifestWithFilesClient); ok { + r0 = returnFunc(ctx, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(apiclient.RepoServerService_GenerateManifestWithFilesClient) } } - - if rf, ok := ret.Get(1).(func(context.Context, ...grpc.CallOption) error); ok { - r1 = rf(ctx, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -146,8 +156,8 @@ type RepoServerServiceClient_GenerateManifestWithFiles_Call struct { } // GenerateManifestWithFiles is a helper method to define mock.On call -// - ctx context.Context -// - opts ...grpc.CallOption +// - ctx +// - opts func (_e *RepoServerServiceClient_Expecter) GenerateManifestWithFiles(ctx interface{}, opts ...interface{}) *RepoServerServiceClient_GenerateManifestWithFiles_Call { return &RepoServerServiceClient_GenerateManifestWithFiles_Call{Call: _e.mock.On("GenerateManifestWithFiles", append([]interface{}{ctx}, opts...)...)} @@ -166,18 +176,19 @@ func (_c *RepoServerServiceClient_GenerateManifestWithFiles_Call) Run(run func(c return _c } -func (_c *RepoServerServiceClient_GenerateManifestWithFiles_Call) Return(_a0 apiclient.RepoServerService_GenerateManifestWithFilesClient, _a1 error) *RepoServerServiceClient_GenerateManifestWithFiles_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerServiceClient_GenerateManifestWithFiles_Call) Return(repoServerService_GenerateManifestWithFilesClient apiclient.RepoServerService_GenerateManifestWithFilesClient, err error) *RepoServerServiceClient_GenerateManifestWithFiles_Call { + _c.Call.Return(repoServerService_GenerateManifestWithFilesClient, err) return _c } -func (_c *RepoServerServiceClient_GenerateManifestWithFiles_Call) RunAndReturn(run func(context.Context, ...grpc.CallOption) (apiclient.RepoServerService_GenerateManifestWithFilesClient, error)) *RepoServerServiceClient_GenerateManifestWithFiles_Call { +func (_c *RepoServerServiceClient_GenerateManifestWithFiles_Call) RunAndReturn(run func(ctx context.Context, opts ...grpc.CallOption) (apiclient.RepoServerService_GenerateManifestWithFilesClient, error)) *RepoServerServiceClient_GenerateManifestWithFiles_Call { _c.Call.Return(run) return _c } -// GetAppDetails provides a mock function with given fields: ctx, in, opts -func (_m *RepoServerServiceClient) GetAppDetails(ctx context.Context, in *apiclient.RepoServerAppDetailsQuery, opts ...grpc.CallOption) (*apiclient.RepoAppDetailsResponse, error) { +// GetAppDetails provides a mock function for the type RepoServerServiceClient +func (_mock *RepoServerServiceClient) GetAppDetails(ctx context.Context, in *apiclient.RepoServerAppDetailsQuery, opts ...grpc.CallOption) (*apiclient.RepoAppDetailsResponse, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -185,7 +196,7 @@ func (_m *RepoServerServiceClient) GetAppDetails(ctx context.Context, in *apicli var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for GetAppDetails") @@ -193,23 +204,21 @@ func (_m *RepoServerServiceClient) GetAppDetails(ctx context.Context, in *apicli var r0 *apiclient.RepoAppDetailsResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.RepoServerAppDetailsQuery, ...grpc.CallOption) (*apiclient.RepoAppDetailsResponse, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.RepoServerAppDetailsQuery, ...grpc.CallOption) (*apiclient.RepoAppDetailsResponse, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.RepoServerAppDetailsQuery, ...grpc.CallOption) *apiclient.RepoAppDetailsResponse); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.RepoServerAppDetailsQuery, ...grpc.CallOption) *apiclient.RepoAppDetailsResponse); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*apiclient.RepoAppDetailsResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *apiclient.RepoServerAppDetailsQuery, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *apiclient.RepoServerAppDetailsQuery, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -219,9 +228,9 @@ type RepoServerServiceClient_GetAppDetails_Call struct { } // GetAppDetails is a helper method to define mock.On call -// - ctx context.Context -// - in *apiclient.RepoServerAppDetailsQuery -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *RepoServerServiceClient_Expecter) GetAppDetails(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_GetAppDetails_Call { return &RepoServerServiceClient_GetAppDetails_Call{Call: _e.mock.On("GetAppDetails", append([]interface{}{ctx, in}, opts...)...)} @@ -240,18 +249,19 @@ func (_c *RepoServerServiceClient_GetAppDetails_Call) Run(run func(ctx context.C return _c } -func (_c *RepoServerServiceClient_GetAppDetails_Call) Return(_a0 *apiclient.RepoAppDetailsResponse, _a1 error) *RepoServerServiceClient_GetAppDetails_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerServiceClient_GetAppDetails_Call) Return(repoAppDetailsResponse *apiclient.RepoAppDetailsResponse, err error) *RepoServerServiceClient_GetAppDetails_Call { + _c.Call.Return(repoAppDetailsResponse, err) return _c } -func (_c *RepoServerServiceClient_GetAppDetails_Call) RunAndReturn(run func(context.Context, *apiclient.RepoServerAppDetailsQuery, ...grpc.CallOption) (*apiclient.RepoAppDetailsResponse, error)) *RepoServerServiceClient_GetAppDetails_Call { +func (_c *RepoServerServiceClient_GetAppDetails_Call) RunAndReturn(run func(ctx context.Context, in *apiclient.RepoServerAppDetailsQuery, opts ...grpc.CallOption) (*apiclient.RepoAppDetailsResponse, error)) *RepoServerServiceClient_GetAppDetails_Call { _c.Call.Return(run) return _c } -// GetGitDirectories provides a mock function with given fields: ctx, in, opts -func (_m *RepoServerServiceClient) GetGitDirectories(ctx context.Context, in *apiclient.GitDirectoriesRequest, opts ...grpc.CallOption) (*apiclient.GitDirectoriesResponse, error) { +// GetGitDirectories provides a mock function for the type RepoServerServiceClient +func (_mock *RepoServerServiceClient) GetGitDirectories(ctx context.Context, in *apiclient.GitDirectoriesRequest, opts ...grpc.CallOption) (*apiclient.GitDirectoriesResponse, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -259,7 +269,7 @@ func (_m *RepoServerServiceClient) GetGitDirectories(ctx context.Context, in *ap var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for GetGitDirectories") @@ -267,23 +277,21 @@ func (_m *RepoServerServiceClient) GetGitDirectories(ctx context.Context, in *ap var r0 *apiclient.GitDirectoriesResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.GitDirectoriesRequest, ...grpc.CallOption) (*apiclient.GitDirectoriesResponse, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.GitDirectoriesRequest, ...grpc.CallOption) (*apiclient.GitDirectoriesResponse, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.GitDirectoriesRequest, ...grpc.CallOption) *apiclient.GitDirectoriesResponse); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.GitDirectoriesRequest, ...grpc.CallOption) *apiclient.GitDirectoriesResponse); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*apiclient.GitDirectoriesResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *apiclient.GitDirectoriesRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *apiclient.GitDirectoriesRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -293,9 +301,9 @@ type RepoServerServiceClient_GetGitDirectories_Call struct { } // GetGitDirectories is a helper method to define mock.On call -// - ctx context.Context -// - in *apiclient.GitDirectoriesRequest -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *RepoServerServiceClient_Expecter) GetGitDirectories(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_GetGitDirectories_Call { return &RepoServerServiceClient_GetGitDirectories_Call{Call: _e.mock.On("GetGitDirectories", append([]interface{}{ctx, in}, opts...)...)} @@ -314,18 +322,19 @@ func (_c *RepoServerServiceClient_GetGitDirectories_Call) Run(run func(ctx conte return _c } -func (_c *RepoServerServiceClient_GetGitDirectories_Call) Return(_a0 *apiclient.GitDirectoriesResponse, _a1 error) *RepoServerServiceClient_GetGitDirectories_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerServiceClient_GetGitDirectories_Call) Return(gitDirectoriesResponse *apiclient.GitDirectoriesResponse, err error) *RepoServerServiceClient_GetGitDirectories_Call { + _c.Call.Return(gitDirectoriesResponse, err) return _c } -func (_c *RepoServerServiceClient_GetGitDirectories_Call) RunAndReturn(run func(context.Context, *apiclient.GitDirectoriesRequest, ...grpc.CallOption) (*apiclient.GitDirectoriesResponse, error)) *RepoServerServiceClient_GetGitDirectories_Call { +func (_c *RepoServerServiceClient_GetGitDirectories_Call) RunAndReturn(run func(ctx context.Context, in *apiclient.GitDirectoriesRequest, opts ...grpc.CallOption) (*apiclient.GitDirectoriesResponse, error)) *RepoServerServiceClient_GetGitDirectories_Call { _c.Call.Return(run) return _c } -// GetGitFiles provides a mock function with given fields: ctx, in, opts -func (_m *RepoServerServiceClient) GetGitFiles(ctx context.Context, in *apiclient.GitFilesRequest, opts ...grpc.CallOption) (*apiclient.GitFilesResponse, error) { +// GetGitFiles provides a mock function for the type RepoServerServiceClient +func (_mock *RepoServerServiceClient) GetGitFiles(ctx context.Context, in *apiclient.GitFilesRequest, opts ...grpc.CallOption) (*apiclient.GitFilesResponse, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -333,7 +342,7 @@ func (_m *RepoServerServiceClient) GetGitFiles(ctx context.Context, in *apiclien var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for GetGitFiles") @@ -341,23 +350,21 @@ func (_m *RepoServerServiceClient) GetGitFiles(ctx context.Context, in *apiclien var r0 *apiclient.GitFilesResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.GitFilesRequest, ...grpc.CallOption) (*apiclient.GitFilesResponse, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.GitFilesRequest, ...grpc.CallOption) (*apiclient.GitFilesResponse, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.GitFilesRequest, ...grpc.CallOption) *apiclient.GitFilesResponse); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.GitFilesRequest, ...grpc.CallOption) *apiclient.GitFilesResponse); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*apiclient.GitFilesResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *apiclient.GitFilesRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *apiclient.GitFilesRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -367,9 +374,9 @@ type RepoServerServiceClient_GetGitFiles_Call struct { } // GetGitFiles is a helper method to define mock.On call -// - ctx context.Context -// - in *apiclient.GitFilesRequest -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *RepoServerServiceClient_Expecter) GetGitFiles(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_GetGitFiles_Call { return &RepoServerServiceClient_GetGitFiles_Call{Call: _e.mock.On("GetGitFiles", append([]interface{}{ctx, in}, opts...)...)} @@ -388,18 +395,19 @@ func (_c *RepoServerServiceClient_GetGitFiles_Call) Run(run func(ctx context.Con return _c } -func (_c *RepoServerServiceClient_GetGitFiles_Call) Return(_a0 *apiclient.GitFilesResponse, _a1 error) *RepoServerServiceClient_GetGitFiles_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerServiceClient_GetGitFiles_Call) Return(gitFilesResponse *apiclient.GitFilesResponse, err error) *RepoServerServiceClient_GetGitFiles_Call { + _c.Call.Return(gitFilesResponse, err) return _c } -func (_c *RepoServerServiceClient_GetGitFiles_Call) RunAndReturn(run func(context.Context, *apiclient.GitFilesRequest, ...grpc.CallOption) (*apiclient.GitFilesResponse, error)) *RepoServerServiceClient_GetGitFiles_Call { +func (_c *RepoServerServiceClient_GetGitFiles_Call) RunAndReturn(run func(ctx context.Context, in *apiclient.GitFilesRequest, opts ...grpc.CallOption) (*apiclient.GitFilesResponse, error)) *RepoServerServiceClient_GetGitFiles_Call { _c.Call.Return(run) return _c } -// GetHelmCharts provides a mock function with given fields: ctx, in, opts -func (_m *RepoServerServiceClient) GetHelmCharts(ctx context.Context, in *apiclient.HelmChartsRequest, opts ...grpc.CallOption) (*apiclient.HelmChartsResponse, error) { +// GetHelmCharts provides a mock function for the type RepoServerServiceClient +func (_mock *RepoServerServiceClient) GetHelmCharts(ctx context.Context, in *apiclient.HelmChartsRequest, opts ...grpc.CallOption) (*apiclient.HelmChartsResponse, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -407,7 +415,7 @@ func (_m *RepoServerServiceClient) GetHelmCharts(ctx context.Context, in *apicli var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for GetHelmCharts") @@ -415,23 +423,21 @@ func (_m *RepoServerServiceClient) GetHelmCharts(ctx context.Context, in *apicli var r0 *apiclient.HelmChartsResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.HelmChartsRequest, ...grpc.CallOption) (*apiclient.HelmChartsResponse, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.HelmChartsRequest, ...grpc.CallOption) (*apiclient.HelmChartsResponse, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.HelmChartsRequest, ...grpc.CallOption) *apiclient.HelmChartsResponse); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.HelmChartsRequest, ...grpc.CallOption) *apiclient.HelmChartsResponse); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*apiclient.HelmChartsResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *apiclient.HelmChartsRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *apiclient.HelmChartsRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -441,9 +447,9 @@ type RepoServerServiceClient_GetHelmCharts_Call struct { } // GetHelmCharts is a helper method to define mock.On call -// - ctx context.Context -// - in *apiclient.HelmChartsRequest -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *RepoServerServiceClient_Expecter) GetHelmCharts(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_GetHelmCharts_Call { return &RepoServerServiceClient_GetHelmCharts_Call{Call: _e.mock.On("GetHelmCharts", append([]interface{}{ctx, in}, opts...)...)} @@ -462,18 +468,19 @@ func (_c *RepoServerServiceClient_GetHelmCharts_Call) Run(run func(ctx context.C return _c } -func (_c *RepoServerServiceClient_GetHelmCharts_Call) Return(_a0 *apiclient.HelmChartsResponse, _a1 error) *RepoServerServiceClient_GetHelmCharts_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerServiceClient_GetHelmCharts_Call) Return(helmChartsResponse *apiclient.HelmChartsResponse, err error) *RepoServerServiceClient_GetHelmCharts_Call { + _c.Call.Return(helmChartsResponse, err) return _c } -func (_c *RepoServerServiceClient_GetHelmCharts_Call) RunAndReturn(run func(context.Context, *apiclient.HelmChartsRequest, ...grpc.CallOption) (*apiclient.HelmChartsResponse, error)) *RepoServerServiceClient_GetHelmCharts_Call { +func (_c *RepoServerServiceClient_GetHelmCharts_Call) RunAndReturn(run func(ctx context.Context, in *apiclient.HelmChartsRequest, opts ...grpc.CallOption) (*apiclient.HelmChartsResponse, error)) *RepoServerServiceClient_GetHelmCharts_Call { _c.Call.Return(run) return _c } -// GetRevisionChartDetails provides a mock function with given fields: ctx, in, opts -func (_m *RepoServerServiceClient) GetRevisionChartDetails(ctx context.Context, in *apiclient.RepoServerRevisionChartDetailsRequest, opts ...grpc.CallOption) (*v1alpha1.ChartDetails, error) { +// GetRevisionChartDetails provides a mock function for the type RepoServerServiceClient +func (_mock *RepoServerServiceClient) GetRevisionChartDetails(ctx context.Context, in *apiclient.RepoServerRevisionChartDetailsRequest, opts ...grpc.CallOption) (*v1alpha1.ChartDetails, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -481,7 +488,7 @@ func (_m *RepoServerServiceClient) GetRevisionChartDetails(ctx context.Context, var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for GetRevisionChartDetails") @@ -489,23 +496,21 @@ func (_m *RepoServerServiceClient) GetRevisionChartDetails(ctx context.Context, var r0 *v1alpha1.ChartDetails var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.RepoServerRevisionChartDetailsRequest, ...grpc.CallOption) (*v1alpha1.ChartDetails, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.RepoServerRevisionChartDetailsRequest, ...grpc.CallOption) (*v1alpha1.ChartDetails, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.RepoServerRevisionChartDetailsRequest, ...grpc.CallOption) *v1alpha1.ChartDetails); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.RepoServerRevisionChartDetailsRequest, ...grpc.CallOption) *v1alpha1.ChartDetails); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.ChartDetails) } } - - if rf, ok := ret.Get(1).(func(context.Context, *apiclient.RepoServerRevisionChartDetailsRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *apiclient.RepoServerRevisionChartDetailsRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -515,9 +520,9 @@ type RepoServerServiceClient_GetRevisionChartDetails_Call struct { } // GetRevisionChartDetails is a helper method to define mock.On call -// - ctx context.Context -// - in *apiclient.RepoServerRevisionChartDetailsRequest -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *RepoServerServiceClient_Expecter) GetRevisionChartDetails(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_GetRevisionChartDetails_Call { return &RepoServerServiceClient_GetRevisionChartDetails_Call{Call: _e.mock.On("GetRevisionChartDetails", append([]interface{}{ctx, in}, opts...)...)} @@ -536,18 +541,19 @@ func (_c *RepoServerServiceClient_GetRevisionChartDetails_Call) Run(run func(ctx return _c } -func (_c *RepoServerServiceClient_GetRevisionChartDetails_Call) Return(_a0 *v1alpha1.ChartDetails, _a1 error) *RepoServerServiceClient_GetRevisionChartDetails_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerServiceClient_GetRevisionChartDetails_Call) Return(chartDetails *v1alpha1.ChartDetails, err error) *RepoServerServiceClient_GetRevisionChartDetails_Call { + _c.Call.Return(chartDetails, err) return _c } -func (_c *RepoServerServiceClient_GetRevisionChartDetails_Call) RunAndReturn(run func(context.Context, *apiclient.RepoServerRevisionChartDetailsRequest, ...grpc.CallOption) (*v1alpha1.ChartDetails, error)) *RepoServerServiceClient_GetRevisionChartDetails_Call { +func (_c *RepoServerServiceClient_GetRevisionChartDetails_Call) RunAndReturn(run func(ctx context.Context, in *apiclient.RepoServerRevisionChartDetailsRequest, opts ...grpc.CallOption) (*v1alpha1.ChartDetails, error)) *RepoServerServiceClient_GetRevisionChartDetails_Call { _c.Call.Return(run) return _c } -// GetRevisionMetadata provides a mock function with given fields: ctx, in, opts -func (_m *RepoServerServiceClient) GetRevisionMetadata(ctx context.Context, in *apiclient.RepoServerRevisionMetadataRequest, opts ...grpc.CallOption) (*v1alpha1.RevisionMetadata, error) { +// GetRevisionMetadata provides a mock function for the type RepoServerServiceClient +func (_mock *RepoServerServiceClient) GetRevisionMetadata(ctx context.Context, in *apiclient.RepoServerRevisionMetadataRequest, opts ...grpc.CallOption) (*v1alpha1.RevisionMetadata, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -555,7 +561,7 @@ func (_m *RepoServerServiceClient) GetRevisionMetadata(ctx context.Context, in * var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for GetRevisionMetadata") @@ -563,23 +569,21 @@ func (_m *RepoServerServiceClient) GetRevisionMetadata(ctx context.Context, in * var r0 *v1alpha1.RevisionMetadata var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.RepoServerRevisionMetadataRequest, ...grpc.CallOption) (*v1alpha1.RevisionMetadata, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.RepoServerRevisionMetadataRequest, ...grpc.CallOption) (*v1alpha1.RevisionMetadata, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.RepoServerRevisionMetadataRequest, ...grpc.CallOption) *v1alpha1.RevisionMetadata); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.RepoServerRevisionMetadataRequest, ...grpc.CallOption) *v1alpha1.RevisionMetadata); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.RevisionMetadata) } } - - if rf, ok := ret.Get(1).(func(context.Context, *apiclient.RepoServerRevisionMetadataRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *apiclient.RepoServerRevisionMetadataRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -589,9 +593,9 @@ type RepoServerServiceClient_GetRevisionMetadata_Call struct { } // GetRevisionMetadata is a helper method to define mock.On call -// - ctx context.Context -// - in *apiclient.RepoServerRevisionMetadataRequest -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *RepoServerServiceClient_Expecter) GetRevisionMetadata(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_GetRevisionMetadata_Call { return &RepoServerServiceClient_GetRevisionMetadata_Call{Call: _e.mock.On("GetRevisionMetadata", append([]interface{}{ctx, in}, opts...)...)} @@ -610,18 +614,19 @@ func (_c *RepoServerServiceClient_GetRevisionMetadata_Call) Run(run func(ctx con return _c } -func (_c *RepoServerServiceClient_GetRevisionMetadata_Call) Return(_a0 *v1alpha1.RevisionMetadata, _a1 error) *RepoServerServiceClient_GetRevisionMetadata_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerServiceClient_GetRevisionMetadata_Call) Return(revisionMetadata *v1alpha1.RevisionMetadata, err error) *RepoServerServiceClient_GetRevisionMetadata_Call { + _c.Call.Return(revisionMetadata, err) return _c } -func (_c *RepoServerServiceClient_GetRevisionMetadata_Call) RunAndReturn(run func(context.Context, *apiclient.RepoServerRevisionMetadataRequest, ...grpc.CallOption) (*v1alpha1.RevisionMetadata, error)) *RepoServerServiceClient_GetRevisionMetadata_Call { +func (_c *RepoServerServiceClient_GetRevisionMetadata_Call) RunAndReturn(run func(ctx context.Context, in *apiclient.RepoServerRevisionMetadataRequest, opts ...grpc.CallOption) (*v1alpha1.RevisionMetadata, error)) *RepoServerServiceClient_GetRevisionMetadata_Call { _c.Call.Return(run) return _c } -// ListApps provides a mock function with given fields: ctx, in, opts -func (_m *RepoServerServiceClient) ListApps(ctx context.Context, in *apiclient.ListAppsRequest, opts ...grpc.CallOption) (*apiclient.AppList, error) { +// ListApps provides a mock function for the type RepoServerServiceClient +func (_mock *RepoServerServiceClient) ListApps(ctx context.Context, in *apiclient.ListAppsRequest, opts ...grpc.CallOption) (*apiclient.AppList, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -629,7 +634,7 @@ func (_m *RepoServerServiceClient) ListApps(ctx context.Context, in *apiclient.L var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for ListApps") @@ -637,23 +642,21 @@ func (_m *RepoServerServiceClient) ListApps(ctx context.Context, in *apiclient.L var r0 *apiclient.AppList var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.ListAppsRequest, ...grpc.CallOption) (*apiclient.AppList, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.ListAppsRequest, ...grpc.CallOption) (*apiclient.AppList, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.ListAppsRequest, ...grpc.CallOption) *apiclient.AppList); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.ListAppsRequest, ...grpc.CallOption) *apiclient.AppList); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*apiclient.AppList) } } - - if rf, ok := ret.Get(1).(func(context.Context, *apiclient.ListAppsRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *apiclient.ListAppsRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -663,9 +666,9 @@ type RepoServerServiceClient_ListApps_Call struct { } // ListApps is a helper method to define mock.On call -// - ctx context.Context -// - in *apiclient.ListAppsRequest -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *RepoServerServiceClient_Expecter) ListApps(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_ListApps_Call { return &RepoServerServiceClient_ListApps_Call{Call: _e.mock.On("ListApps", append([]interface{}{ctx, in}, opts...)...)} @@ -684,18 +687,19 @@ func (_c *RepoServerServiceClient_ListApps_Call) Run(run func(ctx context.Contex return _c } -func (_c *RepoServerServiceClient_ListApps_Call) Return(_a0 *apiclient.AppList, _a1 error) *RepoServerServiceClient_ListApps_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerServiceClient_ListApps_Call) Return(appList *apiclient.AppList, err error) *RepoServerServiceClient_ListApps_Call { + _c.Call.Return(appList, err) return _c } -func (_c *RepoServerServiceClient_ListApps_Call) RunAndReturn(run func(context.Context, *apiclient.ListAppsRequest, ...grpc.CallOption) (*apiclient.AppList, error)) *RepoServerServiceClient_ListApps_Call { +func (_c *RepoServerServiceClient_ListApps_Call) RunAndReturn(run func(ctx context.Context, in *apiclient.ListAppsRequest, opts ...grpc.CallOption) (*apiclient.AppList, error)) *RepoServerServiceClient_ListApps_Call { _c.Call.Return(run) return _c } -// ListPlugins provides a mock function with given fields: ctx, in, opts -func (_m *RepoServerServiceClient) ListPlugins(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*apiclient.PluginList, error) { +// ListPlugins provides a mock function for the type RepoServerServiceClient +func (_mock *RepoServerServiceClient) ListPlugins(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*apiclient.PluginList, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -703,7 +707,7 @@ func (_m *RepoServerServiceClient) ListPlugins(ctx context.Context, in *emptypb. var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for ListPlugins") @@ -711,23 +715,21 @@ func (_m *RepoServerServiceClient) ListPlugins(ctx context.Context, in *emptypb. var r0 *apiclient.PluginList var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *emptypb.Empty, ...grpc.CallOption) (*apiclient.PluginList, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *emptypb.Empty, ...grpc.CallOption) (*apiclient.PluginList, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *emptypb.Empty, ...grpc.CallOption) *apiclient.PluginList); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *emptypb.Empty, ...grpc.CallOption) *apiclient.PluginList); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*apiclient.PluginList) } } - - if rf, ok := ret.Get(1).(func(context.Context, *emptypb.Empty, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *emptypb.Empty, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -737,9 +739,9 @@ type RepoServerServiceClient_ListPlugins_Call struct { } // ListPlugins is a helper method to define mock.On call -// - ctx context.Context -// - in *emptypb.Empty -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *RepoServerServiceClient_Expecter) ListPlugins(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_ListPlugins_Call { return &RepoServerServiceClient_ListPlugins_Call{Call: _e.mock.On("ListPlugins", append([]interface{}{ctx, in}, opts...)...)} @@ -758,18 +760,19 @@ func (_c *RepoServerServiceClient_ListPlugins_Call) Run(run func(ctx context.Con return _c } -func (_c *RepoServerServiceClient_ListPlugins_Call) Return(_a0 *apiclient.PluginList, _a1 error) *RepoServerServiceClient_ListPlugins_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerServiceClient_ListPlugins_Call) Return(pluginList *apiclient.PluginList, err error) *RepoServerServiceClient_ListPlugins_Call { + _c.Call.Return(pluginList, err) return _c } -func (_c *RepoServerServiceClient_ListPlugins_Call) RunAndReturn(run func(context.Context, *emptypb.Empty, ...grpc.CallOption) (*apiclient.PluginList, error)) *RepoServerServiceClient_ListPlugins_Call { +func (_c *RepoServerServiceClient_ListPlugins_Call) RunAndReturn(run func(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*apiclient.PluginList, error)) *RepoServerServiceClient_ListPlugins_Call { _c.Call.Return(run) return _c } -// ListRefs provides a mock function with given fields: ctx, in, opts -func (_m *RepoServerServiceClient) ListRefs(ctx context.Context, in *apiclient.ListRefsRequest, opts ...grpc.CallOption) (*apiclient.Refs, error) { +// ListRefs provides a mock function for the type RepoServerServiceClient +func (_mock *RepoServerServiceClient) ListRefs(ctx context.Context, in *apiclient.ListRefsRequest, opts ...grpc.CallOption) (*apiclient.Refs, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -777,7 +780,7 @@ func (_m *RepoServerServiceClient) ListRefs(ctx context.Context, in *apiclient.L var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for ListRefs") @@ -785,23 +788,21 @@ func (_m *RepoServerServiceClient) ListRefs(ctx context.Context, in *apiclient.L var r0 *apiclient.Refs var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.ListRefsRequest, ...grpc.CallOption) (*apiclient.Refs, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.ListRefsRequest, ...grpc.CallOption) (*apiclient.Refs, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.ListRefsRequest, ...grpc.CallOption) *apiclient.Refs); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.ListRefsRequest, ...grpc.CallOption) *apiclient.Refs); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*apiclient.Refs) } } - - if rf, ok := ret.Get(1).(func(context.Context, *apiclient.ListRefsRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *apiclient.ListRefsRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -811,9 +812,9 @@ type RepoServerServiceClient_ListRefs_Call struct { } // ListRefs is a helper method to define mock.On call -// - ctx context.Context -// - in *apiclient.ListRefsRequest -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *RepoServerServiceClient_Expecter) ListRefs(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_ListRefs_Call { return &RepoServerServiceClient_ListRefs_Call{Call: _e.mock.On("ListRefs", append([]interface{}{ctx, in}, opts...)...)} @@ -832,18 +833,19 @@ func (_c *RepoServerServiceClient_ListRefs_Call) Run(run func(ctx context.Contex return _c } -func (_c *RepoServerServiceClient_ListRefs_Call) Return(_a0 *apiclient.Refs, _a1 error) *RepoServerServiceClient_ListRefs_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerServiceClient_ListRefs_Call) Return(refs *apiclient.Refs, err error) *RepoServerServiceClient_ListRefs_Call { + _c.Call.Return(refs, err) return _c } -func (_c *RepoServerServiceClient_ListRefs_Call) RunAndReturn(run func(context.Context, *apiclient.ListRefsRequest, ...grpc.CallOption) (*apiclient.Refs, error)) *RepoServerServiceClient_ListRefs_Call { +func (_c *RepoServerServiceClient_ListRefs_Call) RunAndReturn(run func(ctx context.Context, in *apiclient.ListRefsRequest, opts ...grpc.CallOption) (*apiclient.Refs, error)) *RepoServerServiceClient_ListRefs_Call { _c.Call.Return(run) return _c } -// ResolveRevision provides a mock function with given fields: ctx, in, opts -func (_m *RepoServerServiceClient) ResolveRevision(ctx context.Context, in *apiclient.ResolveRevisionRequest, opts ...grpc.CallOption) (*apiclient.ResolveRevisionResponse, error) { +// ResolveRevision provides a mock function for the type RepoServerServiceClient +func (_mock *RepoServerServiceClient) ResolveRevision(ctx context.Context, in *apiclient.ResolveRevisionRequest, opts ...grpc.CallOption) (*apiclient.ResolveRevisionResponse, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -851,7 +853,7 @@ func (_m *RepoServerServiceClient) ResolveRevision(ctx context.Context, in *apic var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for ResolveRevision") @@ -859,23 +861,21 @@ func (_m *RepoServerServiceClient) ResolveRevision(ctx context.Context, in *apic var r0 *apiclient.ResolveRevisionResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.ResolveRevisionRequest, ...grpc.CallOption) (*apiclient.ResolveRevisionResponse, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.ResolveRevisionRequest, ...grpc.CallOption) (*apiclient.ResolveRevisionResponse, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.ResolveRevisionRequest, ...grpc.CallOption) *apiclient.ResolveRevisionResponse); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.ResolveRevisionRequest, ...grpc.CallOption) *apiclient.ResolveRevisionResponse); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*apiclient.ResolveRevisionResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *apiclient.ResolveRevisionRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *apiclient.ResolveRevisionRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -885,9 +885,9 @@ type RepoServerServiceClient_ResolveRevision_Call struct { } // ResolveRevision is a helper method to define mock.On call -// - ctx context.Context -// - in *apiclient.ResolveRevisionRequest -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *RepoServerServiceClient_Expecter) ResolveRevision(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_ResolveRevision_Call { return &RepoServerServiceClient_ResolveRevision_Call{Call: _e.mock.On("ResolveRevision", append([]interface{}{ctx, in}, opts...)...)} @@ -906,18 +906,19 @@ func (_c *RepoServerServiceClient_ResolveRevision_Call) Run(run func(ctx context return _c } -func (_c *RepoServerServiceClient_ResolveRevision_Call) Return(_a0 *apiclient.ResolveRevisionResponse, _a1 error) *RepoServerServiceClient_ResolveRevision_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerServiceClient_ResolveRevision_Call) Return(resolveRevisionResponse *apiclient.ResolveRevisionResponse, err error) *RepoServerServiceClient_ResolveRevision_Call { + _c.Call.Return(resolveRevisionResponse, err) return _c } -func (_c *RepoServerServiceClient_ResolveRevision_Call) RunAndReturn(run func(context.Context, *apiclient.ResolveRevisionRequest, ...grpc.CallOption) (*apiclient.ResolveRevisionResponse, error)) *RepoServerServiceClient_ResolveRevision_Call { +func (_c *RepoServerServiceClient_ResolveRevision_Call) RunAndReturn(run func(ctx context.Context, in *apiclient.ResolveRevisionRequest, opts ...grpc.CallOption) (*apiclient.ResolveRevisionResponse, error)) *RepoServerServiceClient_ResolveRevision_Call { _c.Call.Return(run) return _c } -// TestRepository provides a mock function with given fields: ctx, in, opts -func (_m *RepoServerServiceClient) TestRepository(ctx context.Context, in *apiclient.TestRepositoryRequest, opts ...grpc.CallOption) (*apiclient.TestRepositoryResponse, error) { +// TestRepository provides a mock function for the type RepoServerServiceClient +func (_mock *RepoServerServiceClient) TestRepository(ctx context.Context, in *apiclient.TestRepositoryRequest, opts ...grpc.CallOption) (*apiclient.TestRepositoryResponse, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -925,7 +926,7 @@ func (_m *RepoServerServiceClient) TestRepository(ctx context.Context, in *apicl var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for TestRepository") @@ -933,23 +934,21 @@ func (_m *RepoServerServiceClient) TestRepository(ctx context.Context, in *apicl var r0 *apiclient.TestRepositoryResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.TestRepositoryRequest, ...grpc.CallOption) (*apiclient.TestRepositoryResponse, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.TestRepositoryRequest, ...grpc.CallOption) (*apiclient.TestRepositoryResponse, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.TestRepositoryRequest, ...grpc.CallOption) *apiclient.TestRepositoryResponse); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.TestRepositoryRequest, ...grpc.CallOption) *apiclient.TestRepositoryResponse); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*apiclient.TestRepositoryResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *apiclient.TestRepositoryRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *apiclient.TestRepositoryRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -959,9 +958,9 @@ type RepoServerServiceClient_TestRepository_Call struct { } // TestRepository is a helper method to define mock.On call -// - ctx context.Context -// - in *apiclient.TestRepositoryRequest -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *RepoServerServiceClient_Expecter) TestRepository(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_TestRepository_Call { return &RepoServerServiceClient_TestRepository_Call{Call: _e.mock.On("TestRepository", append([]interface{}{ctx, in}, opts...)...)} @@ -980,18 +979,19 @@ func (_c *RepoServerServiceClient_TestRepository_Call) Run(run func(ctx context. return _c } -func (_c *RepoServerServiceClient_TestRepository_Call) Return(_a0 *apiclient.TestRepositoryResponse, _a1 error) *RepoServerServiceClient_TestRepository_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerServiceClient_TestRepository_Call) Return(testRepositoryResponse *apiclient.TestRepositoryResponse, err error) *RepoServerServiceClient_TestRepository_Call { + _c.Call.Return(testRepositoryResponse, err) return _c } -func (_c *RepoServerServiceClient_TestRepository_Call) RunAndReturn(run func(context.Context, *apiclient.TestRepositoryRequest, ...grpc.CallOption) (*apiclient.TestRepositoryResponse, error)) *RepoServerServiceClient_TestRepository_Call { +func (_c *RepoServerServiceClient_TestRepository_Call) RunAndReturn(run func(ctx context.Context, in *apiclient.TestRepositoryRequest, opts ...grpc.CallOption) (*apiclient.TestRepositoryResponse, error)) *RepoServerServiceClient_TestRepository_Call { _c.Call.Return(run) return _c } -// UpdateRevisionForPaths provides a mock function with given fields: ctx, in, opts -func (_m *RepoServerServiceClient) UpdateRevisionForPaths(ctx context.Context, in *apiclient.UpdateRevisionForPathsRequest, opts ...grpc.CallOption) (*apiclient.UpdateRevisionForPathsResponse, error) { +// UpdateRevisionForPaths provides a mock function for the type RepoServerServiceClient +func (_mock *RepoServerServiceClient) UpdateRevisionForPaths(ctx context.Context, in *apiclient.UpdateRevisionForPathsRequest, opts ...grpc.CallOption) (*apiclient.UpdateRevisionForPathsResponse, error) { + // grpc.CallOption _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -999,7 +999,7 @@ func (_m *RepoServerServiceClient) UpdateRevisionForPaths(ctx context.Context, i var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for UpdateRevisionForPaths") @@ -1007,23 +1007,21 @@ func (_m *RepoServerServiceClient) UpdateRevisionForPaths(ctx context.Context, i var r0 *apiclient.UpdateRevisionForPathsResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.UpdateRevisionForPathsRequest, ...grpc.CallOption) (*apiclient.UpdateRevisionForPathsResponse, error)); ok { - return rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.UpdateRevisionForPathsRequest, ...grpc.CallOption) (*apiclient.UpdateRevisionForPathsResponse, error)); ok { + return returnFunc(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *apiclient.UpdateRevisionForPathsRequest, ...grpc.CallOption) *apiclient.UpdateRevisionForPathsResponse); ok { - r0 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(0).(func(context.Context, *apiclient.UpdateRevisionForPathsRequest, ...grpc.CallOption) *apiclient.UpdateRevisionForPathsResponse); ok { + r0 = returnFunc(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*apiclient.UpdateRevisionForPathsResponse) } } - - if rf, ok := ret.Get(1).(func(context.Context, *apiclient.UpdateRevisionForPathsRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) + if returnFunc, ok := ret.Get(1).(func(context.Context, *apiclient.UpdateRevisionForPathsRequest, ...grpc.CallOption) error); ok { + r1 = returnFunc(ctx, in, opts...) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1033,9 +1031,9 @@ type RepoServerServiceClient_UpdateRevisionForPaths_Call struct { } // UpdateRevisionForPaths is a helper method to define mock.On call -// - ctx context.Context -// - in *apiclient.UpdateRevisionForPathsRequest -// - opts ...grpc.CallOption +// - ctx +// - in +// - opts func (_e *RepoServerServiceClient_Expecter) UpdateRevisionForPaths(ctx interface{}, in interface{}, opts ...interface{}) *RepoServerServiceClient_UpdateRevisionForPaths_Call { return &RepoServerServiceClient_UpdateRevisionForPaths_Call{Call: _e.mock.On("UpdateRevisionForPaths", append([]interface{}{ctx, in}, opts...)...)} @@ -1054,26 +1052,12 @@ func (_c *RepoServerServiceClient_UpdateRevisionForPaths_Call) Run(run func(ctx return _c } -func (_c *RepoServerServiceClient_UpdateRevisionForPaths_Call) Return(_a0 *apiclient.UpdateRevisionForPathsResponse, _a1 error) *RepoServerServiceClient_UpdateRevisionForPaths_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerServiceClient_UpdateRevisionForPaths_Call) Return(updateRevisionForPathsResponse *apiclient.UpdateRevisionForPathsResponse, err error) *RepoServerServiceClient_UpdateRevisionForPaths_Call { + _c.Call.Return(updateRevisionForPathsResponse, err) return _c } -func (_c *RepoServerServiceClient_UpdateRevisionForPaths_Call) RunAndReturn(run func(context.Context, *apiclient.UpdateRevisionForPathsRequest, ...grpc.CallOption) (*apiclient.UpdateRevisionForPathsResponse, error)) *RepoServerServiceClient_UpdateRevisionForPaths_Call { +func (_c *RepoServerServiceClient_UpdateRevisionForPaths_Call) RunAndReturn(run func(ctx context.Context, in *apiclient.UpdateRevisionForPathsRequest, opts ...grpc.CallOption) (*apiclient.UpdateRevisionForPathsResponse, error)) *RepoServerServiceClient_UpdateRevisionForPaths_Call { _c.Call.Return(run) return _c } - -// NewRepoServerServiceClient creates a new instance of RepoServerServiceClient. 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 NewRepoServerServiceClient(t interface { - mock.TestingT - Cleanup(func()) -}) *RepoServerServiceClient { - mock := &RepoServerServiceClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/reposerver/apiclient/mocks/RepoServerService_GenerateManifestWithFilesClient.go b/reposerver/apiclient/mocks/RepoServerService_GenerateManifestWithFilesClient.go index 70ce4bb3319d3..5e6a0daba2ae9 100644 --- a/reposerver/apiclient/mocks/RepoServerService_GenerateManifestWithFilesClient.go +++ b/reposerver/apiclient/mocks/RepoServerService_GenerateManifestWithFilesClient.go @@ -1,17 +1,31 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - context "context" - - apiclient "github.com/argoproj/argo-cd/v3/reposerver/apiclient" - - metadata "google.golang.org/grpc/metadata" + "context" + "github.com/argoproj/argo-cd/v3/reposerver/apiclient" mock "github.com/stretchr/testify/mock" + "google.golang.org/grpc/metadata" ) +// NewRepoServerService_GenerateManifestWithFilesClient creates a new instance of RepoServerService_GenerateManifestWithFilesClient. 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 NewRepoServerService_GenerateManifestWithFilesClient(t interface { + mock.TestingT + Cleanup(func()) +}) *RepoServerService_GenerateManifestWithFilesClient { + mock := &RepoServerService_GenerateManifestWithFilesClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // RepoServerService_GenerateManifestWithFilesClient is an autogenerated mock type for the RepoServerService_GenerateManifestWithFilesClient type type RepoServerService_GenerateManifestWithFilesClient struct { mock.Mock @@ -25,9 +39,9 @@ func (_m *RepoServerService_GenerateManifestWithFilesClient) EXPECT() *RepoServe return &RepoServerService_GenerateManifestWithFilesClient_Expecter{mock: &_m.Mock} } -// CloseAndRecv provides a mock function with no fields -func (_m *RepoServerService_GenerateManifestWithFilesClient) CloseAndRecv() (*apiclient.ManifestResponse, error) { - ret := _m.Called() +// CloseAndRecv provides a mock function for the type RepoServerService_GenerateManifestWithFilesClient +func (_mock *RepoServerService_GenerateManifestWithFilesClient) CloseAndRecv() (*apiclient.ManifestResponse, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for CloseAndRecv") @@ -35,23 +49,21 @@ func (_m *RepoServerService_GenerateManifestWithFilesClient) CloseAndRecv() (*ap var r0 *apiclient.ManifestResponse var r1 error - if rf, ok := ret.Get(0).(func() (*apiclient.ManifestResponse, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (*apiclient.ManifestResponse, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() *apiclient.ManifestResponse); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() *apiclient.ManifestResponse); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*apiclient.ManifestResponse) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -72,8 +84,8 @@ func (_c *RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call) R return _c } -func (_c *RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call) Return(_a0 *apiclient.ManifestResponse, _a1 error) *RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call) Return(manifestResponse *apiclient.ManifestResponse, err error) *RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call { + _c.Call.Return(manifestResponse, err) return _c } @@ -82,21 +94,20 @@ func (_c *RepoServerService_GenerateManifestWithFilesClient_CloseAndRecv_Call) R return _c } -// CloseSend provides a mock function with no fields -func (_m *RepoServerService_GenerateManifestWithFilesClient) CloseSend() error { - ret := _m.Called() +// CloseSend provides a mock function for the type RepoServerService_GenerateManifestWithFilesClient +func (_mock *RepoServerService_GenerateManifestWithFilesClient) CloseSend() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for CloseSend") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -117,8 +128,8 @@ func (_c *RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call) Run( return _c } -func (_c *RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call) Return(_a0 error) *RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call { - _c.Call.Return(_a0) +func (_c *RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call) Return(err error) *RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call { + _c.Call.Return(err) return _c } @@ -127,23 +138,22 @@ func (_c *RepoServerService_GenerateManifestWithFilesClient_CloseSend_Call) RunA return _c } -// Context provides a mock function with no fields -func (_m *RepoServerService_GenerateManifestWithFilesClient) Context() context.Context { - ret := _m.Called() +// Context provides a mock function for the type RepoServerService_GenerateManifestWithFilesClient +func (_mock *RepoServerService_GenerateManifestWithFilesClient) Context() context.Context { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Context") } var r0 context.Context - if rf, ok := ret.Get(0).(func() context.Context); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() context.Context); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(context.Context) } } - return r0 } @@ -164,8 +174,8 @@ func (_c *RepoServerService_GenerateManifestWithFilesClient_Context_Call) Run(ru return _c } -func (_c *RepoServerService_GenerateManifestWithFilesClient_Context_Call) Return(_a0 context.Context) *RepoServerService_GenerateManifestWithFilesClient_Context_Call { - _c.Call.Return(_a0) +func (_c *RepoServerService_GenerateManifestWithFilesClient_Context_Call) Return(context1 context.Context) *RepoServerService_GenerateManifestWithFilesClient_Context_Call { + _c.Call.Return(context1) return _c } @@ -174,9 +184,9 @@ func (_c *RepoServerService_GenerateManifestWithFilesClient_Context_Call) RunAnd return _c } -// Header provides a mock function with no fields -func (_m *RepoServerService_GenerateManifestWithFilesClient) Header() (metadata.MD, error) { - ret := _m.Called() +// Header provides a mock function for the type RepoServerService_GenerateManifestWithFilesClient +func (_mock *RepoServerService_GenerateManifestWithFilesClient) Header() (metadata.MD, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Header") @@ -184,23 +194,21 @@ func (_m *RepoServerService_GenerateManifestWithFilesClient) Header() (metadata. var r0 metadata.MD var r1 error - if rf, ok := ret.Get(0).(func() (metadata.MD, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (metadata.MD, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() metadata.MD); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() metadata.MD); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(metadata.MD) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -221,8 +229,8 @@ func (_c *RepoServerService_GenerateManifestWithFilesClient_Header_Call) Run(run return _c } -func (_c *RepoServerService_GenerateManifestWithFilesClient_Header_Call) Return(_a0 metadata.MD, _a1 error) *RepoServerService_GenerateManifestWithFilesClient_Header_Call { - _c.Call.Return(_a0, _a1) +func (_c *RepoServerService_GenerateManifestWithFilesClient_Header_Call) Return(mD metadata.MD, err error) *RepoServerService_GenerateManifestWithFilesClient_Header_Call { + _c.Call.Return(mD, err) return _c } @@ -231,21 +239,20 @@ func (_c *RepoServerService_GenerateManifestWithFilesClient_Header_Call) RunAndR return _c } -// RecvMsg provides a mock function with given fields: m -func (_m *RepoServerService_GenerateManifestWithFilesClient) RecvMsg(m any) error { - ret := _m.Called(m) +// RecvMsg provides a mock function for the type RepoServerService_GenerateManifestWithFilesClient +func (_mock *RepoServerService_GenerateManifestWithFilesClient) RecvMsg(m any) error { + ret := _mock.Called(m) if len(ret) == 0 { panic("no return value specified for RecvMsg") } var r0 error - if rf, ok := ret.Get(0).(func(any) error); ok { - r0 = rf(m) + if returnFunc, ok := ret.Get(0).(func(any) error); ok { + r0 = returnFunc(m) } else { r0 = ret.Error(0) } - return r0 } @@ -255,7 +262,7 @@ type RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call struct { } // RecvMsg is a helper method to define mock.On call -// - m any +// - m func (_e *RepoServerService_GenerateManifestWithFilesClient_Expecter) RecvMsg(m interface{}) *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call { return &RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call{Call: _e.mock.On("RecvMsg", m)} } @@ -267,31 +274,30 @@ func (_c *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call) Run(ru return _c } -func (_c *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call) Return(_a0 error) *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call { - _c.Call.Return(_a0) +func (_c *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call) Return(err error) *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call { + _c.Call.Return(err) return _c } -func (_c *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call) RunAndReturn(run func(any) error) *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call { +func (_c *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call) RunAndReturn(run func(m any) error) *RepoServerService_GenerateManifestWithFilesClient_RecvMsg_Call { _c.Call.Return(run) return _c } -// Send provides a mock function with given fields: _a0 -func (_m *RepoServerService_GenerateManifestWithFilesClient) Send(_a0 *apiclient.ManifestRequestWithFiles) error { - ret := _m.Called(_a0) +// Send provides a mock function for the type RepoServerService_GenerateManifestWithFilesClient +func (_mock *RepoServerService_GenerateManifestWithFilesClient) Send(manifestRequestWithFiles *apiclient.ManifestRequestWithFiles) error { + ret := _mock.Called(manifestRequestWithFiles) if len(ret) == 0 { panic("no return value specified for Send") } var r0 error - if rf, ok := ret.Get(0).(func(*apiclient.ManifestRequestWithFiles) error); ok { - r0 = rf(_a0) + if returnFunc, ok := ret.Get(0).(func(*apiclient.ManifestRequestWithFiles) error); ok { + r0 = returnFunc(manifestRequestWithFiles) } else { r0 = ret.Error(0) } - return r0 } @@ -301,43 +307,42 @@ type RepoServerService_GenerateManifestWithFilesClient_Send_Call struct { } // Send is a helper method to define mock.On call -// - _a0 *apiclient.ManifestRequestWithFiles -func (_e *RepoServerService_GenerateManifestWithFilesClient_Expecter) Send(_a0 interface{}) *RepoServerService_GenerateManifestWithFilesClient_Send_Call { - return &RepoServerService_GenerateManifestWithFilesClient_Send_Call{Call: _e.mock.On("Send", _a0)} +// - manifestRequestWithFiles +func (_e *RepoServerService_GenerateManifestWithFilesClient_Expecter) Send(manifestRequestWithFiles interface{}) *RepoServerService_GenerateManifestWithFilesClient_Send_Call { + return &RepoServerService_GenerateManifestWithFilesClient_Send_Call{Call: _e.mock.On("Send", manifestRequestWithFiles)} } -func (_c *RepoServerService_GenerateManifestWithFilesClient_Send_Call) Run(run func(_a0 *apiclient.ManifestRequestWithFiles)) *RepoServerService_GenerateManifestWithFilesClient_Send_Call { +func (_c *RepoServerService_GenerateManifestWithFilesClient_Send_Call) Run(run func(manifestRequestWithFiles *apiclient.ManifestRequestWithFiles)) *RepoServerService_GenerateManifestWithFilesClient_Send_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*apiclient.ManifestRequestWithFiles)) }) return _c } -func (_c *RepoServerService_GenerateManifestWithFilesClient_Send_Call) Return(_a0 error) *RepoServerService_GenerateManifestWithFilesClient_Send_Call { - _c.Call.Return(_a0) +func (_c *RepoServerService_GenerateManifestWithFilesClient_Send_Call) Return(err error) *RepoServerService_GenerateManifestWithFilesClient_Send_Call { + _c.Call.Return(err) return _c } -func (_c *RepoServerService_GenerateManifestWithFilesClient_Send_Call) RunAndReturn(run func(*apiclient.ManifestRequestWithFiles) error) *RepoServerService_GenerateManifestWithFilesClient_Send_Call { +func (_c *RepoServerService_GenerateManifestWithFilesClient_Send_Call) RunAndReturn(run func(manifestRequestWithFiles *apiclient.ManifestRequestWithFiles) error) *RepoServerService_GenerateManifestWithFilesClient_Send_Call { _c.Call.Return(run) return _c } -// SendMsg provides a mock function with given fields: m -func (_m *RepoServerService_GenerateManifestWithFilesClient) SendMsg(m any) error { - ret := _m.Called(m) +// SendMsg provides a mock function for the type RepoServerService_GenerateManifestWithFilesClient +func (_mock *RepoServerService_GenerateManifestWithFilesClient) SendMsg(m any) error { + ret := _mock.Called(m) if len(ret) == 0 { panic("no return value specified for SendMsg") } var r0 error - if rf, ok := ret.Get(0).(func(any) error); ok { - r0 = rf(m) + if returnFunc, ok := ret.Get(0).(func(any) error); ok { + r0 = returnFunc(m) } else { r0 = ret.Error(0) } - return r0 } @@ -347,7 +352,7 @@ type RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call struct { } // SendMsg is a helper method to define mock.On call -// - m any +// - m func (_e *RepoServerService_GenerateManifestWithFilesClient_Expecter) SendMsg(m interface{}) *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call { return &RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call{Call: _e.mock.On("SendMsg", m)} } @@ -359,33 +364,32 @@ func (_c *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call) Run(ru return _c } -func (_c *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call) Return(_a0 error) *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call { - _c.Call.Return(_a0) +func (_c *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call) Return(err error) *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call { + _c.Call.Return(err) return _c } -func (_c *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call) RunAndReturn(run func(any) error) *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call { +func (_c *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call) RunAndReturn(run func(m any) error) *RepoServerService_GenerateManifestWithFilesClient_SendMsg_Call { _c.Call.Return(run) return _c } -// Trailer provides a mock function with no fields -func (_m *RepoServerService_GenerateManifestWithFilesClient) Trailer() metadata.MD { - ret := _m.Called() +// Trailer provides a mock function for the type RepoServerService_GenerateManifestWithFilesClient +func (_mock *RepoServerService_GenerateManifestWithFilesClient) Trailer() metadata.MD { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Trailer") } var r0 metadata.MD - if rf, ok := ret.Get(0).(func() metadata.MD); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() metadata.MD); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(metadata.MD) } } - return r0 } @@ -406,8 +410,8 @@ func (_c *RepoServerService_GenerateManifestWithFilesClient_Trailer_Call) Run(ru return _c } -func (_c *RepoServerService_GenerateManifestWithFilesClient_Trailer_Call) Return(_a0 metadata.MD) *RepoServerService_GenerateManifestWithFilesClient_Trailer_Call { - _c.Call.Return(_a0) +func (_c *RepoServerService_GenerateManifestWithFilesClient_Trailer_Call) Return(mD metadata.MD) *RepoServerService_GenerateManifestWithFilesClient_Trailer_Call { + _c.Call.Return(mD) return _c } @@ -415,17 +419,3 @@ func (_c *RepoServerService_GenerateManifestWithFilesClient_Trailer_Call) RunAnd _c.Call.Return(run) return _c } - -// NewRepoServerService_GenerateManifestWithFilesClient creates a new instance of RepoServerService_GenerateManifestWithFilesClient. 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 NewRepoServerService_GenerateManifestWithFilesClient(t interface { - mock.TestingT - Cleanup(func()) -}) *RepoServerService_GenerateManifestWithFilesClient { - mock := &RepoServerService_GenerateManifestWithFilesClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/server/application/mocks/Broadcaster.go b/server/application/mocks/Broadcaster.go index 8e17abb79bfeb..94d64057e90ba 100644 --- a/server/application/mocks/Broadcaster.go +++ b/server/application/mocks/Broadcaster.go @@ -1,12 +1,28 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - v1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" + "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" mock "github.com/stretchr/testify/mock" ) +// NewBroadcaster creates a new instance of Broadcaster. 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 NewBroadcaster(t interface { + mock.TestingT + Cleanup(func()) +}) *Broadcaster { + mock := &Broadcaster{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // Broadcaster is an autogenerated mock type for the Broadcaster type type Broadcaster struct { mock.Mock @@ -20,9 +36,10 @@ func (_m *Broadcaster) EXPECT() *Broadcaster_Expecter { return &Broadcaster_Expecter{mock: &_m.Mock} } -// OnAdd provides a mock function with given fields: _a0, _a1 -func (_m *Broadcaster) OnAdd(_a0 any, _a1 bool) { - _m.Called(_a0, _a1) +// OnAdd provides a mock function for the type Broadcaster +func (_mock *Broadcaster) OnAdd(v any, b bool) { + _mock.Called(v, b) + return } // Broadcaster_OnAdd_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnAdd' @@ -31,13 +48,13 @@ type Broadcaster_OnAdd_Call struct { } // OnAdd is a helper method to define mock.On call -// - _a0 any -// - _a1 bool -func (_e *Broadcaster_Expecter) OnAdd(_a0 interface{}, _a1 interface{}) *Broadcaster_OnAdd_Call { - return &Broadcaster_OnAdd_Call{Call: _e.mock.On("OnAdd", _a0, _a1)} +// - v +// - b +func (_e *Broadcaster_Expecter) OnAdd(v interface{}, b interface{}) *Broadcaster_OnAdd_Call { + return &Broadcaster_OnAdd_Call{Call: _e.mock.On("OnAdd", v, b)} } -func (_c *Broadcaster_OnAdd_Call) Run(run func(_a0 any, _a1 bool)) *Broadcaster_OnAdd_Call { +func (_c *Broadcaster_OnAdd_Call) Run(run func(v any, b bool)) *Broadcaster_OnAdd_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(any), args[1].(bool)) }) @@ -49,14 +66,15 @@ func (_c *Broadcaster_OnAdd_Call) Return() *Broadcaster_OnAdd_Call { return _c } -func (_c *Broadcaster_OnAdd_Call) RunAndReturn(run func(any, bool)) *Broadcaster_OnAdd_Call { +func (_c *Broadcaster_OnAdd_Call) RunAndReturn(run func(v any, b bool)) *Broadcaster_OnAdd_Call { _c.Run(run) return _c } -// OnDelete provides a mock function with given fields: _a0 -func (_m *Broadcaster) OnDelete(_a0 any) { - _m.Called(_a0) +// OnDelete provides a mock function for the type Broadcaster +func (_mock *Broadcaster) OnDelete(v any) { + _mock.Called(v) + return } // Broadcaster_OnDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnDelete' @@ -65,12 +83,12 @@ type Broadcaster_OnDelete_Call struct { } // OnDelete is a helper method to define mock.On call -// - _a0 any -func (_e *Broadcaster_Expecter) OnDelete(_a0 interface{}) *Broadcaster_OnDelete_Call { - return &Broadcaster_OnDelete_Call{Call: _e.mock.On("OnDelete", _a0)} +// - v +func (_e *Broadcaster_Expecter) OnDelete(v interface{}) *Broadcaster_OnDelete_Call { + return &Broadcaster_OnDelete_Call{Call: _e.mock.On("OnDelete", v)} } -func (_c *Broadcaster_OnDelete_Call) Run(run func(_a0 any)) *Broadcaster_OnDelete_Call { +func (_c *Broadcaster_OnDelete_Call) Run(run func(v any)) *Broadcaster_OnDelete_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(any)) }) @@ -82,14 +100,15 @@ func (_c *Broadcaster_OnDelete_Call) Return() *Broadcaster_OnDelete_Call { return _c } -func (_c *Broadcaster_OnDelete_Call) RunAndReturn(run func(any)) *Broadcaster_OnDelete_Call { +func (_c *Broadcaster_OnDelete_Call) RunAndReturn(run func(v any)) *Broadcaster_OnDelete_Call { _c.Run(run) return _c } -// OnUpdate provides a mock function with given fields: _a0, _a1 -func (_m *Broadcaster) OnUpdate(_a0 any, _a1 any) { - _m.Called(_a0, _a1) +// OnUpdate provides a mock function for the type Broadcaster +func (_mock *Broadcaster) OnUpdate(v any, v1 any) { + _mock.Called(v, v1) + return } // Broadcaster_OnUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnUpdate' @@ -98,13 +117,13 @@ type Broadcaster_OnUpdate_Call struct { } // OnUpdate is a helper method to define mock.On call -// - _a0 any -// - _a1 any -func (_e *Broadcaster_Expecter) OnUpdate(_a0 interface{}, _a1 interface{}) *Broadcaster_OnUpdate_Call { - return &Broadcaster_OnUpdate_Call{Call: _e.mock.On("OnUpdate", _a0, _a1)} +// - v +// - v1 +func (_e *Broadcaster_Expecter) OnUpdate(v interface{}, v1 interface{}) *Broadcaster_OnUpdate_Call { + return &Broadcaster_OnUpdate_Call{Call: _e.mock.On("OnUpdate", v, v1)} } -func (_c *Broadcaster_OnUpdate_Call) Run(run func(_a0 any, _a1 any)) *Broadcaster_OnUpdate_Call { +func (_c *Broadcaster_OnUpdate_Call) Run(run func(v any, v1 any)) *Broadcaster_OnUpdate_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(any), args[1].(any)) }) @@ -116,13 +135,14 @@ func (_c *Broadcaster_OnUpdate_Call) Return() *Broadcaster_OnUpdate_Call { return _c } -func (_c *Broadcaster_OnUpdate_Call) RunAndReturn(run func(any, any)) *Broadcaster_OnUpdate_Call { +func (_c *Broadcaster_OnUpdate_Call) RunAndReturn(run func(v any, v1 any)) *Broadcaster_OnUpdate_Call { _c.Run(run) return _c } -// Subscribe provides a mock function with given fields: ch, filters -func (_m *Broadcaster) Subscribe(ch chan *v1alpha1.ApplicationWatchEvent, filters ...func(*v1alpha1.ApplicationWatchEvent) bool) func() { +// Subscribe provides a mock function for the type Broadcaster +func (_mock *Broadcaster) Subscribe(ch chan *v1alpha1.ApplicationWatchEvent, filters ...func(event *v1alpha1.ApplicationWatchEvent) bool) func() { + // func(event *v1alpha1.ApplicationWatchEvent) bool _va := make([]interface{}, len(filters)) for _i := range filters { _va[_i] = filters[_i] @@ -130,21 +150,20 @@ func (_m *Broadcaster) Subscribe(ch chan *v1alpha1.ApplicationWatchEvent, filter var _ca []interface{} _ca = append(_ca, ch) _ca = append(_ca, _va...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for Subscribe") } var r0 func() - if rf, ok := ret.Get(0).(func(chan *v1alpha1.ApplicationWatchEvent, ...func(*v1alpha1.ApplicationWatchEvent) bool) func()); ok { - r0 = rf(ch, filters...) + if returnFunc, ok := ret.Get(0).(func(chan *v1alpha1.ApplicationWatchEvent, ...func(event *v1alpha1.ApplicationWatchEvent) bool) func()); ok { + r0 = returnFunc(ch, filters...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(func()) } } - return r0 } @@ -154,19 +173,19 @@ type Broadcaster_Subscribe_Call struct { } // Subscribe is a helper method to define mock.On call -// - ch chan *v1alpha1.ApplicationWatchEvent -// - filters ...func(*v1alpha1.ApplicationWatchEvent) bool +// - ch +// - filters func (_e *Broadcaster_Expecter) Subscribe(ch interface{}, filters ...interface{}) *Broadcaster_Subscribe_Call { return &Broadcaster_Subscribe_Call{Call: _e.mock.On("Subscribe", append([]interface{}{ch}, filters...)...)} } -func (_c *Broadcaster_Subscribe_Call) Run(run func(ch chan *v1alpha1.ApplicationWatchEvent, filters ...func(*v1alpha1.ApplicationWatchEvent) bool)) *Broadcaster_Subscribe_Call { +func (_c *Broadcaster_Subscribe_Call) Run(run func(ch chan *v1alpha1.ApplicationWatchEvent, filters ...func(event *v1alpha1.ApplicationWatchEvent) bool)) *Broadcaster_Subscribe_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]func(*v1alpha1.ApplicationWatchEvent) bool, len(args)-1) + variadicArgs := make([]func(event *v1alpha1.ApplicationWatchEvent) bool, len(args)-1) for i, a := range args[1:] { if a != nil { - variadicArgs[i] = a.(func(*v1alpha1.ApplicationWatchEvent) bool) + variadicArgs[i] = a.(func(event *v1alpha1.ApplicationWatchEvent) bool) } } run(args[0].(chan *v1alpha1.ApplicationWatchEvent), variadicArgs...) @@ -174,26 +193,12 @@ func (_c *Broadcaster_Subscribe_Call) Run(run func(ch chan *v1alpha1.Application return _c } -func (_c *Broadcaster_Subscribe_Call) Return(_a0 func()) *Broadcaster_Subscribe_Call { - _c.Call.Return(_a0) +func (_c *Broadcaster_Subscribe_Call) Return(fn func()) *Broadcaster_Subscribe_Call { + _c.Call.Return(fn) return _c } -func (_c *Broadcaster_Subscribe_Call) RunAndReturn(run func(chan *v1alpha1.ApplicationWatchEvent, ...func(*v1alpha1.ApplicationWatchEvent) bool) func()) *Broadcaster_Subscribe_Call { +func (_c *Broadcaster_Subscribe_Call) RunAndReturn(run func(ch chan *v1alpha1.ApplicationWatchEvent, filters ...func(event *v1alpha1.ApplicationWatchEvent) bool) func()) *Broadcaster_Subscribe_Call { _c.Call.Return(run) return _c } - -// NewBroadcaster creates a new instance of Broadcaster. 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 NewBroadcaster(t interface { - mock.TestingT - Cleanup(func()) -}) *Broadcaster { - mock := &Broadcaster{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/server/extension/mocks/ApplicationGetter.go b/server/extension/mocks/ApplicationGetter.go index cceafdb288aba..949005f299689 100644 --- a/server/extension/mocks/ApplicationGetter.go +++ b/server/extension/mocks/ApplicationGetter.go @@ -1,12 +1,28 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - v1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" + "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" mock "github.com/stretchr/testify/mock" ) +// NewApplicationGetter creates a new instance of ApplicationGetter. 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 NewApplicationGetter(t interface { + mock.TestingT + Cleanup(func()) +}) *ApplicationGetter { + mock := &ApplicationGetter{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // ApplicationGetter is an autogenerated mock type for the ApplicationGetter type type ApplicationGetter struct { mock.Mock @@ -20,9 +36,9 @@ func (_m *ApplicationGetter) EXPECT() *ApplicationGetter_Expecter { return &ApplicationGetter_Expecter{mock: &_m.Mock} } -// Get provides a mock function with given fields: ns, name -func (_m *ApplicationGetter) Get(ns string, name string) (*v1alpha1.Application, error) { - ret := _m.Called(ns, name) +// Get provides a mock function for the type ApplicationGetter +func (_mock *ApplicationGetter) Get(ns string, name string) (*v1alpha1.Application, error) { + ret := _mock.Called(ns, name) if len(ret) == 0 { panic("no return value specified for Get") @@ -30,23 +46,21 @@ func (_m *ApplicationGetter) Get(ns string, name string) (*v1alpha1.Application, var r0 *v1alpha1.Application var r1 error - if rf, ok := ret.Get(0).(func(string, string) (*v1alpha1.Application, error)); ok { - return rf(ns, name) + if returnFunc, ok := ret.Get(0).(func(string, string) (*v1alpha1.Application, error)); ok { + return returnFunc(ns, name) } - if rf, ok := ret.Get(0).(func(string, string) *v1alpha1.Application); ok { - r0 = rf(ns, name) + if returnFunc, ok := ret.Get(0).(func(string, string) *v1alpha1.Application); ok { + r0 = returnFunc(ns, name) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.Application) } } - - if rf, ok := ret.Get(1).(func(string, string) error); ok { - r1 = rf(ns, name) + if returnFunc, ok := ret.Get(1).(func(string, string) error); ok { + r1 = returnFunc(ns, name) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -56,8 +70,8 @@ type ApplicationGetter_Get_Call struct { } // Get is a helper method to define mock.On call -// - ns string -// - name string +// - ns +// - name func (_e *ApplicationGetter_Expecter) Get(ns interface{}, name interface{}) *ApplicationGetter_Get_Call { return &ApplicationGetter_Get_Call{Call: _e.mock.On("Get", ns, name)} } @@ -69,26 +83,12 @@ func (_c *ApplicationGetter_Get_Call) Run(run func(ns string, name string)) *App return _c } -func (_c *ApplicationGetter_Get_Call) Return(_a0 *v1alpha1.Application, _a1 error) *ApplicationGetter_Get_Call { - _c.Call.Return(_a0, _a1) +func (_c *ApplicationGetter_Get_Call) Return(application *v1alpha1.Application, err error) *ApplicationGetter_Get_Call { + _c.Call.Return(application, err) return _c } -func (_c *ApplicationGetter_Get_Call) RunAndReturn(run func(string, string) (*v1alpha1.Application, error)) *ApplicationGetter_Get_Call { +func (_c *ApplicationGetter_Get_Call) RunAndReturn(run func(ns string, name string) (*v1alpha1.Application, error)) *ApplicationGetter_Get_Call { _c.Call.Return(run) return _c } - -// NewApplicationGetter creates a new instance of ApplicationGetter. 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 NewApplicationGetter(t interface { - mock.TestingT - Cleanup(func()) -}) *ApplicationGetter { - mock := &ApplicationGetter{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/server/extension/mocks/ExtensionMetricsRegistry.go b/server/extension/mocks/ExtensionMetricsRegistry.go index 72c189ab09ebf..b1a1ea3b1068b 100644 --- a/server/extension/mocks/ExtensionMetricsRegistry.go +++ b/server/extension/mocks/ExtensionMetricsRegistry.go @@ -1,13 +1,29 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - time "time" + "time" mock "github.com/stretchr/testify/mock" ) +// NewExtensionMetricsRegistry creates a new instance of ExtensionMetricsRegistry. 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 NewExtensionMetricsRegistry(t interface { + mock.TestingT + Cleanup(func()) +}) *ExtensionMetricsRegistry { + mock := &ExtensionMetricsRegistry{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // ExtensionMetricsRegistry is an autogenerated mock type for the ExtensionMetricsRegistry type type ExtensionMetricsRegistry struct { mock.Mock @@ -21,9 +37,10 @@ func (_m *ExtensionMetricsRegistry) EXPECT() *ExtensionMetricsRegistry_Expecter return &ExtensionMetricsRegistry_Expecter{mock: &_m.Mock} } -// IncExtensionRequestCounter provides a mock function with given fields: _a0, status -func (_m *ExtensionMetricsRegistry) IncExtensionRequestCounter(_a0 string, status int) { - _m.Called(_a0, status) +// IncExtensionRequestCounter provides a mock function for the type ExtensionMetricsRegistry +func (_mock *ExtensionMetricsRegistry) IncExtensionRequestCounter(extension string, status int) { + _mock.Called(extension, status) + return } // ExtensionMetricsRegistry_IncExtensionRequestCounter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncExtensionRequestCounter' @@ -32,13 +49,13 @@ type ExtensionMetricsRegistry_IncExtensionRequestCounter_Call struct { } // IncExtensionRequestCounter is a helper method to define mock.On call -// - _a0 string -// - status int -func (_e *ExtensionMetricsRegistry_Expecter) IncExtensionRequestCounter(_a0 interface{}, status interface{}) *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call { - return &ExtensionMetricsRegistry_IncExtensionRequestCounter_Call{Call: _e.mock.On("IncExtensionRequestCounter", _a0, status)} +// - extension +// - status +func (_e *ExtensionMetricsRegistry_Expecter) IncExtensionRequestCounter(extension interface{}, status interface{}) *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call { + return &ExtensionMetricsRegistry_IncExtensionRequestCounter_Call{Call: _e.mock.On("IncExtensionRequestCounter", extension, status)} } -func (_c *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call) Run(run func(_a0 string, status int)) *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call { +func (_c *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call) Run(run func(extension string, status int)) *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(string), args[1].(int)) }) @@ -50,14 +67,15 @@ func (_c *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call) Return() *Ex return _c } -func (_c *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call) RunAndReturn(run func(string, int)) *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call { +func (_c *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call) RunAndReturn(run func(extension string, status int)) *ExtensionMetricsRegistry_IncExtensionRequestCounter_Call { _c.Run(run) return _c } -// ObserveExtensionRequestDuration provides a mock function with given fields: _a0, duration -func (_m *ExtensionMetricsRegistry) ObserveExtensionRequestDuration(_a0 string, duration time.Duration) { - _m.Called(_a0, duration) +// ObserveExtensionRequestDuration provides a mock function for the type ExtensionMetricsRegistry +func (_mock *ExtensionMetricsRegistry) ObserveExtensionRequestDuration(extension string, duration time.Duration) { + _mock.Called(extension, duration) + return } // ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ObserveExtensionRequestDuration' @@ -66,13 +84,13 @@ type ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call struct { } // ObserveExtensionRequestDuration is a helper method to define mock.On call -// - _a0 string -// - duration time.Duration -func (_e *ExtensionMetricsRegistry_Expecter) ObserveExtensionRequestDuration(_a0 interface{}, duration interface{}) *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call { - return &ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call{Call: _e.mock.On("ObserveExtensionRequestDuration", _a0, duration)} +// - extension +// - duration +func (_e *ExtensionMetricsRegistry_Expecter) ObserveExtensionRequestDuration(extension interface{}, duration interface{}) *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call { + return &ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call{Call: _e.mock.On("ObserveExtensionRequestDuration", extension, duration)} } -func (_c *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call) Run(run func(_a0 string, duration time.Duration)) *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call { +func (_c *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call) Run(run func(extension string, duration time.Duration)) *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(string), args[1].(time.Duration)) }) @@ -84,21 +102,7 @@ func (_c *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call) Return( return _c } -func (_c *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call) RunAndReturn(run func(string, time.Duration)) *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call { +func (_c *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call) RunAndReturn(run func(extension string, duration time.Duration)) *ExtensionMetricsRegistry_ObserveExtensionRequestDuration_Call { _c.Run(run) return _c } - -// NewExtensionMetricsRegistry creates a new instance of ExtensionMetricsRegistry. 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 NewExtensionMetricsRegistry(t interface { - mock.TestingT - Cleanup(func()) -}) *ExtensionMetricsRegistry { - mock := &ExtensionMetricsRegistry{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/server/extension/mocks/ProjectGetter.go b/server/extension/mocks/ProjectGetter.go index ef761dcd80cd3..1cb3f855e977c 100644 --- a/server/extension/mocks/ProjectGetter.go +++ b/server/extension/mocks/ProjectGetter.go @@ -1,12 +1,28 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - v1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" + "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" mock "github.com/stretchr/testify/mock" ) +// NewProjectGetter creates a new instance of ProjectGetter. 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 NewProjectGetter(t interface { + mock.TestingT + Cleanup(func()) +}) *ProjectGetter { + mock := &ProjectGetter{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // ProjectGetter is an autogenerated mock type for the ProjectGetter type type ProjectGetter struct { mock.Mock @@ -20,9 +36,9 @@ func (_m *ProjectGetter) EXPECT() *ProjectGetter_Expecter { return &ProjectGetter_Expecter{mock: &_m.Mock} } -// Get provides a mock function with given fields: name -func (_m *ProjectGetter) Get(name string) (*v1alpha1.AppProject, error) { - ret := _m.Called(name) +// Get provides a mock function for the type ProjectGetter +func (_mock *ProjectGetter) Get(name string) (*v1alpha1.AppProject, error) { + ret := _mock.Called(name) if len(ret) == 0 { panic("no return value specified for Get") @@ -30,23 +46,21 @@ func (_m *ProjectGetter) Get(name string) (*v1alpha1.AppProject, error) { var r0 *v1alpha1.AppProject var r1 error - if rf, ok := ret.Get(0).(func(string) (*v1alpha1.AppProject, error)); ok { - return rf(name) + if returnFunc, ok := ret.Get(0).(func(string) (*v1alpha1.AppProject, error)); ok { + return returnFunc(name) } - if rf, ok := ret.Get(0).(func(string) *v1alpha1.AppProject); ok { - r0 = rf(name) + if returnFunc, ok := ret.Get(0).(func(string) *v1alpha1.AppProject); ok { + r0 = returnFunc(name) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.AppProject) } } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(name) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(name) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -56,7 +70,7 @@ type ProjectGetter_Get_Call struct { } // Get is a helper method to define mock.On call -// - name string +// - name func (_e *ProjectGetter_Expecter) Get(name interface{}) *ProjectGetter_Get_Call { return &ProjectGetter_Get_Call{Call: _e.mock.On("Get", name)} } @@ -68,19 +82,19 @@ func (_c *ProjectGetter_Get_Call) Run(run func(name string)) *ProjectGetter_Get_ return _c } -func (_c *ProjectGetter_Get_Call) Return(_a0 *v1alpha1.AppProject, _a1 error) *ProjectGetter_Get_Call { - _c.Call.Return(_a0, _a1) +func (_c *ProjectGetter_Get_Call) Return(appProject *v1alpha1.AppProject, err error) *ProjectGetter_Get_Call { + _c.Call.Return(appProject, err) return _c } -func (_c *ProjectGetter_Get_Call) RunAndReturn(run func(string) (*v1alpha1.AppProject, error)) *ProjectGetter_Get_Call { +func (_c *ProjectGetter_Get_Call) RunAndReturn(run func(name string) (*v1alpha1.AppProject, error)) *ProjectGetter_Get_Call { _c.Call.Return(run) return _c } -// GetClusters provides a mock function with given fields: project -func (_m *ProjectGetter) GetClusters(project string) ([]*v1alpha1.Cluster, error) { - ret := _m.Called(project) +// GetClusters provides a mock function for the type ProjectGetter +func (_mock *ProjectGetter) GetClusters(project string) ([]*v1alpha1.Cluster, error) { + ret := _mock.Called(project) if len(ret) == 0 { panic("no return value specified for GetClusters") @@ -88,23 +102,21 @@ func (_m *ProjectGetter) GetClusters(project string) ([]*v1alpha1.Cluster, error var r0 []*v1alpha1.Cluster var r1 error - if rf, ok := ret.Get(0).(func(string) ([]*v1alpha1.Cluster, error)); ok { - return rf(project) + if returnFunc, ok := ret.Get(0).(func(string) ([]*v1alpha1.Cluster, error)); ok { + return returnFunc(project) } - if rf, ok := ret.Get(0).(func(string) []*v1alpha1.Cluster); ok { - r0 = rf(project) + if returnFunc, ok := ret.Get(0).(func(string) []*v1alpha1.Cluster); ok { + r0 = returnFunc(project) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*v1alpha1.Cluster) } } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(project) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(project) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -114,7 +126,7 @@ type ProjectGetter_GetClusters_Call struct { } // GetClusters is a helper method to define mock.On call -// - project string +// - project func (_e *ProjectGetter_Expecter) GetClusters(project interface{}) *ProjectGetter_GetClusters_Call { return &ProjectGetter_GetClusters_Call{Call: _e.mock.On("GetClusters", project)} } @@ -126,26 +138,12 @@ func (_c *ProjectGetter_GetClusters_Call) Run(run func(project string)) *Project return _c } -func (_c *ProjectGetter_GetClusters_Call) Return(_a0 []*v1alpha1.Cluster, _a1 error) *ProjectGetter_GetClusters_Call { - _c.Call.Return(_a0, _a1) +func (_c *ProjectGetter_GetClusters_Call) Return(clusters []*v1alpha1.Cluster, err error) *ProjectGetter_GetClusters_Call { + _c.Call.Return(clusters, err) return _c } -func (_c *ProjectGetter_GetClusters_Call) RunAndReturn(run func(string) ([]*v1alpha1.Cluster, error)) *ProjectGetter_GetClusters_Call { +func (_c *ProjectGetter_GetClusters_Call) RunAndReturn(run func(project string) ([]*v1alpha1.Cluster, error)) *ProjectGetter_GetClusters_Call { _c.Call.Return(run) return _c } - -// NewProjectGetter creates a new instance of ProjectGetter. 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 NewProjectGetter(t interface { - mock.TestingT - Cleanup(func()) -}) *ProjectGetter { - mock := &ProjectGetter{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/server/extension/mocks/RbacEnforcer.go b/server/extension/mocks/RbacEnforcer.go index bf00e63a7678b..3bc9b20625798 100644 --- a/server/extension/mocks/RbacEnforcer.go +++ b/server/extension/mocks/RbacEnforcer.go @@ -1,8 +1,26 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks -import mock "github.com/stretchr/testify/mock" +import ( + mock "github.com/stretchr/testify/mock" +) + +// NewRbacEnforcer creates a new instance of RbacEnforcer. 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 NewRbacEnforcer(t interface { + mock.TestingT + Cleanup(func()) +}) *RbacEnforcer { + mock := &RbacEnforcer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} // RbacEnforcer is an autogenerated mock type for the RbacEnforcer type type RbacEnforcer struct { @@ -17,23 +35,22 @@ func (_m *RbacEnforcer) EXPECT() *RbacEnforcer_Expecter { return &RbacEnforcer_Expecter{mock: &_m.Mock} } -// EnforceErr provides a mock function with given fields: rvals -func (_m *RbacEnforcer) EnforceErr(rvals ...any) error { +// EnforceErr provides a mock function for the type RbacEnforcer +func (_mock *RbacEnforcer) EnforceErr(rvals ...any) error { var _ca []interface{} _ca = append(_ca, rvals...) - ret := _m.Called(_ca...) + ret := _mock.Called(_ca...) if len(ret) == 0 { panic("no return value specified for EnforceErr") } var r0 error - if rf, ok := ret.Get(0).(func(...any) error); ok { - r0 = rf(rvals...) + if returnFunc, ok := ret.Get(0).(func(...any) error); ok { + r0 = returnFunc(rvals...) } else { r0 = ret.Error(0) } - return r0 } @@ -43,7 +60,7 @@ type RbacEnforcer_EnforceErr_Call struct { } // EnforceErr is a helper method to define mock.On call -// - rvals ...any +// - rvals func (_e *RbacEnforcer_Expecter) EnforceErr(rvals ...interface{}) *RbacEnforcer_EnforceErr_Call { return &RbacEnforcer_EnforceErr_Call{Call: _e.mock.On("EnforceErr", append([]interface{}{}, rvals...)...)} @@ -62,26 +79,12 @@ func (_c *RbacEnforcer_EnforceErr_Call) Run(run func(rvals ...any)) *RbacEnforce return _c } -func (_c *RbacEnforcer_EnforceErr_Call) Return(_a0 error) *RbacEnforcer_EnforceErr_Call { - _c.Call.Return(_a0) +func (_c *RbacEnforcer_EnforceErr_Call) Return(err error) *RbacEnforcer_EnforceErr_Call { + _c.Call.Return(err) return _c } -func (_c *RbacEnforcer_EnforceErr_Call) RunAndReturn(run func(...any) error) *RbacEnforcer_EnforceErr_Call { +func (_c *RbacEnforcer_EnforceErr_Call) RunAndReturn(run func(rvals ...any) error) *RbacEnforcer_EnforceErr_Call { _c.Call.Return(run) return _c } - -// NewRbacEnforcer creates a new instance of RbacEnforcer. 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 NewRbacEnforcer(t interface { - mock.TestingT - Cleanup(func()) -}) *RbacEnforcer { - mock := &RbacEnforcer{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/server/extension/mocks/SettingsGetter.go b/server/extension/mocks/SettingsGetter.go index 4ca21a1f1b4a1..ca4842a042245 100644 --- a/server/extension/mocks/SettingsGetter.go +++ b/server/extension/mocks/SettingsGetter.go @@ -1,12 +1,28 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - settings "github.com/argoproj/argo-cd/v3/util/settings" + "github.com/argoproj/argo-cd/v3/util/settings" mock "github.com/stretchr/testify/mock" ) +// NewSettingsGetter creates a new instance of SettingsGetter. 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 NewSettingsGetter(t interface { + mock.TestingT + Cleanup(func()) +}) *SettingsGetter { + mock := &SettingsGetter{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // SettingsGetter is an autogenerated mock type for the SettingsGetter type type SettingsGetter struct { mock.Mock @@ -20,9 +36,9 @@ func (_m *SettingsGetter) EXPECT() *SettingsGetter_Expecter { return &SettingsGetter_Expecter{mock: &_m.Mock} } -// Get provides a mock function with no fields -func (_m *SettingsGetter) Get() (*settings.ArgoCDSettings, error) { - ret := _m.Called() +// Get provides a mock function for the type SettingsGetter +func (_mock *SettingsGetter) Get() (*settings.ArgoCDSettings, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Get") @@ -30,23 +46,21 @@ func (_m *SettingsGetter) Get() (*settings.ArgoCDSettings, error) { var r0 *settings.ArgoCDSettings var r1 error - if rf, ok := ret.Get(0).(func() (*settings.ArgoCDSettings, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (*settings.ArgoCDSettings, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() *settings.ArgoCDSettings); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() *settings.ArgoCDSettings); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*settings.ArgoCDSettings) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -67,8 +81,8 @@ func (_c *SettingsGetter_Get_Call) Run(run func()) *SettingsGetter_Get_Call { return _c } -func (_c *SettingsGetter_Get_Call) Return(_a0 *settings.ArgoCDSettings, _a1 error) *SettingsGetter_Get_Call { - _c.Call.Return(_a0, _a1) +func (_c *SettingsGetter_Get_Call) Return(argoCDSettings *settings.ArgoCDSettings, err error) *SettingsGetter_Get_Call { + _c.Call.Return(argoCDSettings, err) return _c } @@ -76,17 +90,3 @@ func (_c *SettingsGetter_Get_Call) RunAndReturn(run func() (*settings.ArgoCDSett _c.Call.Return(run) return _c } - -// NewSettingsGetter creates a new instance of SettingsGetter. 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 NewSettingsGetter(t interface { - mock.TestingT - Cleanup(func()) -}) *SettingsGetter { - mock := &SettingsGetter{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/server/extension/mocks/UserGetter.go b/server/extension/mocks/UserGetter.go index f170ea8e36a3c..878cb9be62fb4 100644 --- a/server/extension/mocks/UserGetter.go +++ b/server/extension/mocks/UserGetter.go @@ -1,13 +1,29 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - context "context" + "context" mock "github.com/stretchr/testify/mock" ) +// NewUserGetter creates a new instance of UserGetter. 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 NewUserGetter(t interface { + mock.TestingT + Cleanup(func()) +}) *UserGetter { + mock := &UserGetter{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // UserGetter is an autogenerated mock type for the UserGetter type type UserGetter struct { mock.Mock @@ -21,23 +37,22 @@ func (_m *UserGetter) EXPECT() *UserGetter_Expecter { return &UserGetter_Expecter{mock: &_m.Mock} } -// GetGroups provides a mock function with given fields: ctx -func (_m *UserGetter) GetGroups(ctx context.Context) []string { - ret := _m.Called(ctx) +// GetGroups provides a mock function for the type UserGetter +func (_mock *UserGetter) GetGroups(ctx context.Context) []string { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetGroups") } var r0 []string - if rf, ok := ret.Get(0).(func(context.Context) []string); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok { + r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } - return r0 } @@ -47,7 +62,7 @@ type UserGetter_GetGroups_Call struct { } // GetGroups is a helper method to define mock.On call -// - ctx context.Context +// - ctx func (_e *UserGetter_Expecter) GetGroups(ctx interface{}) *UserGetter_GetGroups_Call { return &UserGetter_GetGroups_Call{Call: _e.mock.On("GetGroups", ctx)} } @@ -59,31 +74,30 @@ func (_c *UserGetter_GetGroups_Call) Run(run func(ctx context.Context)) *UserGet return _c } -func (_c *UserGetter_GetGroups_Call) Return(_a0 []string) *UserGetter_GetGroups_Call { - _c.Call.Return(_a0) +func (_c *UserGetter_GetGroups_Call) Return(strings []string) *UserGetter_GetGroups_Call { + _c.Call.Return(strings) return _c } -func (_c *UserGetter_GetGroups_Call) RunAndReturn(run func(context.Context) []string) *UserGetter_GetGroups_Call { +func (_c *UserGetter_GetGroups_Call) RunAndReturn(run func(ctx context.Context) []string) *UserGetter_GetGroups_Call { _c.Call.Return(run) return _c } -// GetUser provides a mock function with given fields: ctx -func (_m *UserGetter) GetUser(ctx context.Context) string { - ret := _m.Called(ctx) +// GetUser provides a mock function for the type UserGetter +func (_mock *UserGetter) GetUser(ctx context.Context) string { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetUser") } var r0 string - if rf, ok := ret.Get(0).(func(context.Context) string); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) string); ok { + r0 = returnFunc(ctx) } else { r0 = ret.Get(0).(string) } - return r0 } @@ -93,7 +107,7 @@ type UserGetter_GetUser_Call struct { } // GetUser is a helper method to define mock.On call -// - ctx context.Context +// - ctx func (_e *UserGetter_Expecter) GetUser(ctx interface{}) *UserGetter_GetUser_Call { return &UserGetter_GetUser_Call{Call: _e.mock.On("GetUser", ctx)} } @@ -105,26 +119,12 @@ func (_c *UserGetter_GetUser_Call) Run(run func(ctx context.Context)) *UserGette return _c } -func (_c *UserGetter_GetUser_Call) Return(_a0 string) *UserGetter_GetUser_Call { - _c.Call.Return(_a0) +func (_c *UserGetter_GetUser_Call) Return(s string) *UserGetter_GetUser_Call { + _c.Call.Return(s) return _c } -func (_c *UserGetter_GetUser_Call) RunAndReturn(run func(context.Context) string) *UserGetter_GetUser_Call { +func (_c *UserGetter_GetUser_Call) RunAndReturn(run func(ctx context.Context) string) *UserGetter_GetUser_Call { _c.Call.Return(run) return _c } - -// NewUserGetter creates a new instance of UserGetter. 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 NewUserGetter(t interface { - mock.TestingT - Cleanup(func()) -}) *UserGetter { - mock := &UserGetter{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/util/db/mocks/ArgoDB.go b/util/db/mocks/ArgoDB.go index 500b29b3af566..e9e7c3f932882 100644 --- a/util/db/mocks/ArgoDB.go +++ b/util/db/mocks/ArgoDB.go @@ -1,16 +1,31 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - context "context" + "context" - db "github.com/argoproj/argo-cd/v3/util/db" + "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" + "github.com/argoproj/argo-cd/v3/util/db" mock "github.com/stretchr/testify/mock" - - v1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" ) +// NewArgoDB creates a new instance of ArgoDB. 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 NewArgoDB(t interface { + mock.TestingT + Cleanup(func()) +}) *ArgoDB { + mock := &ArgoDB{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // ArgoDB is an autogenerated mock type for the ArgoDB type type ArgoDB struct { mock.Mock @@ -24,9 +39,9 @@ func (_m *ArgoDB) EXPECT() *ArgoDB_Expecter { return &ArgoDB_Expecter{mock: &_m.Mock} } -// AddGPGPublicKey provides a mock function with given fields: ctx, keyData -func (_m *ArgoDB) AddGPGPublicKey(ctx context.Context, keyData string) (map[string]*v1alpha1.GnuPGPublicKey, []string, error) { - ret := _m.Called(ctx, keyData) +// AddGPGPublicKey provides a mock function for the type ArgoDB +func (_mock *ArgoDB) AddGPGPublicKey(ctx context.Context, keyData string) (map[string]*v1alpha1.GnuPGPublicKey, []string, error) { + ret := _mock.Called(ctx, keyData) if len(ret) == 0 { panic("no return value specified for AddGPGPublicKey") @@ -35,31 +50,28 @@ func (_m *ArgoDB) AddGPGPublicKey(ctx context.Context, keyData string) (map[stri var r0 map[string]*v1alpha1.GnuPGPublicKey var r1 []string var r2 error - if rf, ok := ret.Get(0).(func(context.Context, string) (map[string]*v1alpha1.GnuPGPublicKey, []string, error)); ok { - return rf(ctx, keyData) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (map[string]*v1alpha1.GnuPGPublicKey, []string, error)); ok { + return returnFunc(ctx, keyData) } - if rf, ok := ret.Get(0).(func(context.Context, string) map[string]*v1alpha1.GnuPGPublicKey); ok { - r0 = rf(ctx, keyData) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) map[string]*v1alpha1.GnuPGPublicKey); ok { + r0 = returnFunc(ctx, keyData) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[string]*v1alpha1.GnuPGPublicKey) } } - - if rf, ok := ret.Get(1).(func(context.Context, string) []string); ok { - r1 = rf(ctx, keyData) + if returnFunc, ok := ret.Get(1).(func(context.Context, string) []string); ok { + r1 = returnFunc(ctx, keyData) } else { if ret.Get(1) != nil { r1 = ret.Get(1).([]string) } } - - if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { - r2 = rf(ctx, keyData) + if returnFunc, ok := ret.Get(2).(func(context.Context, string) error); ok { + r2 = returnFunc(ctx, keyData) } else { r2 = ret.Error(2) } - return r0, r1, r2 } @@ -69,8 +81,8 @@ type ArgoDB_AddGPGPublicKey_Call struct { } // AddGPGPublicKey is a helper method to define mock.On call -// - ctx context.Context -// - keyData string +// - ctx +// - keyData func (_e *ArgoDB_Expecter) AddGPGPublicKey(ctx interface{}, keyData interface{}) *ArgoDB_AddGPGPublicKey_Call { return &ArgoDB_AddGPGPublicKey_Call{Call: _e.mock.On("AddGPGPublicKey", ctx, keyData)} } @@ -82,19 +94,19 @@ func (_c *ArgoDB_AddGPGPublicKey_Call) Run(run func(ctx context.Context, keyData return _c } -func (_c *ArgoDB_AddGPGPublicKey_Call) Return(_a0 map[string]*v1alpha1.GnuPGPublicKey, _a1 []string, _a2 error) *ArgoDB_AddGPGPublicKey_Call { - _c.Call.Return(_a0, _a1, _a2) +func (_c *ArgoDB_AddGPGPublicKey_Call) Return(stringToGnuPGPublicKey map[string]*v1alpha1.GnuPGPublicKey, strings []string, err error) *ArgoDB_AddGPGPublicKey_Call { + _c.Call.Return(stringToGnuPGPublicKey, strings, err) return _c } -func (_c *ArgoDB_AddGPGPublicKey_Call) RunAndReturn(run func(context.Context, string) (map[string]*v1alpha1.GnuPGPublicKey, []string, error)) *ArgoDB_AddGPGPublicKey_Call { +func (_c *ArgoDB_AddGPGPublicKey_Call) RunAndReturn(run func(ctx context.Context, keyData string) (map[string]*v1alpha1.GnuPGPublicKey, []string, error)) *ArgoDB_AddGPGPublicKey_Call { _c.Call.Return(run) return _c } -// CreateCluster provides a mock function with given fields: ctx, c -func (_m *ArgoDB) CreateCluster(ctx context.Context, c *v1alpha1.Cluster) (*v1alpha1.Cluster, error) { - ret := _m.Called(ctx, c) +// CreateCluster provides a mock function for the type ArgoDB +func (_mock *ArgoDB) CreateCluster(ctx context.Context, c *v1alpha1.Cluster) (*v1alpha1.Cluster, error) { + ret := _mock.Called(ctx, c) if len(ret) == 0 { panic("no return value specified for CreateCluster") @@ -102,23 +114,21 @@ func (_m *ArgoDB) CreateCluster(ctx context.Context, c *v1alpha1.Cluster) (*v1al var r0 *v1alpha1.Cluster var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) (*v1alpha1.Cluster, error)); ok { - return rf(ctx, c) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) (*v1alpha1.Cluster, error)); ok { + return returnFunc(ctx, c) } - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) *v1alpha1.Cluster); ok { - r0 = rf(ctx, c) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) *v1alpha1.Cluster); ok { + r0 = returnFunc(ctx, c) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.Cluster) } } - - if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.Cluster) error); ok { - r1 = rf(ctx, c) + if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.Cluster) error); ok { + r1 = returnFunc(ctx, c) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -128,8 +138,8 @@ type ArgoDB_CreateCluster_Call struct { } // CreateCluster is a helper method to define mock.On call -// - ctx context.Context -// - c *v1alpha1.Cluster +// - ctx +// - c func (_e *ArgoDB_Expecter) CreateCluster(ctx interface{}, c interface{}) *ArgoDB_CreateCluster_Call { return &ArgoDB_CreateCluster_Call{Call: _e.mock.On("CreateCluster", ctx, c)} } @@ -141,19 +151,19 @@ func (_c *ArgoDB_CreateCluster_Call) Run(run func(ctx context.Context, c *v1alph return _c } -func (_c *ArgoDB_CreateCluster_Call) Return(_a0 *v1alpha1.Cluster, _a1 error) *ArgoDB_CreateCluster_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_CreateCluster_Call) Return(cluster *v1alpha1.Cluster, err error) *ArgoDB_CreateCluster_Call { + _c.Call.Return(cluster, err) return _c } -func (_c *ArgoDB_CreateCluster_Call) RunAndReturn(run func(context.Context, *v1alpha1.Cluster) (*v1alpha1.Cluster, error)) *ArgoDB_CreateCluster_Call { +func (_c *ArgoDB_CreateCluster_Call) RunAndReturn(run func(ctx context.Context, c *v1alpha1.Cluster) (*v1alpha1.Cluster, error)) *ArgoDB_CreateCluster_Call { _c.Call.Return(run) return _c } -// CreateRepoCertificate provides a mock function with given fields: ctx, certificate, upsert -func (_m *ArgoDB) CreateRepoCertificate(ctx context.Context, certificate *v1alpha1.RepositoryCertificateList, upsert bool) (*v1alpha1.RepositoryCertificateList, error) { - ret := _m.Called(ctx, certificate, upsert) +// CreateRepoCertificate provides a mock function for the type ArgoDB +func (_mock *ArgoDB) CreateRepoCertificate(ctx context.Context, certificate *v1alpha1.RepositoryCertificateList, upsert bool) (*v1alpha1.RepositoryCertificateList, error) { + ret := _mock.Called(ctx, certificate, upsert) if len(ret) == 0 { panic("no return value specified for CreateRepoCertificate") @@ -161,23 +171,21 @@ func (_m *ArgoDB) CreateRepoCertificate(ctx context.Context, certificate *v1alph var r0 *v1alpha1.RepositoryCertificateList var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepositoryCertificateList, bool) (*v1alpha1.RepositoryCertificateList, error)); ok { - return rf(ctx, certificate, upsert) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepositoryCertificateList, bool) (*v1alpha1.RepositoryCertificateList, error)); ok { + return returnFunc(ctx, certificate, upsert) } - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepositoryCertificateList, bool) *v1alpha1.RepositoryCertificateList); ok { - r0 = rf(ctx, certificate, upsert) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepositoryCertificateList, bool) *v1alpha1.RepositoryCertificateList); ok { + r0 = returnFunc(ctx, certificate, upsert) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.RepositoryCertificateList) } } - - if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepositoryCertificateList, bool) error); ok { - r1 = rf(ctx, certificate, upsert) + if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepositoryCertificateList, bool) error); ok { + r1 = returnFunc(ctx, certificate, upsert) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -187,9 +195,9 @@ type ArgoDB_CreateRepoCertificate_Call struct { } // CreateRepoCertificate is a helper method to define mock.On call -// - ctx context.Context -// - certificate *v1alpha1.RepositoryCertificateList -// - upsert bool +// - ctx +// - certificate +// - upsert func (_e *ArgoDB_Expecter) CreateRepoCertificate(ctx interface{}, certificate interface{}, upsert interface{}) *ArgoDB_CreateRepoCertificate_Call { return &ArgoDB_CreateRepoCertificate_Call{Call: _e.mock.On("CreateRepoCertificate", ctx, certificate, upsert)} } @@ -201,19 +209,19 @@ func (_c *ArgoDB_CreateRepoCertificate_Call) Run(run func(ctx context.Context, c return _c } -func (_c *ArgoDB_CreateRepoCertificate_Call) Return(_a0 *v1alpha1.RepositoryCertificateList, _a1 error) *ArgoDB_CreateRepoCertificate_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_CreateRepoCertificate_Call) Return(repositoryCertificateList *v1alpha1.RepositoryCertificateList, err error) *ArgoDB_CreateRepoCertificate_Call { + _c.Call.Return(repositoryCertificateList, err) return _c } -func (_c *ArgoDB_CreateRepoCertificate_Call) RunAndReturn(run func(context.Context, *v1alpha1.RepositoryCertificateList, bool) (*v1alpha1.RepositoryCertificateList, error)) *ArgoDB_CreateRepoCertificate_Call { +func (_c *ArgoDB_CreateRepoCertificate_Call) RunAndReturn(run func(ctx context.Context, certificate *v1alpha1.RepositoryCertificateList, upsert bool) (*v1alpha1.RepositoryCertificateList, error)) *ArgoDB_CreateRepoCertificate_Call { _c.Call.Return(run) return _c } -// CreateRepository provides a mock function with given fields: ctx, r -func (_m *ArgoDB) CreateRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) { - ret := _m.Called(ctx, r) +// CreateRepository provides a mock function for the type ArgoDB +func (_mock *ArgoDB) CreateRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) { + ret := _mock.Called(ctx, r) if len(ret) == 0 { panic("no return value specified for CreateRepository") @@ -221,23 +229,21 @@ func (_m *ArgoDB) CreateRepository(ctx context.Context, r *v1alpha1.Repository) var r0 *v1alpha1.Repository var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)); ok { - return rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)); ok { + return returnFunc(ctx, r) } - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) *v1alpha1.Repository); ok { - r0 = rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) *v1alpha1.Repository); ok { + r0 = returnFunc(ctx, r) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.Repository) } } - - if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.Repository) error); ok { - r1 = rf(ctx, r) + if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.Repository) error); ok { + r1 = returnFunc(ctx, r) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -247,8 +253,8 @@ type ArgoDB_CreateRepository_Call struct { } // CreateRepository is a helper method to define mock.On call -// - ctx context.Context -// - r *v1alpha1.Repository +// - ctx +// - r func (_e *ArgoDB_Expecter) CreateRepository(ctx interface{}, r interface{}) *ArgoDB_CreateRepository_Call { return &ArgoDB_CreateRepository_Call{Call: _e.mock.On("CreateRepository", ctx, r)} } @@ -260,19 +266,19 @@ func (_c *ArgoDB_CreateRepository_Call) Run(run func(ctx context.Context, r *v1a return _c } -func (_c *ArgoDB_CreateRepository_Call) Return(_a0 *v1alpha1.Repository, _a1 error) *ArgoDB_CreateRepository_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_CreateRepository_Call) Return(repository *v1alpha1.Repository, err error) *ArgoDB_CreateRepository_Call { + _c.Call.Return(repository, err) return _c } -func (_c *ArgoDB_CreateRepository_Call) RunAndReturn(run func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)) *ArgoDB_CreateRepository_Call { +func (_c *ArgoDB_CreateRepository_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error)) *ArgoDB_CreateRepository_Call { _c.Call.Return(run) return _c } -// CreateRepositoryCredentials provides a mock function with given fields: ctx, r -func (_m *ArgoDB) CreateRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) { - ret := _m.Called(ctx, r) +// CreateRepositoryCredentials provides a mock function for the type ArgoDB +func (_mock *ArgoDB) CreateRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) { + ret := _mock.Called(ctx, r) if len(ret) == 0 { panic("no return value specified for CreateRepositoryCredentials") @@ -280,23 +286,21 @@ func (_m *ArgoDB) CreateRepositoryCredentials(ctx context.Context, r *v1alpha1.R var r0 *v1alpha1.RepoCreds var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)); ok { - return rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)); ok { + return returnFunc(ctx, r) } - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) *v1alpha1.RepoCreds); ok { - r0 = rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) *v1alpha1.RepoCreds); ok { + r0 = returnFunc(ctx, r) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.RepoCreds) } } - - if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepoCreds) error); ok { - r1 = rf(ctx, r) + if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepoCreds) error); ok { + r1 = returnFunc(ctx, r) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -306,8 +310,8 @@ type ArgoDB_CreateRepositoryCredentials_Call struct { } // CreateRepositoryCredentials is a helper method to define mock.On call -// - ctx context.Context -// - r *v1alpha1.RepoCreds +// - ctx +// - r func (_e *ArgoDB_Expecter) CreateRepositoryCredentials(ctx interface{}, r interface{}) *ArgoDB_CreateRepositoryCredentials_Call { return &ArgoDB_CreateRepositoryCredentials_Call{Call: _e.mock.On("CreateRepositoryCredentials", ctx, r)} } @@ -319,19 +323,19 @@ func (_c *ArgoDB_CreateRepositoryCredentials_Call) Run(run func(ctx context.Cont return _c } -func (_c *ArgoDB_CreateRepositoryCredentials_Call) Return(_a0 *v1alpha1.RepoCreds, _a1 error) *ArgoDB_CreateRepositoryCredentials_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_CreateRepositoryCredentials_Call) Return(repoCreds *v1alpha1.RepoCreds, err error) *ArgoDB_CreateRepositoryCredentials_Call { + _c.Call.Return(repoCreds, err) return _c } -func (_c *ArgoDB_CreateRepositoryCredentials_Call) RunAndReturn(run func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *ArgoDB_CreateRepositoryCredentials_Call { +func (_c *ArgoDB_CreateRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *ArgoDB_CreateRepositoryCredentials_Call { _c.Call.Return(run) return _c } -// CreateWriteRepository provides a mock function with given fields: ctx, r -func (_m *ArgoDB) CreateWriteRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) { - ret := _m.Called(ctx, r) +// CreateWriteRepository provides a mock function for the type ArgoDB +func (_mock *ArgoDB) CreateWriteRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) { + ret := _mock.Called(ctx, r) if len(ret) == 0 { panic("no return value specified for CreateWriteRepository") @@ -339,23 +343,21 @@ func (_m *ArgoDB) CreateWriteRepository(ctx context.Context, r *v1alpha1.Reposit var r0 *v1alpha1.Repository var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)); ok { - return rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)); ok { + return returnFunc(ctx, r) } - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) *v1alpha1.Repository); ok { - r0 = rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) *v1alpha1.Repository); ok { + r0 = returnFunc(ctx, r) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.Repository) } } - - if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.Repository) error); ok { - r1 = rf(ctx, r) + if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.Repository) error); ok { + r1 = returnFunc(ctx, r) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -365,8 +367,8 @@ type ArgoDB_CreateWriteRepository_Call struct { } // CreateWriteRepository is a helper method to define mock.On call -// - ctx context.Context -// - r *v1alpha1.Repository +// - ctx +// - r func (_e *ArgoDB_Expecter) CreateWriteRepository(ctx interface{}, r interface{}) *ArgoDB_CreateWriteRepository_Call { return &ArgoDB_CreateWriteRepository_Call{Call: _e.mock.On("CreateWriteRepository", ctx, r)} } @@ -378,19 +380,19 @@ func (_c *ArgoDB_CreateWriteRepository_Call) Run(run func(ctx context.Context, r return _c } -func (_c *ArgoDB_CreateWriteRepository_Call) Return(_a0 *v1alpha1.Repository, _a1 error) *ArgoDB_CreateWriteRepository_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_CreateWriteRepository_Call) Return(repository *v1alpha1.Repository, err error) *ArgoDB_CreateWriteRepository_Call { + _c.Call.Return(repository, err) return _c } -func (_c *ArgoDB_CreateWriteRepository_Call) RunAndReturn(run func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)) *ArgoDB_CreateWriteRepository_Call { +func (_c *ArgoDB_CreateWriteRepository_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error)) *ArgoDB_CreateWriteRepository_Call { _c.Call.Return(run) return _c } -// CreateWriteRepositoryCredentials provides a mock function with given fields: ctx, r -func (_m *ArgoDB) CreateWriteRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) { - ret := _m.Called(ctx, r) +// CreateWriteRepositoryCredentials provides a mock function for the type ArgoDB +func (_mock *ArgoDB) CreateWriteRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) { + ret := _mock.Called(ctx, r) if len(ret) == 0 { panic("no return value specified for CreateWriteRepositoryCredentials") @@ -398,23 +400,21 @@ func (_m *ArgoDB) CreateWriteRepositoryCredentials(ctx context.Context, r *v1alp var r0 *v1alpha1.RepoCreds var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)); ok { - return rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)); ok { + return returnFunc(ctx, r) } - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) *v1alpha1.RepoCreds); ok { - r0 = rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) *v1alpha1.RepoCreds); ok { + r0 = returnFunc(ctx, r) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.RepoCreds) } } - - if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepoCreds) error); ok { - r1 = rf(ctx, r) + if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepoCreds) error); ok { + r1 = returnFunc(ctx, r) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -424,8 +424,8 @@ type ArgoDB_CreateWriteRepositoryCredentials_Call struct { } // CreateWriteRepositoryCredentials is a helper method to define mock.On call -// - ctx context.Context -// - r *v1alpha1.RepoCreds +// - ctx +// - r func (_e *ArgoDB_Expecter) CreateWriteRepositoryCredentials(ctx interface{}, r interface{}) *ArgoDB_CreateWriteRepositoryCredentials_Call { return &ArgoDB_CreateWriteRepositoryCredentials_Call{Call: _e.mock.On("CreateWriteRepositoryCredentials", ctx, r)} } @@ -437,31 +437,30 @@ func (_c *ArgoDB_CreateWriteRepositoryCredentials_Call) Run(run func(ctx context return _c } -func (_c *ArgoDB_CreateWriteRepositoryCredentials_Call) Return(_a0 *v1alpha1.RepoCreds, _a1 error) *ArgoDB_CreateWriteRepositoryCredentials_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_CreateWriteRepositoryCredentials_Call) Return(repoCreds *v1alpha1.RepoCreds, err error) *ArgoDB_CreateWriteRepositoryCredentials_Call { + _c.Call.Return(repoCreds, err) return _c } -func (_c *ArgoDB_CreateWriteRepositoryCredentials_Call) RunAndReturn(run func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *ArgoDB_CreateWriteRepositoryCredentials_Call { +func (_c *ArgoDB_CreateWriteRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *ArgoDB_CreateWriteRepositoryCredentials_Call { _c.Call.Return(run) return _c } -// DeleteCluster provides a mock function with given fields: ctx, server -func (_m *ArgoDB) DeleteCluster(ctx context.Context, server string) error { - ret := _m.Called(ctx, server) +// DeleteCluster provides a mock function for the type ArgoDB +func (_mock *ArgoDB) DeleteCluster(ctx context.Context, server string) error { + ret := _mock.Called(ctx, server) if len(ret) == 0 { panic("no return value specified for DeleteCluster") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, server) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { + r0 = returnFunc(ctx, server) } else { r0 = ret.Error(0) } - return r0 } @@ -471,8 +470,8 @@ type ArgoDB_DeleteCluster_Call struct { } // DeleteCluster is a helper method to define mock.On call -// - ctx context.Context -// - server string +// - ctx +// - server func (_e *ArgoDB_Expecter) DeleteCluster(ctx interface{}, server interface{}) *ArgoDB_DeleteCluster_Call { return &ArgoDB_DeleteCluster_Call{Call: _e.mock.On("DeleteCluster", ctx, server)} } @@ -484,31 +483,30 @@ func (_c *ArgoDB_DeleteCluster_Call) Run(run func(ctx context.Context, server st return _c } -func (_c *ArgoDB_DeleteCluster_Call) Return(_a0 error) *ArgoDB_DeleteCluster_Call { - _c.Call.Return(_a0) +func (_c *ArgoDB_DeleteCluster_Call) Return(err error) *ArgoDB_DeleteCluster_Call { + _c.Call.Return(err) return _c } -func (_c *ArgoDB_DeleteCluster_Call) RunAndReturn(run func(context.Context, string) error) *ArgoDB_DeleteCluster_Call { +func (_c *ArgoDB_DeleteCluster_Call) RunAndReturn(run func(ctx context.Context, server string) error) *ArgoDB_DeleteCluster_Call { _c.Call.Return(run) return _c } -// DeleteGPGPublicKey provides a mock function with given fields: ctx, keyID -func (_m *ArgoDB) DeleteGPGPublicKey(ctx context.Context, keyID string) error { - ret := _m.Called(ctx, keyID) +// DeleteGPGPublicKey provides a mock function for the type ArgoDB +func (_mock *ArgoDB) DeleteGPGPublicKey(ctx context.Context, keyID string) error { + ret := _mock.Called(ctx, keyID) if len(ret) == 0 { panic("no return value specified for DeleteGPGPublicKey") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, keyID) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { + r0 = returnFunc(ctx, keyID) } else { r0 = ret.Error(0) } - return r0 } @@ -518,8 +516,8 @@ type ArgoDB_DeleteGPGPublicKey_Call struct { } // DeleteGPGPublicKey is a helper method to define mock.On call -// - ctx context.Context -// - keyID string +// - ctx +// - keyID func (_e *ArgoDB_Expecter) DeleteGPGPublicKey(ctx interface{}, keyID interface{}) *ArgoDB_DeleteGPGPublicKey_Call { return &ArgoDB_DeleteGPGPublicKey_Call{Call: _e.mock.On("DeleteGPGPublicKey", ctx, keyID)} } @@ -531,31 +529,30 @@ func (_c *ArgoDB_DeleteGPGPublicKey_Call) Run(run func(ctx context.Context, keyI return _c } -func (_c *ArgoDB_DeleteGPGPublicKey_Call) Return(_a0 error) *ArgoDB_DeleteGPGPublicKey_Call { - _c.Call.Return(_a0) +func (_c *ArgoDB_DeleteGPGPublicKey_Call) Return(err error) *ArgoDB_DeleteGPGPublicKey_Call { + _c.Call.Return(err) return _c } -func (_c *ArgoDB_DeleteGPGPublicKey_Call) RunAndReturn(run func(context.Context, string) error) *ArgoDB_DeleteGPGPublicKey_Call { +func (_c *ArgoDB_DeleteGPGPublicKey_Call) RunAndReturn(run func(ctx context.Context, keyID string) error) *ArgoDB_DeleteGPGPublicKey_Call { _c.Call.Return(run) return _c } -// DeleteRepository provides a mock function with given fields: ctx, name, project -func (_m *ArgoDB) DeleteRepository(ctx context.Context, name string, project string) error { - ret := _m.Called(ctx, name, project) +// DeleteRepository provides a mock function for the type ArgoDB +func (_mock *ArgoDB) DeleteRepository(ctx context.Context, name string, project string) error { + ret := _mock.Called(ctx, name, project) if len(ret) == 0 { panic("no return value specified for DeleteRepository") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { - r0 = rf(ctx, name, project) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { + r0 = returnFunc(ctx, name, project) } else { r0 = ret.Error(0) } - return r0 } @@ -565,9 +562,9 @@ type ArgoDB_DeleteRepository_Call struct { } // DeleteRepository is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - project string +// - ctx +// - name +// - project func (_e *ArgoDB_Expecter) DeleteRepository(ctx interface{}, name interface{}, project interface{}) *ArgoDB_DeleteRepository_Call { return &ArgoDB_DeleteRepository_Call{Call: _e.mock.On("DeleteRepository", ctx, name, project)} } @@ -579,31 +576,30 @@ func (_c *ArgoDB_DeleteRepository_Call) Run(run func(ctx context.Context, name s return _c } -func (_c *ArgoDB_DeleteRepository_Call) Return(_a0 error) *ArgoDB_DeleteRepository_Call { - _c.Call.Return(_a0) +func (_c *ArgoDB_DeleteRepository_Call) Return(err error) *ArgoDB_DeleteRepository_Call { + _c.Call.Return(err) return _c } -func (_c *ArgoDB_DeleteRepository_Call) RunAndReturn(run func(context.Context, string, string) error) *ArgoDB_DeleteRepository_Call { +func (_c *ArgoDB_DeleteRepository_Call) RunAndReturn(run func(ctx context.Context, name string, project string) error) *ArgoDB_DeleteRepository_Call { _c.Call.Return(run) return _c } -// DeleteRepositoryCredentials provides a mock function with given fields: ctx, name -func (_m *ArgoDB) DeleteRepositoryCredentials(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) +// DeleteRepositoryCredentials provides a mock function for the type ArgoDB +func (_mock *ArgoDB) DeleteRepositoryCredentials(ctx context.Context, name string) error { + ret := _mock.Called(ctx, name) if len(ret) == 0 { panic("no return value specified for DeleteRepositoryCredentials") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { + r0 = returnFunc(ctx, name) } else { r0 = ret.Error(0) } - return r0 } @@ -613,8 +609,8 @@ type ArgoDB_DeleteRepositoryCredentials_Call struct { } // DeleteRepositoryCredentials is a helper method to define mock.On call -// - ctx context.Context -// - name string +// - ctx +// - name func (_e *ArgoDB_Expecter) DeleteRepositoryCredentials(ctx interface{}, name interface{}) *ArgoDB_DeleteRepositoryCredentials_Call { return &ArgoDB_DeleteRepositoryCredentials_Call{Call: _e.mock.On("DeleteRepositoryCredentials", ctx, name)} } @@ -626,31 +622,30 @@ func (_c *ArgoDB_DeleteRepositoryCredentials_Call) Run(run func(ctx context.Cont return _c } -func (_c *ArgoDB_DeleteRepositoryCredentials_Call) Return(_a0 error) *ArgoDB_DeleteRepositoryCredentials_Call { - _c.Call.Return(_a0) +func (_c *ArgoDB_DeleteRepositoryCredentials_Call) Return(err error) *ArgoDB_DeleteRepositoryCredentials_Call { + _c.Call.Return(err) return _c } -func (_c *ArgoDB_DeleteRepositoryCredentials_Call) RunAndReturn(run func(context.Context, string) error) *ArgoDB_DeleteRepositoryCredentials_Call { +func (_c *ArgoDB_DeleteRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, name string) error) *ArgoDB_DeleteRepositoryCredentials_Call { _c.Call.Return(run) return _c } -// DeleteWriteRepository provides a mock function with given fields: ctx, name, project -func (_m *ArgoDB) DeleteWriteRepository(ctx context.Context, name string, project string) error { - ret := _m.Called(ctx, name, project) +// DeleteWriteRepository provides a mock function for the type ArgoDB +func (_mock *ArgoDB) DeleteWriteRepository(ctx context.Context, name string, project string) error { + ret := _mock.Called(ctx, name, project) if len(ret) == 0 { panic("no return value specified for DeleteWriteRepository") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { - r0 = rf(ctx, name, project) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { + r0 = returnFunc(ctx, name, project) } else { r0 = ret.Error(0) } - return r0 } @@ -660,9 +655,9 @@ type ArgoDB_DeleteWriteRepository_Call struct { } // DeleteWriteRepository is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - project string +// - ctx +// - name +// - project func (_e *ArgoDB_Expecter) DeleteWriteRepository(ctx interface{}, name interface{}, project interface{}) *ArgoDB_DeleteWriteRepository_Call { return &ArgoDB_DeleteWriteRepository_Call{Call: _e.mock.On("DeleteWriteRepository", ctx, name, project)} } @@ -674,31 +669,30 @@ func (_c *ArgoDB_DeleteWriteRepository_Call) Run(run func(ctx context.Context, n return _c } -func (_c *ArgoDB_DeleteWriteRepository_Call) Return(_a0 error) *ArgoDB_DeleteWriteRepository_Call { - _c.Call.Return(_a0) +func (_c *ArgoDB_DeleteWriteRepository_Call) Return(err error) *ArgoDB_DeleteWriteRepository_Call { + _c.Call.Return(err) return _c } -func (_c *ArgoDB_DeleteWriteRepository_Call) RunAndReturn(run func(context.Context, string, string) error) *ArgoDB_DeleteWriteRepository_Call { +func (_c *ArgoDB_DeleteWriteRepository_Call) RunAndReturn(run func(ctx context.Context, name string, project string) error) *ArgoDB_DeleteWriteRepository_Call { _c.Call.Return(run) return _c } -// DeleteWriteRepositoryCredentials provides a mock function with given fields: ctx, name -func (_m *ArgoDB) DeleteWriteRepositoryCredentials(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) +// DeleteWriteRepositoryCredentials provides a mock function for the type ArgoDB +func (_mock *ArgoDB) DeleteWriteRepositoryCredentials(ctx context.Context, name string) error { + ret := _mock.Called(ctx, name) if len(ret) == 0 { panic("no return value specified for DeleteWriteRepositoryCredentials") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { + r0 = returnFunc(ctx, name) } else { r0 = ret.Error(0) } - return r0 } @@ -708,8 +702,8 @@ type ArgoDB_DeleteWriteRepositoryCredentials_Call struct { } // DeleteWriteRepositoryCredentials is a helper method to define mock.On call -// - ctx context.Context -// - name string +// - ctx +// - name func (_e *ArgoDB_Expecter) DeleteWriteRepositoryCredentials(ctx interface{}, name interface{}) *ArgoDB_DeleteWriteRepositoryCredentials_Call { return &ArgoDB_DeleteWriteRepositoryCredentials_Call{Call: _e.mock.On("DeleteWriteRepositoryCredentials", ctx, name)} } @@ -721,19 +715,19 @@ func (_c *ArgoDB_DeleteWriteRepositoryCredentials_Call) Run(run func(ctx context return _c } -func (_c *ArgoDB_DeleteWriteRepositoryCredentials_Call) Return(_a0 error) *ArgoDB_DeleteWriteRepositoryCredentials_Call { - _c.Call.Return(_a0) +func (_c *ArgoDB_DeleteWriteRepositoryCredentials_Call) Return(err error) *ArgoDB_DeleteWriteRepositoryCredentials_Call { + _c.Call.Return(err) return _c } -func (_c *ArgoDB_DeleteWriteRepositoryCredentials_Call) RunAndReturn(run func(context.Context, string) error) *ArgoDB_DeleteWriteRepositoryCredentials_Call { +func (_c *ArgoDB_DeleteWriteRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, name string) error) *ArgoDB_DeleteWriteRepositoryCredentials_Call { _c.Call.Return(run) return _c } -// GetAllHelmRepositoryCredentials provides a mock function with given fields: ctx -func (_m *ArgoDB) GetAllHelmRepositoryCredentials(ctx context.Context) ([]*v1alpha1.RepoCreds, error) { - ret := _m.Called(ctx) +// GetAllHelmRepositoryCredentials provides a mock function for the type ArgoDB +func (_mock *ArgoDB) GetAllHelmRepositoryCredentials(ctx context.Context) ([]*v1alpha1.RepoCreds, error) { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetAllHelmRepositoryCredentials") @@ -741,23 +735,21 @@ func (_m *ArgoDB) GetAllHelmRepositoryCredentials(ctx context.Context) ([]*v1alp var r0 []*v1alpha1.RepoCreds var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.RepoCreds, error)); ok { - return rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.RepoCreds, error)); ok { + return returnFunc(ctx) } - if rf, ok := ret.Get(0).(func(context.Context) []*v1alpha1.RepoCreds); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) []*v1alpha1.RepoCreds); ok { + r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*v1alpha1.RepoCreds) } } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -767,7 +759,7 @@ type ArgoDB_GetAllHelmRepositoryCredentials_Call struct { } // GetAllHelmRepositoryCredentials is a helper method to define mock.On call -// - ctx context.Context +// - ctx func (_e *ArgoDB_Expecter) GetAllHelmRepositoryCredentials(ctx interface{}) *ArgoDB_GetAllHelmRepositoryCredentials_Call { return &ArgoDB_GetAllHelmRepositoryCredentials_Call{Call: _e.mock.On("GetAllHelmRepositoryCredentials", ctx)} } @@ -779,31 +771,30 @@ func (_c *ArgoDB_GetAllHelmRepositoryCredentials_Call) Run(run func(ctx context. return _c } -func (_c *ArgoDB_GetAllHelmRepositoryCredentials_Call) Return(_a0 []*v1alpha1.RepoCreds, _a1 error) *ArgoDB_GetAllHelmRepositoryCredentials_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_GetAllHelmRepositoryCredentials_Call) Return(repoCredss []*v1alpha1.RepoCreds, err error) *ArgoDB_GetAllHelmRepositoryCredentials_Call { + _c.Call.Return(repoCredss, err) return _c } -func (_c *ArgoDB_GetAllHelmRepositoryCredentials_Call) RunAndReturn(run func(context.Context) ([]*v1alpha1.RepoCreds, error)) *ArgoDB_GetAllHelmRepositoryCredentials_Call { +func (_c *ArgoDB_GetAllHelmRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context) ([]*v1alpha1.RepoCreds, error)) *ArgoDB_GetAllHelmRepositoryCredentials_Call { _c.Call.Return(run) return _c } -// GetApplicationControllerReplicas provides a mock function with no fields -func (_m *ArgoDB) GetApplicationControllerReplicas() int { - ret := _m.Called() +// GetApplicationControllerReplicas provides a mock function for the type ArgoDB +func (_mock *ArgoDB) GetApplicationControllerReplicas() int { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetApplicationControllerReplicas") } var r0 int - if rf, ok := ret.Get(0).(func() int); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() int); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(int) } - return r0 } @@ -824,8 +815,8 @@ func (_c *ArgoDB_GetApplicationControllerReplicas_Call) Run(run func()) *ArgoDB_ return _c } -func (_c *ArgoDB_GetApplicationControllerReplicas_Call) Return(_a0 int) *ArgoDB_GetApplicationControllerReplicas_Call { - _c.Call.Return(_a0) +func (_c *ArgoDB_GetApplicationControllerReplicas_Call) Return(n int) *ArgoDB_GetApplicationControllerReplicas_Call { + _c.Call.Return(n) return _c } @@ -834,9 +825,9 @@ func (_c *ArgoDB_GetApplicationControllerReplicas_Call) RunAndReturn(run func() return _c } -// GetCluster provides a mock function with given fields: ctx, server -func (_m *ArgoDB) GetCluster(ctx context.Context, server string) (*v1alpha1.Cluster, error) { - ret := _m.Called(ctx, server) +// GetCluster provides a mock function for the type ArgoDB +func (_mock *ArgoDB) GetCluster(ctx context.Context, server string) (*v1alpha1.Cluster, error) { + ret := _mock.Called(ctx, server) if len(ret) == 0 { panic("no return value specified for GetCluster") @@ -844,23 +835,21 @@ func (_m *ArgoDB) GetCluster(ctx context.Context, server string) (*v1alpha1.Clus var r0 *v1alpha1.Cluster var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.Cluster, error)); ok { - return rf(ctx, server) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.Cluster, error)); ok { + return returnFunc(ctx, server) } - if rf, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.Cluster); ok { - r0 = rf(ctx, server) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.Cluster); ok { + r0 = returnFunc(ctx, server) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.Cluster) } } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, server) + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, server) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -870,8 +859,8 @@ type ArgoDB_GetCluster_Call struct { } // GetCluster is a helper method to define mock.On call -// - ctx context.Context -// - server string +// - ctx +// - server func (_e *ArgoDB_Expecter) GetCluster(ctx interface{}, server interface{}) *ArgoDB_GetCluster_Call { return &ArgoDB_GetCluster_Call{Call: _e.mock.On("GetCluster", ctx, server)} } @@ -883,19 +872,19 @@ func (_c *ArgoDB_GetCluster_Call) Run(run func(ctx context.Context, server strin return _c } -func (_c *ArgoDB_GetCluster_Call) Return(_a0 *v1alpha1.Cluster, _a1 error) *ArgoDB_GetCluster_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_GetCluster_Call) Return(cluster *v1alpha1.Cluster, err error) *ArgoDB_GetCluster_Call { + _c.Call.Return(cluster, err) return _c } -func (_c *ArgoDB_GetCluster_Call) RunAndReturn(run func(context.Context, string) (*v1alpha1.Cluster, error)) *ArgoDB_GetCluster_Call { +func (_c *ArgoDB_GetCluster_Call) RunAndReturn(run func(ctx context.Context, server string) (*v1alpha1.Cluster, error)) *ArgoDB_GetCluster_Call { _c.Call.Return(run) return _c } -// GetClusterServersByName provides a mock function with given fields: ctx, name -func (_m *ArgoDB) GetClusterServersByName(ctx context.Context, name string) ([]string, error) { - ret := _m.Called(ctx, name) +// GetClusterServersByName provides a mock function for the type ArgoDB +func (_mock *ArgoDB) GetClusterServersByName(ctx context.Context, name string) ([]string, error) { + ret := _mock.Called(ctx, name) if len(ret) == 0 { panic("no return value specified for GetClusterServersByName") @@ -903,23 +892,21 @@ func (_m *ArgoDB) GetClusterServersByName(ctx context.Context, name string) ([]s var r0 []string var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok { - return rf(ctx, name) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok { + return returnFunc(ctx, name) } - if rf, ok := ret.Get(0).(func(context.Context, string) []string); ok { - r0 = rf(ctx, name) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) []string); ok { + r0 = returnFunc(ctx, name) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, name) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -929,8 +916,8 @@ type ArgoDB_GetClusterServersByName_Call struct { } // GetClusterServersByName is a helper method to define mock.On call -// - ctx context.Context -// - name string +// - ctx +// - name func (_e *ArgoDB_Expecter) GetClusterServersByName(ctx interface{}, name interface{}) *ArgoDB_GetClusterServersByName_Call { return &ArgoDB_GetClusterServersByName_Call{Call: _e.mock.On("GetClusterServersByName", ctx, name)} } @@ -942,19 +929,19 @@ func (_c *ArgoDB_GetClusterServersByName_Call) Run(run func(ctx context.Context, return _c } -func (_c *ArgoDB_GetClusterServersByName_Call) Return(_a0 []string, _a1 error) *ArgoDB_GetClusterServersByName_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_GetClusterServersByName_Call) Return(strings []string, err error) *ArgoDB_GetClusterServersByName_Call { + _c.Call.Return(strings, err) return _c } -func (_c *ArgoDB_GetClusterServersByName_Call) RunAndReturn(run func(context.Context, string) ([]string, error)) *ArgoDB_GetClusterServersByName_Call { +func (_c *ArgoDB_GetClusterServersByName_Call) RunAndReturn(run func(ctx context.Context, name string) ([]string, error)) *ArgoDB_GetClusterServersByName_Call { _c.Call.Return(run) return _c } -// GetProjectClusters provides a mock function with given fields: ctx, project -func (_m *ArgoDB) GetProjectClusters(ctx context.Context, project string) ([]*v1alpha1.Cluster, error) { - ret := _m.Called(ctx, project) +// GetProjectClusters provides a mock function for the type ArgoDB +func (_mock *ArgoDB) GetProjectClusters(ctx context.Context, project string) ([]*v1alpha1.Cluster, error) { + ret := _mock.Called(ctx, project) if len(ret) == 0 { panic("no return value specified for GetProjectClusters") @@ -962,23 +949,21 @@ func (_m *ArgoDB) GetProjectClusters(ctx context.Context, project string) ([]*v1 var r0 []*v1alpha1.Cluster var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) ([]*v1alpha1.Cluster, error)); ok { - return rf(ctx, project) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]*v1alpha1.Cluster, error)); ok { + return returnFunc(ctx, project) } - if rf, ok := ret.Get(0).(func(context.Context, string) []*v1alpha1.Cluster); ok { - r0 = rf(ctx, project) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) []*v1alpha1.Cluster); ok { + r0 = returnFunc(ctx, project) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*v1alpha1.Cluster) } } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, project) + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, project) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -988,8 +973,8 @@ type ArgoDB_GetProjectClusters_Call struct { } // GetProjectClusters is a helper method to define mock.On call -// - ctx context.Context -// - project string +// - ctx +// - project func (_e *ArgoDB_Expecter) GetProjectClusters(ctx interface{}, project interface{}) *ArgoDB_GetProjectClusters_Call { return &ArgoDB_GetProjectClusters_Call{Call: _e.mock.On("GetProjectClusters", ctx, project)} } @@ -1001,19 +986,19 @@ func (_c *ArgoDB_GetProjectClusters_Call) Run(run func(ctx context.Context, proj return _c } -func (_c *ArgoDB_GetProjectClusters_Call) Return(_a0 []*v1alpha1.Cluster, _a1 error) *ArgoDB_GetProjectClusters_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_GetProjectClusters_Call) Return(clusters []*v1alpha1.Cluster, err error) *ArgoDB_GetProjectClusters_Call { + _c.Call.Return(clusters, err) return _c } -func (_c *ArgoDB_GetProjectClusters_Call) RunAndReturn(run func(context.Context, string) ([]*v1alpha1.Cluster, error)) *ArgoDB_GetProjectClusters_Call { +func (_c *ArgoDB_GetProjectClusters_Call) RunAndReturn(run func(ctx context.Context, project string) ([]*v1alpha1.Cluster, error)) *ArgoDB_GetProjectClusters_Call { _c.Call.Return(run) return _c } -// GetProjectRepositories provides a mock function with given fields: project -func (_m *ArgoDB) GetProjectRepositories(project string) ([]*v1alpha1.Repository, error) { - ret := _m.Called(project) +// GetProjectRepositories provides a mock function for the type ArgoDB +func (_mock *ArgoDB) GetProjectRepositories(project string) ([]*v1alpha1.Repository, error) { + ret := _mock.Called(project) if len(ret) == 0 { panic("no return value specified for GetProjectRepositories") @@ -1021,23 +1006,21 @@ func (_m *ArgoDB) GetProjectRepositories(project string) ([]*v1alpha1.Repository var r0 []*v1alpha1.Repository var r1 error - if rf, ok := ret.Get(0).(func(string) ([]*v1alpha1.Repository, error)); ok { - return rf(project) + if returnFunc, ok := ret.Get(0).(func(string) ([]*v1alpha1.Repository, error)); ok { + return returnFunc(project) } - if rf, ok := ret.Get(0).(func(string) []*v1alpha1.Repository); ok { - r0 = rf(project) + if returnFunc, ok := ret.Get(0).(func(string) []*v1alpha1.Repository); ok { + r0 = returnFunc(project) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*v1alpha1.Repository) } } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(project) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(project) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1047,7 +1030,7 @@ type ArgoDB_GetProjectRepositories_Call struct { } // GetProjectRepositories is a helper method to define mock.On call -// - project string +// - project func (_e *ArgoDB_Expecter) GetProjectRepositories(project interface{}) *ArgoDB_GetProjectRepositories_Call { return &ArgoDB_GetProjectRepositories_Call{Call: _e.mock.On("GetProjectRepositories", project)} } @@ -1059,19 +1042,19 @@ func (_c *ArgoDB_GetProjectRepositories_Call) Run(run func(project string)) *Arg return _c } -func (_c *ArgoDB_GetProjectRepositories_Call) Return(_a0 []*v1alpha1.Repository, _a1 error) *ArgoDB_GetProjectRepositories_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_GetProjectRepositories_Call) Return(repositorys []*v1alpha1.Repository, err error) *ArgoDB_GetProjectRepositories_Call { + _c.Call.Return(repositorys, err) return _c } -func (_c *ArgoDB_GetProjectRepositories_Call) RunAndReturn(run func(string) ([]*v1alpha1.Repository, error)) *ArgoDB_GetProjectRepositories_Call { +func (_c *ArgoDB_GetProjectRepositories_Call) RunAndReturn(run func(project string) ([]*v1alpha1.Repository, error)) *ArgoDB_GetProjectRepositories_Call { _c.Call.Return(run) return _c } -// GetProjectWriteRepositories provides a mock function with given fields: project -func (_m *ArgoDB) GetProjectWriteRepositories(project string) ([]*v1alpha1.Repository, error) { - ret := _m.Called(project) +// GetProjectWriteRepositories provides a mock function for the type ArgoDB +func (_mock *ArgoDB) GetProjectWriteRepositories(project string) ([]*v1alpha1.Repository, error) { + ret := _mock.Called(project) if len(ret) == 0 { panic("no return value specified for GetProjectWriteRepositories") @@ -1079,23 +1062,21 @@ func (_m *ArgoDB) GetProjectWriteRepositories(project string) ([]*v1alpha1.Repos var r0 []*v1alpha1.Repository var r1 error - if rf, ok := ret.Get(0).(func(string) ([]*v1alpha1.Repository, error)); ok { - return rf(project) + if returnFunc, ok := ret.Get(0).(func(string) ([]*v1alpha1.Repository, error)); ok { + return returnFunc(project) } - if rf, ok := ret.Get(0).(func(string) []*v1alpha1.Repository); ok { - r0 = rf(project) + if returnFunc, ok := ret.Get(0).(func(string) []*v1alpha1.Repository); ok { + r0 = returnFunc(project) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*v1alpha1.Repository) } } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(project) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(project) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1105,7 +1086,7 @@ type ArgoDB_GetProjectWriteRepositories_Call struct { } // GetProjectWriteRepositories is a helper method to define mock.On call -// - project string +// - project func (_e *ArgoDB_Expecter) GetProjectWriteRepositories(project interface{}) *ArgoDB_GetProjectWriteRepositories_Call { return &ArgoDB_GetProjectWriteRepositories_Call{Call: _e.mock.On("GetProjectWriteRepositories", project)} } @@ -1117,19 +1098,19 @@ func (_c *ArgoDB_GetProjectWriteRepositories_Call) Run(run func(project string)) return _c } -func (_c *ArgoDB_GetProjectWriteRepositories_Call) Return(_a0 []*v1alpha1.Repository, _a1 error) *ArgoDB_GetProjectWriteRepositories_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_GetProjectWriteRepositories_Call) Return(repositorys []*v1alpha1.Repository, err error) *ArgoDB_GetProjectWriteRepositories_Call { + _c.Call.Return(repositorys, err) return _c } -func (_c *ArgoDB_GetProjectWriteRepositories_Call) RunAndReturn(run func(string) ([]*v1alpha1.Repository, error)) *ArgoDB_GetProjectWriteRepositories_Call { +func (_c *ArgoDB_GetProjectWriteRepositories_Call) RunAndReturn(run func(project string) ([]*v1alpha1.Repository, error)) *ArgoDB_GetProjectWriteRepositories_Call { _c.Call.Return(run) return _c } -// GetRepository provides a mock function with given fields: ctx, url, project -func (_m *ArgoDB) GetRepository(ctx context.Context, url string, project string) (*v1alpha1.Repository, error) { - ret := _m.Called(ctx, url, project) +// GetRepository provides a mock function for the type ArgoDB +func (_mock *ArgoDB) GetRepository(ctx context.Context, url string, project string) (*v1alpha1.Repository, error) { + ret := _mock.Called(ctx, url, project) if len(ret) == 0 { panic("no return value specified for GetRepository") @@ -1137,23 +1118,21 @@ func (_m *ArgoDB) GetRepository(ctx context.Context, url string, project string) var r0 *v1alpha1.Repository var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.Repository, error)); ok { - return rf(ctx, url, project) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.Repository, error)); ok { + return returnFunc(ctx, url, project) } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.Repository); ok { - r0 = rf(ctx, url, project) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.Repository); ok { + r0 = returnFunc(ctx, url, project) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.Repository) } } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, url, project) + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { + r1 = returnFunc(ctx, url, project) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1163,9 +1142,9 @@ type ArgoDB_GetRepository_Call struct { } // GetRepository is a helper method to define mock.On call -// - ctx context.Context -// - url string -// - project string +// - ctx +// - url +// - project func (_e *ArgoDB_Expecter) GetRepository(ctx interface{}, url interface{}, project interface{}) *ArgoDB_GetRepository_Call { return &ArgoDB_GetRepository_Call{Call: _e.mock.On("GetRepository", ctx, url, project)} } @@ -1177,19 +1156,19 @@ func (_c *ArgoDB_GetRepository_Call) Run(run func(ctx context.Context, url strin return _c } -func (_c *ArgoDB_GetRepository_Call) Return(_a0 *v1alpha1.Repository, _a1 error) *ArgoDB_GetRepository_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_GetRepository_Call) Return(repository *v1alpha1.Repository, err error) *ArgoDB_GetRepository_Call { + _c.Call.Return(repository, err) return _c } -func (_c *ArgoDB_GetRepository_Call) RunAndReturn(run func(context.Context, string, string) (*v1alpha1.Repository, error)) *ArgoDB_GetRepository_Call { +func (_c *ArgoDB_GetRepository_Call) RunAndReturn(run func(ctx context.Context, url string, project string) (*v1alpha1.Repository, error)) *ArgoDB_GetRepository_Call { _c.Call.Return(run) return _c } -// GetRepositoryCredentials provides a mock function with given fields: ctx, name -func (_m *ArgoDB) GetRepositoryCredentials(ctx context.Context, name string) (*v1alpha1.RepoCreds, error) { - ret := _m.Called(ctx, name) +// GetRepositoryCredentials provides a mock function for the type ArgoDB +func (_mock *ArgoDB) GetRepositoryCredentials(ctx context.Context, name string) (*v1alpha1.RepoCreds, error) { + ret := _mock.Called(ctx, name) if len(ret) == 0 { panic("no return value specified for GetRepositoryCredentials") @@ -1197,23 +1176,21 @@ func (_m *ArgoDB) GetRepositoryCredentials(ctx context.Context, name string) (*v var r0 *v1alpha1.RepoCreds var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.RepoCreds, error)); ok { - return rf(ctx, name) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.RepoCreds, error)); ok { + return returnFunc(ctx, name) } - if rf, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.RepoCreds); ok { - r0 = rf(ctx, name) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.RepoCreds); ok { + r0 = returnFunc(ctx, name) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.RepoCreds) } } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, name) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1223,8 +1200,8 @@ type ArgoDB_GetRepositoryCredentials_Call struct { } // GetRepositoryCredentials is a helper method to define mock.On call -// - ctx context.Context -// - name string +// - ctx +// - name func (_e *ArgoDB_Expecter) GetRepositoryCredentials(ctx interface{}, name interface{}) *ArgoDB_GetRepositoryCredentials_Call { return &ArgoDB_GetRepositoryCredentials_Call{Call: _e.mock.On("GetRepositoryCredentials", ctx, name)} } @@ -1236,19 +1213,19 @@ func (_c *ArgoDB_GetRepositoryCredentials_Call) Run(run func(ctx context.Context return _c } -func (_c *ArgoDB_GetRepositoryCredentials_Call) Return(_a0 *v1alpha1.RepoCreds, _a1 error) *ArgoDB_GetRepositoryCredentials_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_GetRepositoryCredentials_Call) Return(repoCreds *v1alpha1.RepoCreds, err error) *ArgoDB_GetRepositoryCredentials_Call { + _c.Call.Return(repoCreds, err) return _c } -func (_c *ArgoDB_GetRepositoryCredentials_Call) RunAndReturn(run func(context.Context, string) (*v1alpha1.RepoCreds, error)) *ArgoDB_GetRepositoryCredentials_Call { +func (_c *ArgoDB_GetRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, name string) (*v1alpha1.RepoCreds, error)) *ArgoDB_GetRepositoryCredentials_Call { _c.Call.Return(run) return _c } -// GetWriteRepository provides a mock function with given fields: ctx, url, project -func (_m *ArgoDB) GetWriteRepository(ctx context.Context, url string, project string) (*v1alpha1.Repository, error) { - ret := _m.Called(ctx, url, project) +// GetWriteRepository provides a mock function for the type ArgoDB +func (_mock *ArgoDB) GetWriteRepository(ctx context.Context, url string, project string) (*v1alpha1.Repository, error) { + ret := _mock.Called(ctx, url, project) if len(ret) == 0 { panic("no return value specified for GetWriteRepository") @@ -1256,23 +1233,21 @@ func (_m *ArgoDB) GetWriteRepository(ctx context.Context, url string, project st var r0 *v1alpha1.Repository var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.Repository, error)); ok { - return rf(ctx, url, project) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.Repository, error)); ok { + return returnFunc(ctx, url, project) } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.Repository); ok { - r0 = rf(ctx, url, project) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.Repository); ok { + r0 = returnFunc(ctx, url, project) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.Repository) } } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, url, project) + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { + r1 = returnFunc(ctx, url, project) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1282,9 +1257,9 @@ type ArgoDB_GetWriteRepository_Call struct { } // GetWriteRepository is a helper method to define mock.On call -// - ctx context.Context -// - url string -// - project string +// - ctx +// - url +// - project func (_e *ArgoDB_Expecter) GetWriteRepository(ctx interface{}, url interface{}, project interface{}) *ArgoDB_GetWriteRepository_Call { return &ArgoDB_GetWriteRepository_Call{Call: _e.mock.On("GetWriteRepository", ctx, url, project)} } @@ -1296,19 +1271,19 @@ func (_c *ArgoDB_GetWriteRepository_Call) Run(run func(ctx context.Context, url return _c } -func (_c *ArgoDB_GetWriteRepository_Call) Return(_a0 *v1alpha1.Repository, _a1 error) *ArgoDB_GetWriteRepository_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_GetWriteRepository_Call) Return(repository *v1alpha1.Repository, err error) *ArgoDB_GetWriteRepository_Call { + _c.Call.Return(repository, err) return _c } -func (_c *ArgoDB_GetWriteRepository_Call) RunAndReturn(run func(context.Context, string, string) (*v1alpha1.Repository, error)) *ArgoDB_GetWriteRepository_Call { +func (_c *ArgoDB_GetWriteRepository_Call) RunAndReturn(run func(ctx context.Context, url string, project string) (*v1alpha1.Repository, error)) *ArgoDB_GetWriteRepository_Call { _c.Call.Return(run) return _c } -// GetWriteRepositoryCredentials provides a mock function with given fields: ctx, name -func (_m *ArgoDB) GetWriteRepositoryCredentials(ctx context.Context, name string) (*v1alpha1.RepoCreds, error) { - ret := _m.Called(ctx, name) +// GetWriteRepositoryCredentials provides a mock function for the type ArgoDB +func (_mock *ArgoDB) GetWriteRepositoryCredentials(ctx context.Context, name string) (*v1alpha1.RepoCreds, error) { + ret := _mock.Called(ctx, name) if len(ret) == 0 { panic("no return value specified for GetWriteRepositoryCredentials") @@ -1316,23 +1291,21 @@ func (_m *ArgoDB) GetWriteRepositoryCredentials(ctx context.Context, name string var r0 *v1alpha1.RepoCreds var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.RepoCreds, error)); ok { - return rf(ctx, name) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.RepoCreds, error)); ok { + return returnFunc(ctx, name) } - if rf, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.RepoCreds); ok { - r0 = rf(ctx, name) + if returnFunc, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.RepoCreds); ok { + r0 = returnFunc(ctx, name) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.RepoCreds) } } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, name) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1342,8 +1315,8 @@ type ArgoDB_GetWriteRepositoryCredentials_Call struct { } // GetWriteRepositoryCredentials is a helper method to define mock.On call -// - ctx context.Context -// - name string +// - ctx +// - name func (_e *ArgoDB_Expecter) GetWriteRepositoryCredentials(ctx interface{}, name interface{}) *ArgoDB_GetWriteRepositoryCredentials_Call { return &ArgoDB_GetWriteRepositoryCredentials_Call{Call: _e.mock.On("GetWriteRepositoryCredentials", ctx, name)} } @@ -1355,19 +1328,19 @@ func (_c *ArgoDB_GetWriteRepositoryCredentials_Call) Run(run func(ctx context.Co return _c } -func (_c *ArgoDB_GetWriteRepositoryCredentials_Call) Return(_a0 *v1alpha1.RepoCreds, _a1 error) *ArgoDB_GetWriteRepositoryCredentials_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_GetWriteRepositoryCredentials_Call) Return(repoCreds *v1alpha1.RepoCreds, err error) *ArgoDB_GetWriteRepositoryCredentials_Call { + _c.Call.Return(repoCreds, err) return _c } -func (_c *ArgoDB_GetWriteRepositoryCredentials_Call) RunAndReturn(run func(context.Context, string) (*v1alpha1.RepoCreds, error)) *ArgoDB_GetWriteRepositoryCredentials_Call { +func (_c *ArgoDB_GetWriteRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, name string) (*v1alpha1.RepoCreds, error)) *ArgoDB_GetWriteRepositoryCredentials_Call { _c.Call.Return(run) return _c } -// ListClusters provides a mock function with given fields: ctx -func (_m *ArgoDB) ListClusters(ctx context.Context) (*v1alpha1.ClusterList, error) { - ret := _m.Called(ctx) +// ListClusters provides a mock function for the type ArgoDB +func (_mock *ArgoDB) ListClusters(ctx context.Context) (*v1alpha1.ClusterList, error) { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListClusters") @@ -1375,23 +1348,21 @@ func (_m *ArgoDB) ListClusters(ctx context.Context) (*v1alpha1.ClusterList, erro var r0 *v1alpha1.ClusterList var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*v1alpha1.ClusterList, error)); ok { - return rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) (*v1alpha1.ClusterList, error)); ok { + return returnFunc(ctx) } - if rf, ok := ret.Get(0).(func(context.Context) *v1alpha1.ClusterList); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) *v1alpha1.ClusterList); ok { + r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.ClusterList) } } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1401,7 +1372,7 @@ type ArgoDB_ListClusters_Call struct { } // ListClusters is a helper method to define mock.On call -// - ctx context.Context +// - ctx func (_e *ArgoDB_Expecter) ListClusters(ctx interface{}) *ArgoDB_ListClusters_Call { return &ArgoDB_ListClusters_Call{Call: _e.mock.On("ListClusters", ctx)} } @@ -1413,19 +1384,19 @@ func (_c *ArgoDB_ListClusters_Call) Run(run func(ctx context.Context)) *ArgoDB_L return _c } -func (_c *ArgoDB_ListClusters_Call) Return(_a0 *v1alpha1.ClusterList, _a1 error) *ArgoDB_ListClusters_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_ListClusters_Call) Return(clusterList *v1alpha1.ClusterList, err error) *ArgoDB_ListClusters_Call { + _c.Call.Return(clusterList, err) return _c } -func (_c *ArgoDB_ListClusters_Call) RunAndReturn(run func(context.Context) (*v1alpha1.ClusterList, error)) *ArgoDB_ListClusters_Call { +func (_c *ArgoDB_ListClusters_Call) RunAndReturn(run func(ctx context.Context) (*v1alpha1.ClusterList, error)) *ArgoDB_ListClusters_Call { _c.Call.Return(run) return _c } -// ListConfiguredGPGPublicKeys provides a mock function with given fields: ctx -func (_m *ArgoDB) ListConfiguredGPGPublicKeys(ctx context.Context) (map[string]*v1alpha1.GnuPGPublicKey, error) { - ret := _m.Called(ctx) +// ListConfiguredGPGPublicKeys provides a mock function for the type ArgoDB +func (_mock *ArgoDB) ListConfiguredGPGPublicKeys(ctx context.Context) (map[string]*v1alpha1.GnuPGPublicKey, error) { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListConfiguredGPGPublicKeys") @@ -1433,23 +1404,21 @@ func (_m *ArgoDB) ListConfiguredGPGPublicKeys(ctx context.Context) (map[string]* var r0 map[string]*v1alpha1.GnuPGPublicKey var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]*v1alpha1.GnuPGPublicKey, error)); ok { - return rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) (map[string]*v1alpha1.GnuPGPublicKey, error)); ok { + return returnFunc(ctx) } - if rf, ok := ret.Get(0).(func(context.Context) map[string]*v1alpha1.GnuPGPublicKey); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) map[string]*v1alpha1.GnuPGPublicKey); ok { + r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[string]*v1alpha1.GnuPGPublicKey) } } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1459,7 +1428,7 @@ type ArgoDB_ListConfiguredGPGPublicKeys_Call struct { } // ListConfiguredGPGPublicKeys is a helper method to define mock.On call -// - ctx context.Context +// - ctx func (_e *ArgoDB_Expecter) ListConfiguredGPGPublicKeys(ctx interface{}) *ArgoDB_ListConfiguredGPGPublicKeys_Call { return &ArgoDB_ListConfiguredGPGPublicKeys_Call{Call: _e.mock.On("ListConfiguredGPGPublicKeys", ctx)} } @@ -1471,19 +1440,19 @@ func (_c *ArgoDB_ListConfiguredGPGPublicKeys_Call) Run(run func(ctx context.Cont return _c } -func (_c *ArgoDB_ListConfiguredGPGPublicKeys_Call) Return(_a0 map[string]*v1alpha1.GnuPGPublicKey, _a1 error) *ArgoDB_ListConfiguredGPGPublicKeys_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_ListConfiguredGPGPublicKeys_Call) Return(stringToGnuPGPublicKey map[string]*v1alpha1.GnuPGPublicKey, err error) *ArgoDB_ListConfiguredGPGPublicKeys_Call { + _c.Call.Return(stringToGnuPGPublicKey, err) return _c } -func (_c *ArgoDB_ListConfiguredGPGPublicKeys_Call) RunAndReturn(run func(context.Context) (map[string]*v1alpha1.GnuPGPublicKey, error)) *ArgoDB_ListConfiguredGPGPublicKeys_Call { +func (_c *ArgoDB_ListConfiguredGPGPublicKeys_Call) RunAndReturn(run func(ctx context.Context) (map[string]*v1alpha1.GnuPGPublicKey, error)) *ArgoDB_ListConfiguredGPGPublicKeys_Call { _c.Call.Return(run) return _c } -// ListHelmRepositories provides a mock function with given fields: ctx -func (_m *ArgoDB) ListHelmRepositories(ctx context.Context) ([]*v1alpha1.Repository, error) { - ret := _m.Called(ctx) +// ListHelmRepositories provides a mock function for the type ArgoDB +func (_mock *ArgoDB) ListHelmRepositories(ctx context.Context) ([]*v1alpha1.Repository, error) { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListHelmRepositories") @@ -1491,23 +1460,21 @@ func (_m *ArgoDB) ListHelmRepositories(ctx context.Context) ([]*v1alpha1.Reposit var r0 []*v1alpha1.Repository var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.Repository, error)); ok { - return rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.Repository, error)); ok { + return returnFunc(ctx) } - if rf, ok := ret.Get(0).(func(context.Context) []*v1alpha1.Repository); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) []*v1alpha1.Repository); ok { + r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*v1alpha1.Repository) } } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1517,7 +1484,7 @@ type ArgoDB_ListHelmRepositories_Call struct { } // ListHelmRepositories is a helper method to define mock.On call -// - ctx context.Context +// - ctx func (_e *ArgoDB_Expecter) ListHelmRepositories(ctx interface{}) *ArgoDB_ListHelmRepositories_Call { return &ArgoDB_ListHelmRepositories_Call{Call: _e.mock.On("ListHelmRepositories", ctx)} } @@ -1529,19 +1496,19 @@ func (_c *ArgoDB_ListHelmRepositories_Call) Run(run func(ctx context.Context)) * return _c } -func (_c *ArgoDB_ListHelmRepositories_Call) Return(_a0 []*v1alpha1.Repository, _a1 error) *ArgoDB_ListHelmRepositories_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_ListHelmRepositories_Call) Return(repositorys []*v1alpha1.Repository, err error) *ArgoDB_ListHelmRepositories_Call { + _c.Call.Return(repositorys, err) return _c } -func (_c *ArgoDB_ListHelmRepositories_Call) RunAndReturn(run func(context.Context) ([]*v1alpha1.Repository, error)) *ArgoDB_ListHelmRepositories_Call { +func (_c *ArgoDB_ListHelmRepositories_Call) RunAndReturn(run func(ctx context.Context) ([]*v1alpha1.Repository, error)) *ArgoDB_ListHelmRepositories_Call { _c.Call.Return(run) return _c } -// ListRepoCertificates provides a mock function with given fields: ctx, selector -func (_m *ArgoDB) ListRepoCertificates(ctx context.Context, selector *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error) { - ret := _m.Called(ctx, selector) +// ListRepoCertificates provides a mock function for the type ArgoDB +func (_mock *ArgoDB) ListRepoCertificates(ctx context.Context, selector *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error) { + ret := _mock.Called(ctx, selector) if len(ret) == 0 { panic("no return value specified for ListRepoCertificates") @@ -1549,23 +1516,21 @@ func (_m *ArgoDB) ListRepoCertificates(ctx context.Context, selector *db.Certifi var r0 *v1alpha1.RepositoryCertificateList var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)); ok { - return rf(ctx, selector) + if returnFunc, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)); ok { + return returnFunc(ctx, selector) } - if rf, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) *v1alpha1.RepositoryCertificateList); ok { - r0 = rf(ctx, selector) + if returnFunc, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) *v1alpha1.RepositoryCertificateList); ok { + r0 = returnFunc(ctx, selector) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.RepositoryCertificateList) } } - - if rf, ok := ret.Get(1).(func(context.Context, *db.CertificateListSelector) error); ok { - r1 = rf(ctx, selector) + if returnFunc, ok := ret.Get(1).(func(context.Context, *db.CertificateListSelector) error); ok { + r1 = returnFunc(ctx, selector) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1575,8 +1540,8 @@ type ArgoDB_ListRepoCertificates_Call struct { } // ListRepoCertificates is a helper method to define mock.On call -// - ctx context.Context -// - selector *db.CertificateListSelector +// - ctx +// - selector func (_e *ArgoDB_Expecter) ListRepoCertificates(ctx interface{}, selector interface{}) *ArgoDB_ListRepoCertificates_Call { return &ArgoDB_ListRepoCertificates_Call{Call: _e.mock.On("ListRepoCertificates", ctx, selector)} } @@ -1588,19 +1553,19 @@ func (_c *ArgoDB_ListRepoCertificates_Call) Run(run func(ctx context.Context, se return _c } -func (_c *ArgoDB_ListRepoCertificates_Call) Return(_a0 *v1alpha1.RepositoryCertificateList, _a1 error) *ArgoDB_ListRepoCertificates_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_ListRepoCertificates_Call) Return(repositoryCertificateList *v1alpha1.RepositoryCertificateList, err error) *ArgoDB_ListRepoCertificates_Call { + _c.Call.Return(repositoryCertificateList, err) return _c } -func (_c *ArgoDB_ListRepoCertificates_Call) RunAndReturn(run func(context.Context, *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)) *ArgoDB_ListRepoCertificates_Call { +func (_c *ArgoDB_ListRepoCertificates_Call) RunAndReturn(run func(ctx context.Context, selector *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)) *ArgoDB_ListRepoCertificates_Call { _c.Call.Return(run) return _c } -// ListRepositories provides a mock function with given fields: ctx -func (_m *ArgoDB) ListRepositories(ctx context.Context) ([]*v1alpha1.Repository, error) { - ret := _m.Called(ctx) +// ListRepositories provides a mock function for the type ArgoDB +func (_mock *ArgoDB) ListRepositories(ctx context.Context) ([]*v1alpha1.Repository, error) { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListRepositories") @@ -1608,23 +1573,21 @@ func (_m *ArgoDB) ListRepositories(ctx context.Context) ([]*v1alpha1.Repository, var r0 []*v1alpha1.Repository var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.Repository, error)); ok { - return rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.Repository, error)); ok { + return returnFunc(ctx) } - if rf, ok := ret.Get(0).(func(context.Context) []*v1alpha1.Repository); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) []*v1alpha1.Repository); ok { + r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*v1alpha1.Repository) } } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1634,7 +1597,7 @@ type ArgoDB_ListRepositories_Call struct { } // ListRepositories is a helper method to define mock.On call -// - ctx context.Context +// - ctx func (_e *ArgoDB_Expecter) ListRepositories(ctx interface{}) *ArgoDB_ListRepositories_Call { return &ArgoDB_ListRepositories_Call{Call: _e.mock.On("ListRepositories", ctx)} } @@ -1646,19 +1609,19 @@ func (_c *ArgoDB_ListRepositories_Call) Run(run func(ctx context.Context)) *Argo return _c } -func (_c *ArgoDB_ListRepositories_Call) Return(_a0 []*v1alpha1.Repository, _a1 error) *ArgoDB_ListRepositories_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_ListRepositories_Call) Return(repositorys []*v1alpha1.Repository, err error) *ArgoDB_ListRepositories_Call { + _c.Call.Return(repositorys, err) return _c } -func (_c *ArgoDB_ListRepositories_Call) RunAndReturn(run func(context.Context) ([]*v1alpha1.Repository, error)) *ArgoDB_ListRepositories_Call { +func (_c *ArgoDB_ListRepositories_Call) RunAndReturn(run func(ctx context.Context) ([]*v1alpha1.Repository, error)) *ArgoDB_ListRepositories_Call { _c.Call.Return(run) return _c } -// ListRepositoryCredentials provides a mock function with given fields: ctx -func (_m *ArgoDB) ListRepositoryCredentials(ctx context.Context) ([]string, error) { - ret := _m.Called(ctx) +// ListRepositoryCredentials provides a mock function for the type ArgoDB +func (_mock *ArgoDB) ListRepositoryCredentials(ctx context.Context) ([]string, error) { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListRepositoryCredentials") @@ -1666,23 +1629,21 @@ func (_m *ArgoDB) ListRepositoryCredentials(ctx context.Context) ([]string, erro var r0 []string var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { - return rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { + return returnFunc(ctx) } - if rf, ok := ret.Get(0).(func(context.Context) []string); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok { + r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1692,7 +1653,7 @@ type ArgoDB_ListRepositoryCredentials_Call struct { } // ListRepositoryCredentials is a helper method to define mock.On call -// - ctx context.Context +// - ctx func (_e *ArgoDB_Expecter) ListRepositoryCredentials(ctx interface{}) *ArgoDB_ListRepositoryCredentials_Call { return &ArgoDB_ListRepositoryCredentials_Call{Call: _e.mock.On("ListRepositoryCredentials", ctx)} } @@ -1704,19 +1665,19 @@ func (_c *ArgoDB_ListRepositoryCredentials_Call) Run(run func(ctx context.Contex return _c } -func (_c *ArgoDB_ListRepositoryCredentials_Call) Return(_a0 []string, _a1 error) *ArgoDB_ListRepositoryCredentials_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_ListRepositoryCredentials_Call) Return(strings []string, err error) *ArgoDB_ListRepositoryCredentials_Call { + _c.Call.Return(strings, err) return _c } -func (_c *ArgoDB_ListRepositoryCredentials_Call) RunAndReturn(run func(context.Context) ([]string, error)) *ArgoDB_ListRepositoryCredentials_Call { +func (_c *ArgoDB_ListRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *ArgoDB_ListRepositoryCredentials_Call { _c.Call.Return(run) return _c } -// ListWriteRepositories provides a mock function with given fields: ctx -func (_m *ArgoDB) ListWriteRepositories(ctx context.Context) ([]*v1alpha1.Repository, error) { - ret := _m.Called(ctx) +// ListWriteRepositories provides a mock function for the type ArgoDB +func (_mock *ArgoDB) ListWriteRepositories(ctx context.Context) ([]*v1alpha1.Repository, error) { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListWriteRepositories") @@ -1724,23 +1685,21 @@ func (_m *ArgoDB) ListWriteRepositories(ctx context.Context) ([]*v1alpha1.Reposi var r0 []*v1alpha1.Repository var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.Repository, error)); ok { - return rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.Repository, error)); ok { + return returnFunc(ctx) } - if rf, ok := ret.Get(0).(func(context.Context) []*v1alpha1.Repository); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) []*v1alpha1.Repository); ok { + r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*v1alpha1.Repository) } } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1750,7 +1709,7 @@ type ArgoDB_ListWriteRepositories_Call struct { } // ListWriteRepositories is a helper method to define mock.On call -// - ctx context.Context +// - ctx func (_e *ArgoDB_Expecter) ListWriteRepositories(ctx interface{}) *ArgoDB_ListWriteRepositories_Call { return &ArgoDB_ListWriteRepositories_Call{Call: _e.mock.On("ListWriteRepositories", ctx)} } @@ -1762,19 +1721,19 @@ func (_c *ArgoDB_ListWriteRepositories_Call) Run(run func(ctx context.Context)) return _c } -func (_c *ArgoDB_ListWriteRepositories_Call) Return(_a0 []*v1alpha1.Repository, _a1 error) *ArgoDB_ListWriteRepositories_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_ListWriteRepositories_Call) Return(repositorys []*v1alpha1.Repository, err error) *ArgoDB_ListWriteRepositories_Call { + _c.Call.Return(repositorys, err) return _c } -func (_c *ArgoDB_ListWriteRepositories_Call) RunAndReturn(run func(context.Context) ([]*v1alpha1.Repository, error)) *ArgoDB_ListWriteRepositories_Call { +func (_c *ArgoDB_ListWriteRepositories_Call) RunAndReturn(run func(ctx context.Context) ([]*v1alpha1.Repository, error)) *ArgoDB_ListWriteRepositories_Call { _c.Call.Return(run) return _c } -// ListWriteRepositoryCredentials provides a mock function with given fields: ctx -func (_m *ArgoDB) ListWriteRepositoryCredentials(ctx context.Context) ([]string, error) { - ret := _m.Called(ctx) +// ListWriteRepositoryCredentials provides a mock function for the type ArgoDB +func (_mock *ArgoDB) ListWriteRepositoryCredentials(ctx context.Context) ([]string, error) { + ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListWriteRepositoryCredentials") @@ -1782,23 +1741,21 @@ func (_m *ArgoDB) ListWriteRepositoryCredentials(ctx context.Context) ([]string, var r0 []string var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { - return rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { + return returnFunc(ctx) } - if rf, ok := ret.Get(0).(func(context.Context) []string); ok { - r0 = rf(ctx) + if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok { + r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1808,7 +1765,7 @@ type ArgoDB_ListWriteRepositoryCredentials_Call struct { } // ListWriteRepositoryCredentials is a helper method to define mock.On call -// - ctx context.Context +// - ctx func (_e *ArgoDB_Expecter) ListWriteRepositoryCredentials(ctx interface{}) *ArgoDB_ListWriteRepositoryCredentials_Call { return &ArgoDB_ListWriteRepositoryCredentials_Call{Call: _e.mock.On("ListWriteRepositoryCredentials", ctx)} } @@ -1820,19 +1777,19 @@ func (_c *ArgoDB_ListWriteRepositoryCredentials_Call) Run(run func(ctx context.C return _c } -func (_c *ArgoDB_ListWriteRepositoryCredentials_Call) Return(_a0 []string, _a1 error) *ArgoDB_ListWriteRepositoryCredentials_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_ListWriteRepositoryCredentials_Call) Return(strings []string, err error) *ArgoDB_ListWriteRepositoryCredentials_Call { + _c.Call.Return(strings, err) return _c } -func (_c *ArgoDB_ListWriteRepositoryCredentials_Call) RunAndReturn(run func(context.Context) ([]string, error)) *ArgoDB_ListWriteRepositoryCredentials_Call { +func (_c *ArgoDB_ListWriteRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *ArgoDB_ListWriteRepositoryCredentials_Call { _c.Call.Return(run) return _c } -// RemoveRepoCertificates provides a mock function with given fields: ctx, selector -func (_m *ArgoDB) RemoveRepoCertificates(ctx context.Context, selector *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error) { - ret := _m.Called(ctx, selector) +// RemoveRepoCertificates provides a mock function for the type ArgoDB +func (_mock *ArgoDB) RemoveRepoCertificates(ctx context.Context, selector *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error) { + ret := _mock.Called(ctx, selector) if len(ret) == 0 { panic("no return value specified for RemoveRepoCertificates") @@ -1840,23 +1797,21 @@ func (_m *ArgoDB) RemoveRepoCertificates(ctx context.Context, selector *db.Certi var r0 *v1alpha1.RepositoryCertificateList var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)); ok { - return rf(ctx, selector) + if returnFunc, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)); ok { + return returnFunc(ctx, selector) } - if rf, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) *v1alpha1.RepositoryCertificateList); ok { - r0 = rf(ctx, selector) + if returnFunc, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) *v1alpha1.RepositoryCertificateList); ok { + r0 = returnFunc(ctx, selector) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.RepositoryCertificateList) } } - - if rf, ok := ret.Get(1).(func(context.Context, *db.CertificateListSelector) error); ok { - r1 = rf(ctx, selector) + if returnFunc, ok := ret.Get(1).(func(context.Context, *db.CertificateListSelector) error); ok { + r1 = returnFunc(ctx, selector) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1866,8 +1821,8 @@ type ArgoDB_RemoveRepoCertificates_Call struct { } // RemoveRepoCertificates is a helper method to define mock.On call -// - ctx context.Context -// - selector *db.CertificateListSelector +// - ctx +// - selector func (_e *ArgoDB_Expecter) RemoveRepoCertificates(ctx interface{}, selector interface{}) *ArgoDB_RemoveRepoCertificates_Call { return &ArgoDB_RemoveRepoCertificates_Call{Call: _e.mock.On("RemoveRepoCertificates", ctx, selector)} } @@ -1879,19 +1834,19 @@ func (_c *ArgoDB_RemoveRepoCertificates_Call) Run(run func(ctx context.Context, return _c } -func (_c *ArgoDB_RemoveRepoCertificates_Call) Return(_a0 *v1alpha1.RepositoryCertificateList, _a1 error) *ArgoDB_RemoveRepoCertificates_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_RemoveRepoCertificates_Call) Return(repositoryCertificateList *v1alpha1.RepositoryCertificateList, err error) *ArgoDB_RemoveRepoCertificates_Call { + _c.Call.Return(repositoryCertificateList, err) return _c } -func (_c *ArgoDB_RemoveRepoCertificates_Call) RunAndReturn(run func(context.Context, *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)) *ArgoDB_RemoveRepoCertificates_Call { +func (_c *ArgoDB_RemoveRepoCertificates_Call) RunAndReturn(run func(ctx context.Context, selector *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)) *ArgoDB_RemoveRepoCertificates_Call { _c.Call.Return(run) return _c } -// RepositoryExists provides a mock function with given fields: ctx, repoURL, project -func (_m *ArgoDB) RepositoryExists(ctx context.Context, repoURL string, project string) (bool, error) { - ret := _m.Called(ctx, repoURL, project) +// RepositoryExists provides a mock function for the type ArgoDB +func (_mock *ArgoDB) RepositoryExists(ctx context.Context, repoURL string, project string) (bool, error) { + ret := _mock.Called(ctx, repoURL, project) if len(ret) == 0 { panic("no return value specified for RepositoryExists") @@ -1899,21 +1854,19 @@ func (_m *ArgoDB) RepositoryExists(ctx context.Context, repoURL string, project var r0 bool var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok { - return rf(ctx, repoURL, project) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok { + return returnFunc(ctx, repoURL, project) } - if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok { - r0 = rf(ctx, repoURL, project) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) bool); ok { + r0 = returnFunc(ctx, repoURL, project) } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, repoURL, project) + 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 } @@ -1923,9 +1876,9 @@ type ArgoDB_RepositoryExists_Call struct { } // RepositoryExists is a helper method to define mock.On call -// - ctx context.Context -// - repoURL string -// - project string +// - ctx +// - repoURL +// - project func (_e *ArgoDB_Expecter) RepositoryExists(ctx interface{}, repoURL interface{}, project interface{}) *ArgoDB_RepositoryExists_Call { return &ArgoDB_RepositoryExists_Call{Call: _e.mock.On("RepositoryExists", ctx, repoURL, project)} } @@ -1937,19 +1890,19 @@ func (_c *ArgoDB_RepositoryExists_Call) Run(run func(ctx context.Context, repoUR return _c } -func (_c *ArgoDB_RepositoryExists_Call) Return(_a0 bool, _a1 error) *ArgoDB_RepositoryExists_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_RepositoryExists_Call) Return(b bool, err error) *ArgoDB_RepositoryExists_Call { + _c.Call.Return(b, err) return _c } -func (_c *ArgoDB_RepositoryExists_Call) RunAndReturn(run func(context.Context, string, string) (bool, error)) *ArgoDB_RepositoryExists_Call { +func (_c *ArgoDB_RepositoryExists_Call) RunAndReturn(run func(ctx context.Context, repoURL string, project string) (bool, error)) *ArgoDB_RepositoryExists_Call { _c.Call.Return(run) return _c } -// UpdateCluster provides a mock function with given fields: ctx, c -func (_m *ArgoDB) UpdateCluster(ctx context.Context, c *v1alpha1.Cluster) (*v1alpha1.Cluster, error) { - ret := _m.Called(ctx, c) +// UpdateCluster provides a mock function for the type ArgoDB +func (_mock *ArgoDB) UpdateCluster(ctx context.Context, c *v1alpha1.Cluster) (*v1alpha1.Cluster, error) { + ret := _mock.Called(ctx, c) if len(ret) == 0 { panic("no return value specified for UpdateCluster") @@ -1957,23 +1910,21 @@ func (_m *ArgoDB) UpdateCluster(ctx context.Context, c *v1alpha1.Cluster) (*v1al var r0 *v1alpha1.Cluster var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) (*v1alpha1.Cluster, error)); ok { - return rf(ctx, c) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) (*v1alpha1.Cluster, error)); ok { + return returnFunc(ctx, c) } - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) *v1alpha1.Cluster); ok { - r0 = rf(ctx, c) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) *v1alpha1.Cluster); ok { + r0 = returnFunc(ctx, c) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.Cluster) } } - - if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.Cluster) error); ok { - r1 = rf(ctx, c) + if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.Cluster) error); ok { + r1 = returnFunc(ctx, c) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1983,8 +1934,8 @@ type ArgoDB_UpdateCluster_Call struct { } // UpdateCluster is a helper method to define mock.On call -// - ctx context.Context -// - c *v1alpha1.Cluster +// - ctx +// - c func (_e *ArgoDB_Expecter) UpdateCluster(ctx interface{}, c interface{}) *ArgoDB_UpdateCluster_Call { return &ArgoDB_UpdateCluster_Call{Call: _e.mock.On("UpdateCluster", ctx, c)} } @@ -1996,19 +1947,19 @@ func (_c *ArgoDB_UpdateCluster_Call) Run(run func(ctx context.Context, c *v1alph return _c } -func (_c *ArgoDB_UpdateCluster_Call) Return(_a0 *v1alpha1.Cluster, _a1 error) *ArgoDB_UpdateCluster_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_UpdateCluster_Call) Return(cluster *v1alpha1.Cluster, err error) *ArgoDB_UpdateCluster_Call { + _c.Call.Return(cluster, err) return _c } -func (_c *ArgoDB_UpdateCluster_Call) RunAndReturn(run func(context.Context, *v1alpha1.Cluster) (*v1alpha1.Cluster, error)) *ArgoDB_UpdateCluster_Call { +func (_c *ArgoDB_UpdateCluster_Call) RunAndReturn(run func(ctx context.Context, c *v1alpha1.Cluster) (*v1alpha1.Cluster, error)) *ArgoDB_UpdateCluster_Call { _c.Call.Return(run) return _c } -// UpdateRepository provides a mock function with given fields: ctx, r -func (_m *ArgoDB) UpdateRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) { - ret := _m.Called(ctx, r) +// UpdateRepository provides a mock function for the type ArgoDB +func (_mock *ArgoDB) UpdateRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) { + ret := _mock.Called(ctx, r) if len(ret) == 0 { panic("no return value specified for UpdateRepository") @@ -2016,23 +1967,21 @@ func (_m *ArgoDB) UpdateRepository(ctx context.Context, r *v1alpha1.Repository) var r0 *v1alpha1.Repository var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)); ok { - return rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)); ok { + return returnFunc(ctx, r) } - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) *v1alpha1.Repository); ok { - r0 = rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) *v1alpha1.Repository); ok { + r0 = returnFunc(ctx, r) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.Repository) } } - - if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.Repository) error); ok { - r1 = rf(ctx, r) + if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.Repository) error); ok { + r1 = returnFunc(ctx, r) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2042,8 +1991,8 @@ type ArgoDB_UpdateRepository_Call struct { } // UpdateRepository is a helper method to define mock.On call -// - ctx context.Context -// - r *v1alpha1.Repository +// - ctx +// - r func (_e *ArgoDB_Expecter) UpdateRepository(ctx interface{}, r interface{}) *ArgoDB_UpdateRepository_Call { return &ArgoDB_UpdateRepository_Call{Call: _e.mock.On("UpdateRepository", ctx, r)} } @@ -2055,19 +2004,19 @@ func (_c *ArgoDB_UpdateRepository_Call) Run(run func(ctx context.Context, r *v1a return _c } -func (_c *ArgoDB_UpdateRepository_Call) Return(_a0 *v1alpha1.Repository, _a1 error) *ArgoDB_UpdateRepository_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_UpdateRepository_Call) Return(repository *v1alpha1.Repository, err error) *ArgoDB_UpdateRepository_Call { + _c.Call.Return(repository, err) return _c } -func (_c *ArgoDB_UpdateRepository_Call) RunAndReturn(run func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)) *ArgoDB_UpdateRepository_Call { +func (_c *ArgoDB_UpdateRepository_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error)) *ArgoDB_UpdateRepository_Call { _c.Call.Return(run) return _c } -// UpdateRepositoryCredentials provides a mock function with given fields: ctx, r -func (_m *ArgoDB) UpdateRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) { - ret := _m.Called(ctx, r) +// UpdateRepositoryCredentials provides a mock function for the type ArgoDB +func (_mock *ArgoDB) UpdateRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) { + ret := _mock.Called(ctx, r) if len(ret) == 0 { panic("no return value specified for UpdateRepositoryCredentials") @@ -2075,23 +2024,21 @@ func (_m *ArgoDB) UpdateRepositoryCredentials(ctx context.Context, r *v1alpha1.R var r0 *v1alpha1.RepoCreds var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)); ok { - return rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)); ok { + return returnFunc(ctx, r) } - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) *v1alpha1.RepoCreds); ok { - r0 = rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) *v1alpha1.RepoCreds); ok { + r0 = returnFunc(ctx, r) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.RepoCreds) } } - - if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepoCreds) error); ok { - r1 = rf(ctx, r) + if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepoCreds) error); ok { + r1 = returnFunc(ctx, r) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2101,8 +2048,8 @@ type ArgoDB_UpdateRepositoryCredentials_Call struct { } // UpdateRepositoryCredentials is a helper method to define mock.On call -// - ctx context.Context -// - r *v1alpha1.RepoCreds +// - ctx +// - r func (_e *ArgoDB_Expecter) UpdateRepositoryCredentials(ctx interface{}, r interface{}) *ArgoDB_UpdateRepositoryCredentials_Call { return &ArgoDB_UpdateRepositoryCredentials_Call{Call: _e.mock.On("UpdateRepositoryCredentials", ctx, r)} } @@ -2114,19 +2061,19 @@ func (_c *ArgoDB_UpdateRepositoryCredentials_Call) Run(run func(ctx context.Cont return _c } -func (_c *ArgoDB_UpdateRepositoryCredentials_Call) Return(_a0 *v1alpha1.RepoCreds, _a1 error) *ArgoDB_UpdateRepositoryCredentials_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_UpdateRepositoryCredentials_Call) Return(repoCreds *v1alpha1.RepoCreds, err error) *ArgoDB_UpdateRepositoryCredentials_Call { + _c.Call.Return(repoCreds, err) return _c } -func (_c *ArgoDB_UpdateRepositoryCredentials_Call) RunAndReturn(run func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *ArgoDB_UpdateRepositoryCredentials_Call { +func (_c *ArgoDB_UpdateRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *ArgoDB_UpdateRepositoryCredentials_Call { _c.Call.Return(run) return _c } -// UpdateWriteRepository provides a mock function with given fields: ctx, r -func (_m *ArgoDB) UpdateWriteRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) { - ret := _m.Called(ctx, r) +// UpdateWriteRepository provides a mock function for the type ArgoDB +func (_mock *ArgoDB) UpdateWriteRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) { + ret := _mock.Called(ctx, r) if len(ret) == 0 { panic("no return value specified for UpdateWriteRepository") @@ -2134,23 +2081,21 @@ func (_m *ArgoDB) UpdateWriteRepository(ctx context.Context, r *v1alpha1.Reposit var r0 *v1alpha1.Repository var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)); ok { - return rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)); ok { + return returnFunc(ctx, r) } - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) *v1alpha1.Repository); ok { - r0 = rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) *v1alpha1.Repository); ok { + r0 = returnFunc(ctx, r) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.Repository) } } - - if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.Repository) error); ok { - r1 = rf(ctx, r) + if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.Repository) error); ok { + r1 = returnFunc(ctx, r) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2160,8 +2105,8 @@ type ArgoDB_UpdateWriteRepository_Call struct { } // UpdateWriteRepository is a helper method to define mock.On call -// - ctx context.Context -// - r *v1alpha1.Repository +// - ctx +// - r func (_e *ArgoDB_Expecter) UpdateWriteRepository(ctx interface{}, r interface{}) *ArgoDB_UpdateWriteRepository_Call { return &ArgoDB_UpdateWriteRepository_Call{Call: _e.mock.On("UpdateWriteRepository", ctx, r)} } @@ -2173,19 +2118,19 @@ func (_c *ArgoDB_UpdateWriteRepository_Call) Run(run func(ctx context.Context, r return _c } -func (_c *ArgoDB_UpdateWriteRepository_Call) Return(_a0 *v1alpha1.Repository, _a1 error) *ArgoDB_UpdateWriteRepository_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_UpdateWriteRepository_Call) Return(repository *v1alpha1.Repository, err error) *ArgoDB_UpdateWriteRepository_Call { + _c.Call.Return(repository, err) return _c } -func (_c *ArgoDB_UpdateWriteRepository_Call) RunAndReturn(run func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)) *ArgoDB_UpdateWriteRepository_Call { +func (_c *ArgoDB_UpdateWriteRepository_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error)) *ArgoDB_UpdateWriteRepository_Call { _c.Call.Return(run) return _c } -// UpdateWriteRepositoryCredentials provides a mock function with given fields: ctx, r -func (_m *ArgoDB) UpdateWriteRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) { - ret := _m.Called(ctx, r) +// UpdateWriteRepositoryCredentials provides a mock function for the type ArgoDB +func (_mock *ArgoDB) UpdateWriteRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) { + ret := _mock.Called(ctx, r) if len(ret) == 0 { panic("no return value specified for UpdateWriteRepositoryCredentials") @@ -2193,23 +2138,21 @@ func (_m *ArgoDB) UpdateWriteRepositoryCredentials(ctx context.Context, r *v1alp var r0 *v1alpha1.RepoCreds var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)); ok { - return rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)); ok { + return returnFunc(ctx, r) } - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) *v1alpha1.RepoCreds); ok { - r0 = rf(ctx, r) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) *v1alpha1.RepoCreds); ok { + r0 = returnFunc(ctx, r) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v1alpha1.RepoCreds) } } - - if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepoCreds) error); ok { - r1 = rf(ctx, r) + if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepoCreds) error); ok { + r1 = returnFunc(ctx, r) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -2219,8 +2162,8 @@ type ArgoDB_UpdateWriteRepositoryCredentials_Call struct { } // UpdateWriteRepositoryCredentials is a helper method to define mock.On call -// - ctx context.Context -// - r *v1alpha1.RepoCreds +// - ctx +// - r func (_e *ArgoDB_Expecter) UpdateWriteRepositoryCredentials(ctx interface{}, r interface{}) *ArgoDB_UpdateWriteRepositoryCredentials_Call { return &ArgoDB_UpdateWriteRepositoryCredentials_Call{Call: _e.mock.On("UpdateWriteRepositoryCredentials", ctx, r)} } @@ -2232,31 +2175,30 @@ func (_c *ArgoDB_UpdateWriteRepositoryCredentials_Call) Run(run func(ctx context return _c } -func (_c *ArgoDB_UpdateWriteRepositoryCredentials_Call) Return(_a0 *v1alpha1.RepoCreds, _a1 error) *ArgoDB_UpdateWriteRepositoryCredentials_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_UpdateWriteRepositoryCredentials_Call) Return(repoCreds *v1alpha1.RepoCreds, err error) *ArgoDB_UpdateWriteRepositoryCredentials_Call { + _c.Call.Return(repoCreds, err) return _c } -func (_c *ArgoDB_UpdateWriteRepositoryCredentials_Call) RunAndReturn(run func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *ArgoDB_UpdateWriteRepositoryCredentials_Call { +func (_c *ArgoDB_UpdateWriteRepositoryCredentials_Call) RunAndReturn(run func(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)) *ArgoDB_UpdateWriteRepositoryCredentials_Call { _c.Call.Return(run) return _c } -// WatchClusters provides a mock function with given fields: ctx, handleAddEvent, handleModEvent, handleDeleteEvent -func (_m *ArgoDB) WatchClusters(ctx context.Context, handleAddEvent func(*v1alpha1.Cluster), handleModEvent func(*v1alpha1.Cluster, *v1alpha1.Cluster), handleDeleteEvent func(string)) error { - ret := _m.Called(ctx, handleAddEvent, handleModEvent, handleDeleteEvent) +// WatchClusters provides a mock function for the type ArgoDB +func (_mock *ArgoDB) WatchClusters(ctx context.Context, handleAddEvent func(cluster *v1alpha1.Cluster), handleModEvent func(oldCluster *v1alpha1.Cluster, newCluster *v1alpha1.Cluster), handleDeleteEvent func(clusterServer string)) error { + ret := _mock.Called(ctx, handleAddEvent, handleModEvent, handleDeleteEvent) if len(ret) == 0 { panic("no return value specified for WatchClusters") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, func(*v1alpha1.Cluster), func(*v1alpha1.Cluster, *v1alpha1.Cluster), func(string)) error); ok { - r0 = rf(ctx, handleAddEvent, handleModEvent, handleDeleteEvent) + if returnFunc, ok := ret.Get(0).(func(context.Context, func(cluster *v1alpha1.Cluster), func(oldCluster *v1alpha1.Cluster, newCluster *v1alpha1.Cluster), func(clusterServer string)) error); ok { + r0 = returnFunc(ctx, handleAddEvent, handleModEvent, handleDeleteEvent) } else { r0 = ret.Error(0) } - return r0 } @@ -2266,34 +2208,34 @@ type ArgoDB_WatchClusters_Call struct { } // WatchClusters is a helper method to define mock.On call -// - ctx context.Context -// - handleAddEvent func(*v1alpha1.Cluster) -// - handleModEvent func(*v1alpha1.Cluster , *v1alpha1.Cluster) -// - handleDeleteEvent func(string) +// - ctx +// - handleAddEvent +// - handleModEvent +// - handleDeleteEvent func (_e *ArgoDB_Expecter) WatchClusters(ctx interface{}, handleAddEvent interface{}, handleModEvent interface{}, handleDeleteEvent interface{}) *ArgoDB_WatchClusters_Call { return &ArgoDB_WatchClusters_Call{Call: _e.mock.On("WatchClusters", ctx, handleAddEvent, handleModEvent, handleDeleteEvent)} } -func (_c *ArgoDB_WatchClusters_Call) Run(run func(ctx context.Context, handleAddEvent func(*v1alpha1.Cluster), handleModEvent func(*v1alpha1.Cluster, *v1alpha1.Cluster), handleDeleteEvent func(string))) *ArgoDB_WatchClusters_Call { +func (_c *ArgoDB_WatchClusters_Call) Run(run func(ctx context.Context, handleAddEvent func(cluster *v1alpha1.Cluster), handleModEvent func(oldCluster *v1alpha1.Cluster, newCluster *v1alpha1.Cluster), handleDeleteEvent func(clusterServer string))) *ArgoDB_WatchClusters_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(func(*v1alpha1.Cluster)), args[2].(func(*v1alpha1.Cluster, *v1alpha1.Cluster)), args[3].(func(string))) + run(args[0].(context.Context), args[1].(func(cluster *v1alpha1.Cluster)), args[2].(func(oldCluster *v1alpha1.Cluster, newCluster *v1alpha1.Cluster)), args[3].(func(clusterServer string))) }) return _c } -func (_c *ArgoDB_WatchClusters_Call) Return(_a0 error) *ArgoDB_WatchClusters_Call { - _c.Call.Return(_a0) +func (_c *ArgoDB_WatchClusters_Call) Return(err error) *ArgoDB_WatchClusters_Call { + _c.Call.Return(err) return _c } -func (_c *ArgoDB_WatchClusters_Call) RunAndReturn(run func(context.Context, func(*v1alpha1.Cluster), func(*v1alpha1.Cluster, *v1alpha1.Cluster), func(string)) error) *ArgoDB_WatchClusters_Call { +func (_c *ArgoDB_WatchClusters_Call) RunAndReturn(run func(ctx context.Context, handleAddEvent func(cluster *v1alpha1.Cluster), handleModEvent func(oldCluster *v1alpha1.Cluster, newCluster *v1alpha1.Cluster), handleDeleteEvent func(clusterServer string)) error) *ArgoDB_WatchClusters_Call { _c.Call.Return(run) return _c } -// WriteRepositoryExists provides a mock function with given fields: ctx, repoURL, project -func (_m *ArgoDB) WriteRepositoryExists(ctx context.Context, repoURL string, project string) (bool, error) { - ret := _m.Called(ctx, repoURL, project) +// WriteRepositoryExists provides a mock function for the type ArgoDB +func (_mock *ArgoDB) WriteRepositoryExists(ctx context.Context, repoURL string, project string) (bool, error) { + ret := _mock.Called(ctx, repoURL, project) if len(ret) == 0 { panic("no return value specified for WriteRepositoryExists") @@ -2301,21 +2243,19 @@ func (_m *ArgoDB) WriteRepositoryExists(ctx context.Context, repoURL string, pro var r0 bool var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok { - return rf(ctx, repoURL, project) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok { + return returnFunc(ctx, repoURL, project) } - if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok { - r0 = rf(ctx, repoURL, project) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) bool); ok { + r0 = returnFunc(ctx, repoURL, project) } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, repoURL, project) + 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 } @@ -2325,9 +2265,9 @@ type ArgoDB_WriteRepositoryExists_Call struct { } // WriteRepositoryExists is a helper method to define mock.On call -// - ctx context.Context -// - repoURL string -// - project string +// - ctx +// - repoURL +// - project func (_e *ArgoDB_Expecter) WriteRepositoryExists(ctx interface{}, repoURL interface{}, project interface{}) *ArgoDB_WriteRepositoryExists_Call { return &ArgoDB_WriteRepositoryExists_Call{Call: _e.mock.On("WriteRepositoryExists", ctx, repoURL, project)} } @@ -2339,26 +2279,12 @@ func (_c *ArgoDB_WriteRepositoryExists_Call) Run(run func(ctx context.Context, r return _c } -func (_c *ArgoDB_WriteRepositoryExists_Call) Return(_a0 bool, _a1 error) *ArgoDB_WriteRepositoryExists_Call { - _c.Call.Return(_a0, _a1) +func (_c *ArgoDB_WriteRepositoryExists_Call) Return(b bool, err error) *ArgoDB_WriteRepositoryExists_Call { + _c.Call.Return(b, err) return _c } -func (_c *ArgoDB_WriteRepositoryExists_Call) RunAndReturn(run func(context.Context, string, string) (bool, error)) *ArgoDB_WriteRepositoryExists_Call { +func (_c *ArgoDB_WriteRepositoryExists_Call) RunAndReturn(run func(ctx context.Context, repoURL string, project string) (bool, error)) *ArgoDB_WriteRepositoryExists_Call { _c.Call.Return(run) return _c } - -// NewArgoDB creates a new instance of ArgoDB. 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 NewArgoDB(t interface { - mock.TestingT - Cleanup(func()) -}) *ArgoDB { - mock := &ArgoDB{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/util/git/mocks/Client.go b/util/git/mocks/Client.go index 395bd76e4bec1..b539d50ba7c45 100644 --- a/util/git/mocks/Client.go +++ b/util/git/mocks/Client.go @@ -1,12 +1,28 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - git "github.com/argoproj/argo-cd/v3/util/git" + "github.com/argoproj/argo-cd/v3/util/git" mock "github.com/stretchr/testify/mock" ) +// NewClient creates a new instance of Client. 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 NewClient(t interface { + mock.TestingT + Cleanup(func()) +}) *Client { + mock := &Client{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // Client is an autogenerated mock type for the Client type type Client struct { mock.Mock @@ -20,9 +36,9 @@ func (_m *Client) EXPECT() *Client_Expecter { return &Client_Expecter{mock: &_m.Mock} } -// ChangedFiles provides a mock function with given fields: revision, targetRevision -func (_m *Client) ChangedFiles(revision string, targetRevision string) ([]string, error) { - ret := _m.Called(revision, targetRevision) +// ChangedFiles provides a mock function for the type Client +func (_mock *Client) ChangedFiles(revision string, targetRevision string) ([]string, error) { + ret := _mock.Called(revision, targetRevision) if len(ret) == 0 { panic("no return value specified for ChangedFiles") @@ -30,23 +46,21 @@ func (_m *Client) ChangedFiles(revision string, targetRevision string) ([]string var r0 []string var r1 error - if rf, ok := ret.Get(0).(func(string, string) ([]string, error)); ok { - return rf(revision, targetRevision) + if returnFunc, ok := ret.Get(0).(func(string, string) ([]string, error)); ok { + return returnFunc(revision, targetRevision) } - if rf, ok := ret.Get(0).(func(string, string) []string); ok { - r0 = rf(revision, targetRevision) + if returnFunc, ok := ret.Get(0).(func(string, string) []string); ok { + r0 = returnFunc(revision, targetRevision) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } - - if rf, ok := ret.Get(1).(func(string, string) error); ok { - r1 = rf(revision, targetRevision) + if returnFunc, ok := ret.Get(1).(func(string, string) error); ok { + r1 = returnFunc(revision, targetRevision) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -56,8 +70,8 @@ type Client_ChangedFiles_Call struct { } // ChangedFiles is a helper method to define mock.On call -// - revision string -// - targetRevision string +// - revision +// - targetRevision func (_e *Client_Expecter) ChangedFiles(revision interface{}, targetRevision interface{}) *Client_ChangedFiles_Call { return &Client_ChangedFiles_Call{Call: _e.mock.On("ChangedFiles", revision, targetRevision)} } @@ -69,19 +83,19 @@ func (_c *Client_ChangedFiles_Call) Run(run func(revision string, targetRevision return _c } -func (_c *Client_ChangedFiles_Call) Return(_a0 []string, _a1 error) *Client_ChangedFiles_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_ChangedFiles_Call) Return(strings []string, err error) *Client_ChangedFiles_Call { + _c.Call.Return(strings, err) return _c } -func (_c *Client_ChangedFiles_Call) RunAndReturn(run func(string, string) ([]string, error)) *Client_ChangedFiles_Call { +func (_c *Client_ChangedFiles_Call) RunAndReturn(run func(revision string, targetRevision string) ([]string, error)) *Client_ChangedFiles_Call { _c.Call.Return(run) return _c } -// Checkout provides a mock function with given fields: revision, submoduleEnabled -func (_m *Client) Checkout(revision string, submoduleEnabled bool) (string, error) { - ret := _m.Called(revision, submoduleEnabled) +// Checkout provides a mock function for the type Client +func (_mock *Client) Checkout(revision string, submoduleEnabled bool) (string, error) { + ret := _mock.Called(revision, submoduleEnabled) if len(ret) == 0 { panic("no return value specified for Checkout") @@ -89,21 +103,19 @@ func (_m *Client) Checkout(revision string, submoduleEnabled bool) (string, erro var r0 string var r1 error - if rf, ok := ret.Get(0).(func(string, bool) (string, error)); ok { - return rf(revision, submoduleEnabled) + if returnFunc, ok := ret.Get(0).(func(string, bool) (string, error)); ok { + return returnFunc(revision, submoduleEnabled) } - if rf, ok := ret.Get(0).(func(string, bool) string); ok { - r0 = rf(revision, submoduleEnabled) + if returnFunc, ok := ret.Get(0).(func(string, bool) string); ok { + r0 = returnFunc(revision, submoduleEnabled) } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func(string, bool) error); ok { - r1 = rf(revision, submoduleEnabled) + if returnFunc, ok := ret.Get(1).(func(string, bool) error); ok { + r1 = returnFunc(revision, submoduleEnabled) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -113,8 +125,8 @@ type Client_Checkout_Call struct { } // Checkout is a helper method to define mock.On call -// - revision string -// - submoduleEnabled bool +// - revision +// - submoduleEnabled func (_e *Client_Expecter) Checkout(revision interface{}, submoduleEnabled interface{}) *Client_Checkout_Call { return &Client_Checkout_Call{Call: _e.mock.On("Checkout", revision, submoduleEnabled)} } @@ -126,19 +138,19 @@ func (_c *Client_Checkout_Call) Run(run func(revision string, submoduleEnabled b return _c } -func (_c *Client_Checkout_Call) Return(_a0 string, _a1 error) *Client_Checkout_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_Checkout_Call) Return(s string, err error) *Client_Checkout_Call { + _c.Call.Return(s, err) return _c } -func (_c *Client_Checkout_Call) RunAndReturn(run func(string, bool) (string, error)) *Client_Checkout_Call { +func (_c *Client_Checkout_Call) RunAndReturn(run func(revision string, submoduleEnabled bool) (string, error)) *Client_Checkout_Call { _c.Call.Return(run) return _c } -// CheckoutOrNew provides a mock function with given fields: branch, base, submoduleEnabled -func (_m *Client) CheckoutOrNew(branch string, base string, submoduleEnabled bool) (string, error) { - ret := _m.Called(branch, base, submoduleEnabled) +// CheckoutOrNew provides a mock function for the type Client +func (_mock *Client) CheckoutOrNew(branch string, base string, submoduleEnabled bool) (string, error) { + ret := _mock.Called(branch, base, submoduleEnabled) if len(ret) == 0 { panic("no return value specified for CheckoutOrNew") @@ -146,21 +158,19 @@ func (_m *Client) CheckoutOrNew(branch string, base string, submoduleEnabled boo var r0 string var r1 error - if rf, ok := ret.Get(0).(func(string, string, bool) (string, error)); ok { - return rf(branch, base, submoduleEnabled) + if returnFunc, ok := ret.Get(0).(func(string, string, bool) (string, error)); ok { + return returnFunc(branch, base, submoduleEnabled) } - if rf, ok := ret.Get(0).(func(string, string, bool) string); ok { - r0 = rf(branch, base, submoduleEnabled) + if returnFunc, ok := ret.Get(0).(func(string, string, bool) string); ok { + r0 = returnFunc(branch, base, submoduleEnabled) } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func(string, string, bool) error); ok { - r1 = rf(branch, base, submoduleEnabled) + if returnFunc, ok := ret.Get(1).(func(string, string, bool) error); ok { + r1 = returnFunc(branch, base, submoduleEnabled) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -170,9 +180,9 @@ type Client_CheckoutOrNew_Call struct { } // CheckoutOrNew is a helper method to define mock.On call -// - branch string -// - base string -// - submoduleEnabled bool +// - branch +// - base +// - submoduleEnabled func (_e *Client_Expecter) CheckoutOrNew(branch interface{}, base interface{}, submoduleEnabled interface{}) *Client_CheckoutOrNew_Call { return &Client_CheckoutOrNew_Call{Call: _e.mock.On("CheckoutOrNew", branch, base, submoduleEnabled)} } @@ -184,19 +194,19 @@ func (_c *Client_CheckoutOrNew_Call) Run(run func(branch string, base string, su return _c } -func (_c *Client_CheckoutOrNew_Call) Return(_a0 string, _a1 error) *Client_CheckoutOrNew_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CheckoutOrNew_Call) Return(s string, err error) *Client_CheckoutOrNew_Call { + _c.Call.Return(s, err) return _c } -func (_c *Client_CheckoutOrNew_Call) RunAndReturn(run func(string, string, bool) (string, error)) *Client_CheckoutOrNew_Call { +func (_c *Client_CheckoutOrNew_Call) RunAndReturn(run func(branch string, base string, submoduleEnabled bool) (string, error)) *Client_CheckoutOrNew_Call { _c.Call.Return(run) return _c } -// CheckoutOrOrphan provides a mock function with given fields: branch, submoduleEnabled -func (_m *Client) CheckoutOrOrphan(branch string, submoduleEnabled bool) (string, error) { - ret := _m.Called(branch, submoduleEnabled) +// CheckoutOrOrphan provides a mock function for the type Client +func (_mock *Client) CheckoutOrOrphan(branch string, submoduleEnabled bool) (string, error) { + ret := _mock.Called(branch, submoduleEnabled) if len(ret) == 0 { panic("no return value specified for CheckoutOrOrphan") @@ -204,21 +214,19 @@ func (_m *Client) CheckoutOrOrphan(branch string, submoduleEnabled bool) (string var r0 string var r1 error - if rf, ok := ret.Get(0).(func(string, bool) (string, error)); ok { - return rf(branch, submoduleEnabled) + if returnFunc, ok := ret.Get(0).(func(string, bool) (string, error)); ok { + return returnFunc(branch, submoduleEnabled) } - if rf, ok := ret.Get(0).(func(string, bool) string); ok { - r0 = rf(branch, submoduleEnabled) + if returnFunc, ok := ret.Get(0).(func(string, bool) string); ok { + r0 = returnFunc(branch, submoduleEnabled) } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func(string, bool) error); ok { - r1 = rf(branch, submoduleEnabled) + if returnFunc, ok := ret.Get(1).(func(string, bool) error); ok { + r1 = returnFunc(branch, submoduleEnabled) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -228,8 +236,8 @@ type Client_CheckoutOrOrphan_Call struct { } // CheckoutOrOrphan is a helper method to define mock.On call -// - branch string -// - submoduleEnabled bool +// - branch +// - submoduleEnabled func (_e *Client_Expecter) CheckoutOrOrphan(branch interface{}, submoduleEnabled interface{}) *Client_CheckoutOrOrphan_Call { return &Client_CheckoutOrOrphan_Call{Call: _e.mock.On("CheckoutOrOrphan", branch, submoduleEnabled)} } @@ -241,19 +249,19 @@ func (_c *Client_CheckoutOrOrphan_Call) Run(run func(branch string, submoduleEna return _c } -func (_c *Client_CheckoutOrOrphan_Call) Return(_a0 string, _a1 error) *Client_CheckoutOrOrphan_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CheckoutOrOrphan_Call) Return(s string, err error) *Client_CheckoutOrOrphan_Call { + _c.Call.Return(s, err) return _c } -func (_c *Client_CheckoutOrOrphan_Call) RunAndReturn(run func(string, bool) (string, error)) *Client_CheckoutOrOrphan_Call { +func (_c *Client_CheckoutOrOrphan_Call) RunAndReturn(run func(branch string, submoduleEnabled bool) (string, error)) *Client_CheckoutOrOrphan_Call { _c.Call.Return(run) return _c } -// CommitAndPush provides a mock function with given fields: branch, message -func (_m *Client) CommitAndPush(branch string, message string) (string, error) { - ret := _m.Called(branch, message) +// CommitAndPush provides a mock function for the type Client +func (_mock *Client) CommitAndPush(branch string, message string) (string, error) { + ret := _mock.Called(branch, message) if len(ret) == 0 { panic("no return value specified for CommitAndPush") @@ -261,21 +269,19 @@ func (_m *Client) CommitAndPush(branch string, message string) (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func(string, string) (string, error)); ok { - return rf(branch, message) + if returnFunc, ok := ret.Get(0).(func(string, string) (string, error)); ok { + return returnFunc(branch, message) } - if rf, ok := ret.Get(0).(func(string, string) string); ok { - r0 = rf(branch, message) + if returnFunc, ok := ret.Get(0).(func(string, string) string); ok { + r0 = returnFunc(branch, message) } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func(string, string) error); ok { - r1 = rf(branch, message) + if returnFunc, ok := ret.Get(1).(func(string, string) error); ok { + r1 = returnFunc(branch, message) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -285,8 +291,8 @@ type Client_CommitAndPush_Call struct { } // CommitAndPush is a helper method to define mock.On call -// - branch string -// - message string +// - branch +// - message func (_e *Client_Expecter) CommitAndPush(branch interface{}, message interface{}) *Client_CommitAndPush_Call { return &Client_CommitAndPush_Call{Call: _e.mock.On("CommitAndPush", branch, message)} } @@ -298,19 +304,19 @@ func (_c *Client_CommitAndPush_Call) Run(run func(branch string, message string) return _c } -func (_c *Client_CommitAndPush_Call) Return(_a0 string, _a1 error) *Client_CommitAndPush_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CommitAndPush_Call) Return(s string, err error) *Client_CommitAndPush_Call { + _c.Call.Return(s, err) return _c } -func (_c *Client_CommitAndPush_Call) RunAndReturn(run func(string, string) (string, error)) *Client_CommitAndPush_Call { +func (_c *Client_CommitAndPush_Call) RunAndReturn(run func(branch string, message string) (string, error)) *Client_CommitAndPush_Call { _c.Call.Return(run) return _c } -// CommitSHA provides a mock function with no fields -func (_m *Client) CommitSHA() (string, error) { - ret := _m.Called() +// CommitSHA provides a mock function for the type Client +func (_mock *Client) CommitSHA() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for CommitSHA") @@ -318,21 +324,19 @@ func (_m *Client) CommitSHA() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -353,8 +357,8 @@ func (_c *Client_CommitSHA_Call) Run(run func()) *Client_CommitSHA_Call { return _c } -func (_c *Client_CommitSHA_Call) Return(_a0 string, _a1 error) *Client_CommitSHA_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_CommitSHA_Call) Return(s string, err error) *Client_CommitSHA_Call { + _c.Call.Return(s, err) return _c } @@ -363,21 +367,20 @@ func (_c *Client_CommitSHA_Call) RunAndReturn(run func() (string, error)) *Clien return _c } -// Fetch provides a mock function with given fields: revision -func (_m *Client) Fetch(revision string) error { - ret := _m.Called(revision) +// Fetch provides a mock function for the type Client +func (_mock *Client) Fetch(revision string) error { + ret := _mock.Called(revision) if len(ret) == 0 { panic("no return value specified for Fetch") } var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(revision) + if returnFunc, ok := ret.Get(0).(func(string) error); ok { + r0 = returnFunc(revision) } else { r0 = ret.Error(0) } - return r0 } @@ -387,7 +390,7 @@ type Client_Fetch_Call struct { } // Fetch is a helper method to define mock.On call -// - revision string +// - revision func (_e *Client_Expecter) Fetch(revision interface{}) *Client_Fetch_Call { return &Client_Fetch_Call{Call: _e.mock.On("Fetch", revision)} } @@ -399,31 +402,30 @@ func (_c *Client_Fetch_Call) Run(run func(revision string)) *Client_Fetch_Call { return _c } -func (_c *Client_Fetch_Call) Return(_a0 error) *Client_Fetch_Call { - _c.Call.Return(_a0) +func (_c *Client_Fetch_Call) Return(err error) *Client_Fetch_Call { + _c.Call.Return(err) return _c } -func (_c *Client_Fetch_Call) RunAndReturn(run func(string) error) *Client_Fetch_Call { +func (_c *Client_Fetch_Call) RunAndReturn(run func(revision string) error) *Client_Fetch_Call { _c.Call.Return(run) return _c } -// Init provides a mock function with no fields -func (_m *Client) Init() error { - ret := _m.Called() +// Init provides a mock function for the type Client +func (_mock *Client) Init() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Init") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -444,8 +446,8 @@ func (_c *Client_Init_Call) Run(run func()) *Client_Init_Call { return _c } -func (_c *Client_Init_Call) Return(_a0 error) *Client_Init_Call { - _c.Call.Return(_a0) +func (_c *Client_Init_Call) Return(err error) *Client_Init_Call { + _c.Call.Return(err) return _c } @@ -454,21 +456,20 @@ func (_c *Client_Init_Call) RunAndReturn(run func() error) *Client_Init_Call { return _c } -// IsAnnotatedTag provides a mock function with given fields: _a0 -func (_m *Client) IsAnnotatedTag(_a0 string) bool { - ret := _m.Called(_a0) +// IsAnnotatedTag provides a mock function for the type Client +func (_mock *Client) IsAnnotatedTag(s string) bool { + ret := _mock.Called(s) if len(ret) == 0 { panic("no return value specified for IsAnnotatedTag") } var r0 bool - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(_a0) + if returnFunc, ok := ret.Get(0).(func(string) bool); ok { + r0 = returnFunc(s) } else { r0 = ret.Get(0).(bool) } - return r0 } @@ -478,43 +479,42 @@ type Client_IsAnnotatedTag_Call struct { } // IsAnnotatedTag is a helper method to define mock.On call -// - _a0 string -func (_e *Client_Expecter) IsAnnotatedTag(_a0 interface{}) *Client_IsAnnotatedTag_Call { - return &Client_IsAnnotatedTag_Call{Call: _e.mock.On("IsAnnotatedTag", _a0)} +// - s +func (_e *Client_Expecter) IsAnnotatedTag(s interface{}) *Client_IsAnnotatedTag_Call { + return &Client_IsAnnotatedTag_Call{Call: _e.mock.On("IsAnnotatedTag", s)} } -func (_c *Client_IsAnnotatedTag_Call) Run(run func(_a0 string)) *Client_IsAnnotatedTag_Call { +func (_c *Client_IsAnnotatedTag_Call) Run(run func(s string)) *Client_IsAnnotatedTag_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(string)) }) return _c } -func (_c *Client_IsAnnotatedTag_Call) Return(_a0 bool) *Client_IsAnnotatedTag_Call { - _c.Call.Return(_a0) +func (_c *Client_IsAnnotatedTag_Call) Return(b bool) *Client_IsAnnotatedTag_Call { + _c.Call.Return(b) return _c } -func (_c *Client_IsAnnotatedTag_Call) RunAndReturn(run func(string) bool) *Client_IsAnnotatedTag_Call { +func (_c *Client_IsAnnotatedTag_Call) RunAndReturn(run func(s string) bool) *Client_IsAnnotatedTag_Call { _c.Call.Return(run) return _c } -// IsRevisionPresent provides a mock function with given fields: revision -func (_m *Client) IsRevisionPresent(revision string) bool { - ret := _m.Called(revision) +// IsRevisionPresent provides a mock function for the type Client +func (_mock *Client) IsRevisionPresent(revision string) bool { + ret := _mock.Called(revision) if len(ret) == 0 { panic("no return value specified for IsRevisionPresent") } var r0 bool - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(revision) + if returnFunc, ok := ret.Get(0).(func(string) bool); ok { + r0 = returnFunc(revision) } else { r0 = ret.Get(0).(bool) } - return r0 } @@ -524,7 +524,7 @@ type Client_IsRevisionPresent_Call struct { } // IsRevisionPresent is a helper method to define mock.On call -// - revision string +// - revision func (_e *Client_Expecter) IsRevisionPresent(revision interface{}) *Client_IsRevisionPresent_Call { return &Client_IsRevisionPresent_Call{Call: _e.mock.On("IsRevisionPresent", revision)} } @@ -536,19 +536,19 @@ func (_c *Client_IsRevisionPresent_Call) Run(run func(revision string)) *Client_ return _c } -func (_c *Client_IsRevisionPresent_Call) Return(_a0 bool) *Client_IsRevisionPresent_Call { - _c.Call.Return(_a0) +func (_c *Client_IsRevisionPresent_Call) Return(b bool) *Client_IsRevisionPresent_Call { + _c.Call.Return(b) return _c } -func (_c *Client_IsRevisionPresent_Call) RunAndReturn(run func(string) bool) *Client_IsRevisionPresent_Call { +func (_c *Client_IsRevisionPresent_Call) RunAndReturn(run func(revision string) bool) *Client_IsRevisionPresent_Call { _c.Call.Return(run) return _c } -// LsFiles provides a mock function with given fields: path, enableNewGitFileGlobbing -func (_m *Client) LsFiles(path string, enableNewGitFileGlobbing bool) ([]string, error) { - ret := _m.Called(path, enableNewGitFileGlobbing) +// LsFiles provides a mock function for the type Client +func (_mock *Client) LsFiles(path string, enableNewGitFileGlobbing bool) ([]string, error) { + ret := _mock.Called(path, enableNewGitFileGlobbing) if len(ret) == 0 { panic("no return value specified for LsFiles") @@ -556,23 +556,21 @@ func (_m *Client) LsFiles(path string, enableNewGitFileGlobbing bool) ([]string, var r0 []string var r1 error - if rf, ok := ret.Get(0).(func(string, bool) ([]string, error)); ok { - return rf(path, enableNewGitFileGlobbing) + if returnFunc, ok := ret.Get(0).(func(string, bool) ([]string, error)); ok { + return returnFunc(path, enableNewGitFileGlobbing) } - if rf, ok := ret.Get(0).(func(string, bool) []string); ok { - r0 = rf(path, enableNewGitFileGlobbing) + if returnFunc, ok := ret.Get(0).(func(string, bool) []string); ok { + r0 = returnFunc(path, enableNewGitFileGlobbing) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } - - if rf, ok := ret.Get(1).(func(string, bool) error); ok { - r1 = rf(path, enableNewGitFileGlobbing) + if returnFunc, ok := ret.Get(1).(func(string, bool) error); ok { + r1 = returnFunc(path, enableNewGitFileGlobbing) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -582,8 +580,8 @@ type Client_LsFiles_Call struct { } // LsFiles is a helper method to define mock.On call -// - path string -// - enableNewGitFileGlobbing bool +// - path +// - enableNewGitFileGlobbing func (_e *Client_Expecter) LsFiles(path interface{}, enableNewGitFileGlobbing interface{}) *Client_LsFiles_Call { return &Client_LsFiles_Call{Call: _e.mock.On("LsFiles", path, enableNewGitFileGlobbing)} } @@ -595,19 +593,19 @@ func (_c *Client_LsFiles_Call) Run(run func(path string, enableNewGitFileGlobbin return _c } -func (_c *Client_LsFiles_Call) Return(_a0 []string, _a1 error) *Client_LsFiles_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_LsFiles_Call) Return(strings []string, err error) *Client_LsFiles_Call { + _c.Call.Return(strings, err) return _c } -func (_c *Client_LsFiles_Call) RunAndReturn(run func(string, bool) ([]string, error)) *Client_LsFiles_Call { +func (_c *Client_LsFiles_Call) RunAndReturn(run func(path string, enableNewGitFileGlobbing bool) ([]string, error)) *Client_LsFiles_Call { _c.Call.Return(run) return _c } -// LsLargeFiles provides a mock function with no fields -func (_m *Client) LsLargeFiles() ([]string, error) { - ret := _m.Called() +// LsLargeFiles provides a mock function for the type Client +func (_mock *Client) LsLargeFiles() ([]string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for LsLargeFiles") @@ -615,23 +613,21 @@ func (_m *Client) LsLargeFiles() ([]string, error) { var r0 []string var r1 error - if rf, ok := ret.Get(0).(func() ([]string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() ([]string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() []string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() []string); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -652,8 +648,8 @@ func (_c *Client_LsLargeFiles_Call) Run(run func()) *Client_LsLargeFiles_Call { return _c } -func (_c *Client_LsLargeFiles_Call) Return(_a0 []string, _a1 error) *Client_LsLargeFiles_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_LsLargeFiles_Call) Return(strings []string, err error) *Client_LsLargeFiles_Call { + _c.Call.Return(strings, err) return _c } @@ -662,9 +658,9 @@ func (_c *Client_LsLargeFiles_Call) RunAndReturn(run func() ([]string, error)) * return _c } -// LsRefs provides a mock function with no fields -func (_m *Client) LsRefs() (*git.Refs, error) { - ret := _m.Called() +// LsRefs provides a mock function for the type Client +func (_mock *Client) LsRefs() (*git.Refs, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for LsRefs") @@ -672,23 +668,21 @@ func (_m *Client) LsRefs() (*git.Refs, error) { var r0 *git.Refs var r1 error - if rf, ok := ret.Get(0).(func() (*git.Refs, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (*git.Refs, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() *git.Refs); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() *git.Refs); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.Refs) } } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -709,8 +703,8 @@ func (_c *Client_LsRefs_Call) Run(run func()) *Client_LsRefs_Call { return _c } -func (_c *Client_LsRefs_Call) Return(_a0 *git.Refs, _a1 error) *Client_LsRefs_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_LsRefs_Call) Return(refs *git.Refs, err error) *Client_LsRefs_Call { + _c.Call.Return(refs, err) return _c } @@ -719,9 +713,9 @@ func (_c *Client_LsRefs_Call) RunAndReturn(run func() (*git.Refs, error)) *Clien return _c } -// LsRemote provides a mock function with given fields: revision -func (_m *Client) LsRemote(revision string) (string, error) { - ret := _m.Called(revision) +// LsRemote provides a mock function for the type Client +func (_mock *Client) LsRemote(revision string) (string, error) { + ret := _mock.Called(revision) if len(ret) == 0 { panic("no return value specified for LsRemote") @@ -729,21 +723,19 @@ func (_m *Client) LsRemote(revision string) (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func(string) (string, error)); ok { - return rf(revision) + if returnFunc, ok := ret.Get(0).(func(string) (string, error)); ok { + return returnFunc(revision) } - if rf, ok := ret.Get(0).(func(string) string); ok { - r0 = rf(revision) + if returnFunc, ok := ret.Get(0).(func(string) string); ok { + r0 = returnFunc(revision) } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(revision) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(revision) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -753,7 +745,7 @@ type Client_LsRemote_Call struct { } // LsRemote is a helper method to define mock.On call -// - revision string +// - revision func (_e *Client_Expecter) LsRemote(revision interface{}) *Client_LsRemote_Call { return &Client_LsRemote_Call{Call: _e.mock.On("LsRemote", revision)} } @@ -765,19 +757,19 @@ func (_c *Client_LsRemote_Call) Run(run func(revision string)) *Client_LsRemote_ return _c } -func (_c *Client_LsRemote_Call) Return(_a0 string, _a1 error) *Client_LsRemote_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_LsRemote_Call) Return(s string, err error) *Client_LsRemote_Call { + _c.Call.Return(s, err) return _c } -func (_c *Client_LsRemote_Call) RunAndReturn(run func(string) (string, error)) *Client_LsRemote_Call { +func (_c *Client_LsRemote_Call) RunAndReturn(run func(revision string) (string, error)) *Client_LsRemote_Call { _c.Call.Return(run) return _c } -// RemoveContents provides a mock function with no fields -func (_m *Client) RemoveContents() (string, error) { - ret := _m.Called() +// RemoveContents provides a mock function for the type Client +func (_mock *Client) RemoveContents() (string, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for RemoveContents") @@ -785,21 +777,19 @@ func (_m *Client) RemoveContents() (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -820,8 +810,8 @@ func (_c *Client_RemoveContents_Call) Run(run func()) *Client_RemoveContents_Cal return _c } -func (_c *Client_RemoveContents_Call) Return(_a0 string, _a1 error) *Client_RemoveContents_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_RemoveContents_Call) Return(s string, err error) *Client_RemoveContents_Call { + _c.Call.Return(s, err) return _c } @@ -830,9 +820,9 @@ func (_c *Client_RemoveContents_Call) RunAndReturn(run func() (string, error)) * return _c } -// RevisionMetadata provides a mock function with given fields: revision -func (_m *Client) RevisionMetadata(revision string) (*git.RevisionMetadata, error) { - ret := _m.Called(revision) +// RevisionMetadata provides a mock function for the type Client +func (_mock *Client) RevisionMetadata(revision string) (*git.RevisionMetadata, error) { + ret := _mock.Called(revision) if len(ret) == 0 { panic("no return value specified for RevisionMetadata") @@ -840,23 +830,21 @@ func (_m *Client) RevisionMetadata(revision string) (*git.RevisionMetadata, erro var r0 *git.RevisionMetadata var r1 error - if rf, ok := ret.Get(0).(func(string) (*git.RevisionMetadata, error)); ok { - return rf(revision) + if returnFunc, ok := ret.Get(0).(func(string) (*git.RevisionMetadata, error)); ok { + return returnFunc(revision) } - if rf, ok := ret.Get(0).(func(string) *git.RevisionMetadata); ok { - r0 = rf(revision) + if returnFunc, ok := ret.Get(0).(func(string) *git.RevisionMetadata); ok { + r0 = returnFunc(revision) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*git.RevisionMetadata) } } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(revision) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(revision) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -866,7 +854,7 @@ type Client_RevisionMetadata_Call struct { } // RevisionMetadata is a helper method to define mock.On call -// - revision string +// - revision func (_e *Client_Expecter) RevisionMetadata(revision interface{}) *Client_RevisionMetadata_Call { return &Client_RevisionMetadata_Call{Call: _e.mock.On("RevisionMetadata", revision)} } @@ -878,31 +866,30 @@ func (_c *Client_RevisionMetadata_Call) Run(run func(revision string)) *Client_R return _c } -func (_c *Client_RevisionMetadata_Call) Return(_a0 *git.RevisionMetadata, _a1 error) *Client_RevisionMetadata_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_RevisionMetadata_Call) Return(revisionMetadata *git.RevisionMetadata, err error) *Client_RevisionMetadata_Call { + _c.Call.Return(revisionMetadata, err) return _c } -func (_c *Client_RevisionMetadata_Call) RunAndReturn(run func(string) (*git.RevisionMetadata, error)) *Client_RevisionMetadata_Call { +func (_c *Client_RevisionMetadata_Call) RunAndReturn(run func(revision string) (*git.RevisionMetadata, error)) *Client_RevisionMetadata_Call { _c.Call.Return(run) return _c } -// Root provides a mock function with no fields -func (_m *Client) Root() string { - ret := _m.Called() +// Root provides a mock function for the type Client +func (_mock *Client) Root() string { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Root") } var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(string) } - return r0 } @@ -923,8 +910,8 @@ func (_c *Client_Root_Call) Run(run func()) *Client_Root_Call { return _c } -func (_c *Client_Root_Call) Return(_a0 string) *Client_Root_Call { - _c.Call.Return(_a0) +func (_c *Client_Root_Call) Return(s string) *Client_Root_Call { + _c.Call.Return(s) return _c } @@ -933,9 +920,9 @@ func (_c *Client_Root_Call) RunAndReturn(run func() string) *Client_Root_Call { return _c } -// SetAuthor provides a mock function with given fields: name, email -func (_m *Client) SetAuthor(name string, email string) (string, error) { - ret := _m.Called(name, email) +// SetAuthor provides a mock function for the type Client +func (_mock *Client) SetAuthor(name string, email string) (string, error) { + ret := _mock.Called(name, email) if len(ret) == 0 { panic("no return value specified for SetAuthor") @@ -943,21 +930,19 @@ func (_m *Client) SetAuthor(name string, email string) (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func(string, string) (string, error)); ok { - return rf(name, email) + if returnFunc, ok := ret.Get(0).(func(string, string) (string, error)); ok { + return returnFunc(name, email) } - if rf, ok := ret.Get(0).(func(string, string) string); ok { - r0 = rf(name, email) + if returnFunc, ok := ret.Get(0).(func(string, string) string); ok { + r0 = returnFunc(name, email) } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func(string, string) error); ok { - r1 = rf(name, email) + if returnFunc, ok := ret.Get(1).(func(string, string) error); ok { + r1 = returnFunc(name, email) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -967,8 +952,8 @@ type Client_SetAuthor_Call struct { } // SetAuthor is a helper method to define mock.On call -// - name string -// - email string +// - name +// - email func (_e *Client_Expecter) SetAuthor(name interface{}, email interface{}) *Client_SetAuthor_Call { return &Client_SetAuthor_Call{Call: _e.mock.On("SetAuthor", name, email)} } @@ -980,31 +965,30 @@ func (_c *Client_SetAuthor_Call) Run(run func(name string, email string)) *Clien return _c } -func (_c *Client_SetAuthor_Call) Return(_a0 string, _a1 error) *Client_SetAuthor_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_SetAuthor_Call) Return(s string, err error) *Client_SetAuthor_Call { + _c.Call.Return(s, err) return _c } -func (_c *Client_SetAuthor_Call) RunAndReturn(run func(string, string) (string, error)) *Client_SetAuthor_Call { +func (_c *Client_SetAuthor_Call) RunAndReturn(run func(name string, email string) (string, error)) *Client_SetAuthor_Call { _c.Call.Return(run) return _c } -// Submodule provides a mock function with no fields -func (_m *Client) Submodule() error { - ret := _m.Called() +// Submodule provides a mock function for the type Client +func (_mock *Client) Submodule() error { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Submodule") } var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() } else { r0 = ret.Error(0) } - return r0 } @@ -1025,8 +1009,8 @@ func (_c *Client_Submodule_Call) Run(run func()) *Client_Submodule_Call { return _c } -func (_c *Client_Submodule_Call) Return(_a0 error) *Client_Submodule_Call { - _c.Call.Return(_a0) +func (_c *Client_Submodule_Call) Return(err error) *Client_Submodule_Call { + _c.Call.Return(err) return _c } @@ -1035,9 +1019,9 @@ func (_c *Client_Submodule_Call) RunAndReturn(run func() error) *Client_Submodul return _c } -// VerifyCommitSignature provides a mock function with given fields: _a0 -func (_m *Client) VerifyCommitSignature(_a0 string) (string, error) { - ret := _m.Called(_a0) +// VerifyCommitSignature provides a mock function for the type Client +func (_mock *Client) VerifyCommitSignature(s string) (string, error) { + ret := _mock.Called(s) if len(ret) == 0 { panic("no return value specified for VerifyCommitSignature") @@ -1045,21 +1029,19 @@ func (_m *Client) VerifyCommitSignature(_a0 string) (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func(string) (string, error)); ok { - return rf(_a0) + if returnFunc, ok := ret.Get(0).(func(string) (string, error)); ok { + return returnFunc(s) } - if rf, ok := ret.Get(0).(func(string) string); ok { - r0 = rf(_a0) + if returnFunc, ok := ret.Get(0).(func(string) string); ok { + r0 = returnFunc(s) } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(_a0) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(s) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -1069,38 +1051,24 @@ type Client_VerifyCommitSignature_Call struct { } // VerifyCommitSignature is a helper method to define mock.On call -// - _a0 string -func (_e *Client_Expecter) VerifyCommitSignature(_a0 interface{}) *Client_VerifyCommitSignature_Call { - return &Client_VerifyCommitSignature_Call{Call: _e.mock.On("VerifyCommitSignature", _a0)} +// - s +func (_e *Client_Expecter) VerifyCommitSignature(s interface{}) *Client_VerifyCommitSignature_Call { + return &Client_VerifyCommitSignature_Call{Call: _e.mock.On("VerifyCommitSignature", s)} } -func (_c *Client_VerifyCommitSignature_Call) Run(run func(_a0 string)) *Client_VerifyCommitSignature_Call { +func (_c *Client_VerifyCommitSignature_Call) Run(run func(s string)) *Client_VerifyCommitSignature_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(string)) }) return _c } -func (_c *Client_VerifyCommitSignature_Call) Return(_a0 string, _a1 error) *Client_VerifyCommitSignature_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_VerifyCommitSignature_Call) Return(s1 string, err error) *Client_VerifyCommitSignature_Call { + _c.Call.Return(s1, err) return _c } -func (_c *Client_VerifyCommitSignature_Call) RunAndReturn(run func(string) (string, error)) *Client_VerifyCommitSignature_Call { +func (_c *Client_VerifyCommitSignature_Call) RunAndReturn(run func(s string) (string, error)) *Client_VerifyCommitSignature_Call { _c.Call.Return(run) return _c } - -// NewClient creates a new instance of Client. 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 NewClient(t interface { - mock.TestingT - Cleanup(func()) -}) *Client { - mock := &Client{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/util/helm/mocks/Client.go b/util/helm/mocks/Client.go index 8ea30673fa01e..56957472f22bb 100644 --- a/util/helm/mocks/Client.go +++ b/util/helm/mocks/Client.go @@ -1,14 +1,29 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - helm "github.com/argoproj/argo-cd/v3/util/helm" - io "github.com/argoproj/argo-cd/v3/util/io" - + "github.com/argoproj/argo-cd/v3/util/helm" + "github.com/argoproj/argo-cd/v3/util/io" mock "github.com/stretchr/testify/mock" ) +// NewClient creates a new instance of Client. 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 NewClient(t interface { + mock.TestingT + Cleanup(func()) +}) *Client { + mock := &Client{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + // Client is an autogenerated mock type for the Client type type Client struct { mock.Mock @@ -22,21 +37,20 @@ func (_m *Client) EXPECT() *Client_Expecter { return &Client_Expecter{mock: &_m.Mock} } -// CleanChartCache provides a mock function with given fields: chart, version -func (_m *Client) CleanChartCache(chart string, version string) error { - ret := _m.Called(chart, version) +// CleanChartCache provides a mock function for the type Client +func (_mock *Client) CleanChartCache(chart string, version string) error { + ret := _mock.Called(chart, version) if len(ret) == 0 { panic("no return value specified for CleanChartCache") } var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(chart, version) + if returnFunc, ok := ret.Get(0).(func(string, string) error); ok { + r0 = returnFunc(chart, version) } else { r0 = ret.Error(0) } - return r0 } @@ -46,8 +60,8 @@ type Client_CleanChartCache_Call struct { } // CleanChartCache is a helper method to define mock.On call -// - chart string -// - version string +// - chart +// - version func (_e *Client_Expecter) CleanChartCache(chart interface{}, version interface{}) *Client_CleanChartCache_Call { return &Client_CleanChartCache_Call{Call: _e.mock.On("CleanChartCache", chart, version)} } @@ -59,19 +73,19 @@ func (_c *Client_CleanChartCache_Call) Run(run func(chart string, version string return _c } -func (_c *Client_CleanChartCache_Call) Return(_a0 error) *Client_CleanChartCache_Call { - _c.Call.Return(_a0) +func (_c *Client_CleanChartCache_Call) Return(err error) *Client_CleanChartCache_Call { + _c.Call.Return(err) return _c } -func (_c *Client_CleanChartCache_Call) RunAndReturn(run func(string, string) error) *Client_CleanChartCache_Call { +func (_c *Client_CleanChartCache_Call) RunAndReturn(run func(chart string, version string) error) *Client_CleanChartCache_Call { _c.Call.Return(run) return _c } -// ExtractChart provides a mock function with given fields: chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize -func (_m *Client) ExtractChart(chart string, version string, passCredentials bool, manifestMaxExtractedSize int64, disableManifestMaxExtractedSize bool) (string, io.Closer, error) { - ret := _m.Called(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize) +// ExtractChart provides a mock function for the type Client +func (_mock *Client) ExtractChart(chart string, version string, passCredentials bool, manifestMaxExtractedSize int64, disableManifestMaxExtractedSize bool) (string, io.Closer, error) { + ret := _mock.Called(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize) if len(ret) == 0 { panic("no return value specified for ExtractChart") @@ -80,29 +94,26 @@ func (_m *Client) ExtractChart(chart string, version string, passCredentials boo var r0 string var r1 io.Closer var r2 error - if rf, ok := ret.Get(0).(func(string, string, bool, int64, bool) (string, io.Closer, error)); ok { - return rf(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize) + if returnFunc, ok := ret.Get(0).(func(string, string, bool, int64, bool) (string, io.Closer, error)); ok { + return returnFunc(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize) } - if rf, ok := ret.Get(0).(func(string, string, bool, int64, bool) string); ok { - r0 = rf(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize) + if returnFunc, ok := ret.Get(0).(func(string, string, bool, int64, bool) string); ok { + r0 = returnFunc(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize) } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func(string, string, bool, int64, bool) io.Closer); ok { - r1 = rf(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize) + if returnFunc, ok := ret.Get(1).(func(string, string, bool, int64, bool) io.Closer); ok { + r1 = returnFunc(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(io.Closer) } } - - if rf, ok := ret.Get(2).(func(string, string, bool, int64, bool) error); ok { - r2 = rf(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize) + if returnFunc, ok := ret.Get(2).(func(string, string, bool, int64, bool) error); ok { + r2 = returnFunc(chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize) } else { r2 = ret.Error(2) } - return r0, r1, r2 } @@ -112,11 +123,11 @@ type Client_ExtractChart_Call struct { } // ExtractChart is a helper method to define mock.On call -// - chart string -// - version string -// - passCredentials bool -// - manifestMaxExtractedSize int64 -// - disableManifestMaxExtractedSize bool +// - chart +// - version +// - passCredentials +// - manifestMaxExtractedSize +// - disableManifestMaxExtractedSize func (_e *Client_Expecter) ExtractChart(chart interface{}, version interface{}, passCredentials interface{}, manifestMaxExtractedSize interface{}, disableManifestMaxExtractedSize interface{}) *Client_ExtractChart_Call { return &Client_ExtractChart_Call{Call: _e.mock.On("ExtractChart", chart, version, passCredentials, manifestMaxExtractedSize, disableManifestMaxExtractedSize)} } @@ -128,19 +139,19 @@ func (_c *Client_ExtractChart_Call) Run(run func(chart string, version string, p return _c } -func (_c *Client_ExtractChart_Call) Return(_a0 string, _a1 io.Closer, _a2 error) *Client_ExtractChart_Call { - _c.Call.Return(_a0, _a1, _a2) +func (_c *Client_ExtractChart_Call) Return(s string, closer io.Closer, err error) *Client_ExtractChart_Call { + _c.Call.Return(s, closer, err) return _c } -func (_c *Client_ExtractChart_Call) RunAndReturn(run func(string, string, bool, int64, bool) (string, io.Closer, error)) *Client_ExtractChart_Call { +func (_c *Client_ExtractChart_Call) RunAndReturn(run func(chart string, version string, passCredentials bool, manifestMaxExtractedSize int64, disableManifestMaxExtractedSize bool) (string, io.Closer, error)) *Client_ExtractChart_Call { _c.Call.Return(run) return _c } -// GetIndex provides a mock function with given fields: noCache, maxIndexSize -func (_m *Client) GetIndex(noCache bool, maxIndexSize int64) (*helm.Index, error) { - ret := _m.Called(noCache, maxIndexSize) +// GetIndex provides a mock function for the type Client +func (_mock *Client) GetIndex(noCache bool, maxIndexSize int64) (*helm.Index, error) { + ret := _mock.Called(noCache, maxIndexSize) if len(ret) == 0 { panic("no return value specified for GetIndex") @@ -148,23 +159,21 @@ func (_m *Client) GetIndex(noCache bool, maxIndexSize int64) (*helm.Index, error var r0 *helm.Index var r1 error - if rf, ok := ret.Get(0).(func(bool, int64) (*helm.Index, error)); ok { - return rf(noCache, maxIndexSize) + if returnFunc, ok := ret.Get(0).(func(bool, int64) (*helm.Index, error)); ok { + return returnFunc(noCache, maxIndexSize) } - if rf, ok := ret.Get(0).(func(bool, int64) *helm.Index); ok { - r0 = rf(noCache, maxIndexSize) + if returnFunc, ok := ret.Get(0).(func(bool, int64) *helm.Index); ok { + r0 = returnFunc(noCache, maxIndexSize) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*helm.Index) } } - - if rf, ok := ret.Get(1).(func(bool, int64) error); ok { - r1 = rf(noCache, maxIndexSize) + if returnFunc, ok := ret.Get(1).(func(bool, int64) error); ok { + r1 = returnFunc(noCache, maxIndexSize) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -174,8 +183,8 @@ type Client_GetIndex_Call struct { } // GetIndex is a helper method to define mock.On call -// - noCache bool -// - maxIndexSize int64 +// - noCache +// - maxIndexSize func (_e *Client_Expecter) GetIndex(noCache interface{}, maxIndexSize interface{}) *Client_GetIndex_Call { return &Client_GetIndex_Call{Call: _e.mock.On("GetIndex", noCache, maxIndexSize)} } @@ -187,19 +196,19 @@ func (_c *Client_GetIndex_Call) Run(run func(noCache bool, maxIndexSize int64)) return _c } -func (_c *Client_GetIndex_Call) Return(_a0 *helm.Index, _a1 error) *Client_GetIndex_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetIndex_Call) Return(index *helm.Index, err error) *Client_GetIndex_Call { + _c.Call.Return(index, err) return _c } -func (_c *Client_GetIndex_Call) RunAndReturn(run func(bool, int64) (*helm.Index, error)) *Client_GetIndex_Call { +func (_c *Client_GetIndex_Call) RunAndReturn(run func(noCache bool, maxIndexSize int64) (*helm.Index, error)) *Client_GetIndex_Call { _c.Call.Return(run) return _c } -// GetTags provides a mock function with given fields: chart, noCache -func (_m *Client) GetTags(chart string, noCache bool) ([]string, error) { - ret := _m.Called(chart, noCache) +// GetTags provides a mock function for the type Client +func (_mock *Client) GetTags(chart string, noCache bool) ([]string, error) { + ret := _mock.Called(chart, noCache) if len(ret) == 0 { panic("no return value specified for GetTags") @@ -207,23 +216,21 @@ func (_m *Client) GetTags(chart string, noCache bool) ([]string, error) { var r0 []string var r1 error - if rf, ok := ret.Get(0).(func(string, bool) ([]string, error)); ok { - return rf(chart, noCache) + if returnFunc, ok := ret.Get(0).(func(string, bool) ([]string, error)); ok { + return returnFunc(chart, noCache) } - if rf, ok := ret.Get(0).(func(string, bool) []string); ok { - r0 = rf(chart, noCache) + if returnFunc, ok := ret.Get(0).(func(string, bool) []string); ok { + r0 = returnFunc(chart, noCache) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } - - if rf, ok := ret.Get(1).(func(string, bool) error); ok { - r1 = rf(chart, noCache) + if returnFunc, ok := ret.Get(1).(func(string, bool) error); ok { + r1 = returnFunc(chart, noCache) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -233,8 +240,8 @@ type Client_GetTags_Call struct { } // GetTags is a helper method to define mock.On call -// - chart string -// - noCache bool +// - chart +// - noCache func (_e *Client_Expecter) GetTags(chart interface{}, noCache interface{}) *Client_GetTags_Call { return &Client_GetTags_Call{Call: _e.mock.On("GetTags", chart, noCache)} } @@ -246,19 +253,19 @@ func (_c *Client_GetTags_Call) Run(run func(chart string, noCache bool)) *Client return _c } -func (_c *Client_GetTags_Call) Return(_a0 []string, _a1 error) *Client_GetTags_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_GetTags_Call) Return(strings []string, err error) *Client_GetTags_Call { + _c.Call.Return(strings, err) return _c } -func (_c *Client_GetTags_Call) RunAndReturn(run func(string, bool) ([]string, error)) *Client_GetTags_Call { +func (_c *Client_GetTags_Call) RunAndReturn(run func(chart string, noCache bool) ([]string, error)) *Client_GetTags_Call { _c.Call.Return(run) return _c } -// TestHelmOCI provides a mock function with no fields -func (_m *Client) TestHelmOCI() (bool, error) { - ret := _m.Called() +// TestHelmOCI provides a mock function for the type Client +func (_mock *Client) TestHelmOCI() (bool, error) { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for TestHelmOCI") @@ -266,21 +273,19 @@ func (_m *Client) TestHelmOCI() (bool, error) { var r0 bool var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() + if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok { + return returnFunc() } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() bool); ok { + r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() } else { r1 = ret.Error(1) } - return r0, r1 } @@ -301,8 +306,8 @@ func (_c *Client_TestHelmOCI_Call) Run(run func()) *Client_TestHelmOCI_Call { return _c } -func (_c *Client_TestHelmOCI_Call) Return(_a0 bool, _a1 error) *Client_TestHelmOCI_Call { - _c.Call.Return(_a0, _a1) +func (_c *Client_TestHelmOCI_Call) Return(b bool, err error) *Client_TestHelmOCI_Call { + _c.Call.Return(b, err) return _c } @@ -310,17 +315,3 @@ func (_c *Client_TestHelmOCI_Call) RunAndReturn(run func() (bool, error)) *Clien _c.Call.Return(run) return _c } - -// NewClient creates a new instance of Client. 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 NewClient(t interface { - mock.TestingT - Cleanup(func()) -}) *Client { - mock := &Client{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/util/io/mocks/TempPaths.go b/util/io/mocks/TempPaths.go index 2d36bb79b4891..c84b4d5c5f7c8 100644 --- a/util/io/mocks/TempPaths.go +++ b/util/io/mocks/TempPaths.go @@ -1,8 +1,26 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks -import mock "github.com/stretchr/testify/mock" +import ( + mock "github.com/stretchr/testify/mock" +) + +// NewTempPaths creates a new instance of TempPaths. 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 NewTempPaths(t interface { + mock.TestingT + Cleanup(func()) +}) *TempPaths { + mock := &TempPaths{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} // TempPaths is an autogenerated mock type for the TempPaths type type TempPaths struct { @@ -17,9 +35,10 @@ func (_m *TempPaths) EXPECT() *TempPaths_Expecter { return &TempPaths_Expecter{mock: &_m.Mock} } -// Add provides a mock function with given fields: key, value -func (_m *TempPaths) Add(key string, value string) { - _m.Called(key, value) +// Add provides a mock function for the type TempPaths +func (_mock *TempPaths) Add(key string, value string) { + _mock.Called(key, value) + return } // TempPaths_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' @@ -28,8 +47,8 @@ type TempPaths_Add_Call struct { } // Add is a helper method to define mock.On call -// - key string -// - value string +// - key +// - value func (_e *TempPaths_Expecter) Add(key interface{}, value interface{}) *TempPaths_Add_Call { return &TempPaths_Add_Call{Call: _e.mock.On("Add", key, value)} } @@ -46,14 +65,14 @@ func (_c *TempPaths_Add_Call) Return() *TempPaths_Add_Call { return _c } -func (_c *TempPaths_Add_Call) RunAndReturn(run func(string, string)) *TempPaths_Add_Call { +func (_c *TempPaths_Add_Call) RunAndReturn(run func(key string, value string)) *TempPaths_Add_Call { _c.Run(run) return _c } -// GetPath provides a mock function with given fields: key -func (_m *TempPaths) GetPath(key string) (string, error) { - ret := _m.Called(key) +// GetPath provides a mock function for the type TempPaths +func (_mock *TempPaths) GetPath(key string) (string, error) { + ret := _mock.Called(key) if len(ret) == 0 { panic("no return value specified for GetPath") @@ -61,21 +80,19 @@ func (_m *TempPaths) GetPath(key string) (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func(string) (string, error)); ok { - return rf(key) + if returnFunc, ok := ret.Get(0).(func(string) (string, error)); ok { + return returnFunc(key) } - if rf, ok := ret.Get(0).(func(string) string); ok { - r0 = rf(key) + if returnFunc, ok := ret.Get(0).(func(string) string); ok { + r0 = returnFunc(key) } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(key) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(key) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -85,7 +102,7 @@ type TempPaths_GetPath_Call struct { } // GetPath is a helper method to define mock.On call -// - key string +// - key func (_e *TempPaths_Expecter) GetPath(key interface{}) *TempPaths_GetPath_Call { return &TempPaths_GetPath_Call{Call: _e.mock.On("GetPath", key)} } @@ -97,31 +114,30 @@ func (_c *TempPaths_GetPath_Call) Run(run func(key string)) *TempPaths_GetPath_C return _c } -func (_c *TempPaths_GetPath_Call) Return(_a0 string, _a1 error) *TempPaths_GetPath_Call { - _c.Call.Return(_a0, _a1) +func (_c *TempPaths_GetPath_Call) Return(s string, err error) *TempPaths_GetPath_Call { + _c.Call.Return(s, err) return _c } -func (_c *TempPaths_GetPath_Call) RunAndReturn(run func(string) (string, error)) *TempPaths_GetPath_Call { +func (_c *TempPaths_GetPath_Call) RunAndReturn(run func(key string) (string, error)) *TempPaths_GetPath_Call { _c.Call.Return(run) return _c } -// GetPathIfExists provides a mock function with given fields: key -func (_m *TempPaths) GetPathIfExists(key string) string { - ret := _m.Called(key) +// GetPathIfExists provides a mock function for the type TempPaths +func (_mock *TempPaths) GetPathIfExists(key string) string { + ret := _mock.Called(key) if len(ret) == 0 { panic("no return value specified for GetPathIfExists") } var r0 string - if rf, ok := ret.Get(0).(func(string) string); ok { - r0 = rf(key) + if returnFunc, ok := ret.Get(0).(func(string) string); ok { + r0 = returnFunc(key) } else { r0 = ret.Get(0).(string) } - return r0 } @@ -131,7 +147,7 @@ type TempPaths_GetPathIfExists_Call struct { } // GetPathIfExists is a helper method to define mock.On call -// - key string +// - key func (_e *TempPaths_Expecter) GetPathIfExists(key interface{}) *TempPaths_GetPathIfExists_Call { return &TempPaths_GetPathIfExists_Call{Call: _e.mock.On("GetPathIfExists", key)} } @@ -143,33 +159,32 @@ func (_c *TempPaths_GetPathIfExists_Call) Run(run func(key string)) *TempPaths_G return _c } -func (_c *TempPaths_GetPathIfExists_Call) Return(_a0 string) *TempPaths_GetPathIfExists_Call { - _c.Call.Return(_a0) +func (_c *TempPaths_GetPathIfExists_Call) Return(s string) *TempPaths_GetPathIfExists_Call { + _c.Call.Return(s) return _c } -func (_c *TempPaths_GetPathIfExists_Call) RunAndReturn(run func(string) string) *TempPaths_GetPathIfExists_Call { +func (_c *TempPaths_GetPathIfExists_Call) RunAndReturn(run func(key string) string) *TempPaths_GetPathIfExists_Call { _c.Call.Return(run) return _c } -// GetPaths provides a mock function with no fields -func (_m *TempPaths) GetPaths() map[string]string { - ret := _m.Called() +// GetPaths provides a mock function for the type TempPaths +func (_mock *TempPaths) GetPaths() map[string]string { + ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for GetPaths") } var r0 map[string]string - if rf, ok := ret.Get(0).(func() map[string]string); ok { - r0 = rf() + if returnFunc, ok := ret.Get(0).(func() map[string]string); ok { + r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[string]string) } } - return r0 } @@ -190,8 +205,8 @@ func (_c *TempPaths_GetPaths_Call) Run(run func()) *TempPaths_GetPaths_Call { return _c } -func (_c *TempPaths_GetPaths_Call) Return(_a0 map[string]string) *TempPaths_GetPaths_Call { - _c.Call.Return(_a0) +func (_c *TempPaths_GetPaths_Call) Return(stringToString map[string]string) *TempPaths_GetPaths_Call { + _c.Call.Return(stringToString) return _c } @@ -199,17 +214,3 @@ func (_c *TempPaths_GetPaths_Call) RunAndReturn(run func() map[string]string) *T _c.Call.Return(run) return _c } - -// NewTempPaths creates a new instance of TempPaths. 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 NewTempPaths(t interface { - mock.TestingT - Cleanup(func()) -}) *TempPaths { - mock := &TempPaths{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/util/notification/argocd/mocks/Service.go b/util/notification/argocd/mocks/Service.go index 651a9be7604e3..2ab2eefc8906e 100644 --- a/util/notification/argocd/mocks/Service.go +++ b/util/notification/argocd/mocks/Service.go @@ -1,16 +1,30 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks import ( - context "context" + "context" + "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" + "github.com/argoproj/argo-cd/v3/util/notification/expression/shared" mock "github.com/stretchr/testify/mock" +) + +// NewService creates a new instance of Service. 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 NewService(t interface { + mock.TestingT + Cleanup(func()) +}) *Service { + mock := &Service{} + mock.Mock.Test(t) - shared "github.com/argoproj/argo-cd/v3/util/notification/expression/shared" + t.Cleanup(func() { mock.AssertExpectations(t) }) - v1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" -) + return mock +} // Service is an autogenerated mock type for the Service type type Service struct { @@ -25,9 +39,9 @@ func (_m *Service) EXPECT() *Service_Expecter { return &Service_Expecter{mock: &_m.Mock} } -// GetAppDetails provides a mock function with given fields: ctx, app -func (_m *Service) GetAppDetails(ctx context.Context, app *v1alpha1.Application) (*shared.AppDetail, error) { - ret := _m.Called(ctx, app) +// GetAppDetails provides a mock function for the type Service +func (_mock *Service) GetAppDetails(ctx context.Context, app *v1alpha1.Application) (*shared.AppDetail, error) { + ret := _mock.Called(ctx, app) if len(ret) == 0 { panic("no return value specified for GetAppDetails") @@ -35,23 +49,21 @@ func (_m *Service) GetAppDetails(ctx context.Context, app *v1alpha1.Application) var r0 *shared.AppDetail var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Application) (*shared.AppDetail, error)); ok { - return rf(ctx, app) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Application) (*shared.AppDetail, error)); ok { + return returnFunc(ctx, app) } - if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Application) *shared.AppDetail); ok { - r0 = rf(ctx, app) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Application) *shared.AppDetail); ok { + r0 = returnFunc(ctx, app) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*shared.AppDetail) } } - - if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.Application) error); ok { - r1 = rf(ctx, app) + if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.Application) error); ok { + r1 = returnFunc(ctx, app) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -61,8 +73,8 @@ type Service_GetAppDetails_Call struct { } // GetAppDetails is a helper method to define mock.On call -// - ctx context.Context -// - app *v1alpha1.Application +// - ctx +// - app func (_e *Service_Expecter) GetAppDetails(ctx interface{}, app interface{}) *Service_GetAppDetails_Call { return &Service_GetAppDetails_Call{Call: _e.mock.On("GetAppDetails", ctx, app)} } @@ -74,19 +86,19 @@ func (_c *Service_GetAppDetails_Call) Run(run func(ctx context.Context, app *v1a return _c } -func (_c *Service_GetAppDetails_Call) Return(_a0 *shared.AppDetail, _a1 error) *Service_GetAppDetails_Call { - _c.Call.Return(_a0, _a1) +func (_c *Service_GetAppDetails_Call) Return(appDetail *shared.AppDetail, err error) *Service_GetAppDetails_Call { + _c.Call.Return(appDetail, err) return _c } -func (_c *Service_GetAppDetails_Call) RunAndReturn(run func(context.Context, *v1alpha1.Application) (*shared.AppDetail, error)) *Service_GetAppDetails_Call { +func (_c *Service_GetAppDetails_Call) RunAndReturn(run func(ctx context.Context, app *v1alpha1.Application) (*shared.AppDetail, error)) *Service_GetAppDetails_Call { _c.Call.Return(run) return _c } -// GetCommitMetadata provides a mock function with given fields: ctx, repoURL, commitSHA, project -func (_m *Service) GetCommitMetadata(ctx context.Context, repoURL string, commitSHA string, project string) (*shared.CommitMetadata, error) { - ret := _m.Called(ctx, repoURL, commitSHA, project) +// GetCommitMetadata provides a mock function for the type Service +func (_mock *Service) GetCommitMetadata(ctx context.Context, repoURL string, commitSHA string, project string) (*shared.CommitMetadata, error) { + ret := _mock.Called(ctx, repoURL, commitSHA, project) if len(ret) == 0 { panic("no return value specified for GetCommitMetadata") @@ -94,23 +106,21 @@ func (_m *Service) GetCommitMetadata(ctx context.Context, repoURL string, commit var r0 *shared.CommitMetadata var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*shared.CommitMetadata, error)); ok { - return rf(ctx, repoURL, commitSHA, project) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) (*shared.CommitMetadata, error)); ok { + return returnFunc(ctx, repoURL, commitSHA, project) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *shared.CommitMetadata); ok { - r0 = rf(ctx, repoURL, commitSHA, project) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) *shared.CommitMetadata); ok { + r0 = returnFunc(ctx, repoURL, commitSHA, project) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*shared.CommitMetadata) } } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { - r1 = rf(ctx, repoURL, commitSHA, project) + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = returnFunc(ctx, repoURL, commitSHA, project) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -120,10 +130,10 @@ type Service_GetCommitMetadata_Call struct { } // GetCommitMetadata is a helper method to define mock.On call -// - ctx context.Context -// - repoURL string -// - commitSHA string -// - project string +// - ctx +// - repoURL +// - commitSHA +// - project func (_e *Service_Expecter) GetCommitMetadata(ctx interface{}, repoURL interface{}, commitSHA interface{}, project interface{}) *Service_GetCommitMetadata_Call { return &Service_GetCommitMetadata_Call{Call: _e.mock.On("GetCommitMetadata", ctx, repoURL, commitSHA, project)} } @@ -135,26 +145,12 @@ func (_c *Service_GetCommitMetadata_Call) Run(run func(ctx context.Context, repo return _c } -func (_c *Service_GetCommitMetadata_Call) Return(_a0 *shared.CommitMetadata, _a1 error) *Service_GetCommitMetadata_Call { - _c.Call.Return(_a0, _a1) +func (_c *Service_GetCommitMetadata_Call) Return(commitMetadata *shared.CommitMetadata, err error) *Service_GetCommitMetadata_Call { + _c.Call.Return(commitMetadata, err) return _c } -func (_c *Service_GetCommitMetadata_Call) RunAndReturn(run func(context.Context, string, string, string) (*shared.CommitMetadata, error)) *Service_GetCommitMetadata_Call { +func (_c *Service_GetCommitMetadata_Call) RunAndReturn(run func(ctx context.Context, repoURL string, commitSHA string, project string) (*shared.CommitMetadata, error)) *Service_GetCommitMetadata_Call { _c.Call.Return(run) return _c } - -// NewService creates a new instance of Service. 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 NewService(t interface { - mock.TestingT - Cleanup(func()) -}) *Service { - mock := &Service{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/util/workloadidentity/mocks/TokenProvider.go b/util/workloadidentity/mocks/TokenProvider.go index 126073b7a5ab6..008b45c6f459b 100644 --- a/util/workloadidentity/mocks/TokenProvider.go +++ b/util/workloadidentity/mocks/TokenProvider.go @@ -1,8 +1,26 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify package mocks -import mock "github.com/stretchr/testify/mock" +import ( + mock "github.com/stretchr/testify/mock" +) + +// NewTokenProvider creates a new instance of TokenProvider. 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 NewTokenProvider(t interface { + mock.TestingT + Cleanup(func()) +}) *TokenProvider { + mock := &TokenProvider{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} // TokenProvider is an autogenerated mock type for the TokenProvider type type TokenProvider struct { @@ -17,9 +35,9 @@ func (_m *TokenProvider) EXPECT() *TokenProvider_Expecter { return &TokenProvider_Expecter{mock: &_m.Mock} } -// GetToken provides a mock function with given fields: scope -func (_m *TokenProvider) GetToken(scope string) (string, error) { - ret := _m.Called(scope) +// GetToken provides a mock function for the type TokenProvider +func (_mock *TokenProvider) GetToken(scope string) (string, error) { + ret := _mock.Called(scope) if len(ret) == 0 { panic("no return value specified for GetToken") @@ -27,21 +45,19 @@ func (_m *TokenProvider) GetToken(scope string) (string, error) { var r0 string var r1 error - if rf, ok := ret.Get(0).(func(string) (string, error)); ok { - return rf(scope) + if returnFunc, ok := ret.Get(0).(func(string) (string, error)); ok { + return returnFunc(scope) } - if rf, ok := ret.Get(0).(func(string) string); ok { - r0 = rf(scope) + if returnFunc, ok := ret.Get(0).(func(string) string); ok { + r0 = returnFunc(scope) } else { r0 = ret.Get(0).(string) } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(scope) + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(scope) } else { r1 = ret.Error(1) } - return r0, r1 } @@ -51,7 +67,7 @@ type TokenProvider_GetToken_Call struct { } // GetToken is a helper method to define mock.On call -// - scope string +// - scope func (_e *TokenProvider_Expecter) GetToken(scope interface{}) *TokenProvider_GetToken_Call { return &TokenProvider_GetToken_Call{Call: _e.mock.On("GetToken", scope)} } @@ -63,26 +79,12 @@ func (_c *TokenProvider_GetToken_Call) Run(run func(scope string)) *TokenProvide return _c } -func (_c *TokenProvider_GetToken_Call) Return(_a0 string, _a1 error) *TokenProvider_GetToken_Call { - _c.Call.Return(_a0, _a1) +func (_c *TokenProvider_GetToken_Call) Return(s string, err error) *TokenProvider_GetToken_Call { + _c.Call.Return(s, err) return _c } -func (_c *TokenProvider_GetToken_Call) RunAndReturn(run func(string) (string, error)) *TokenProvider_GetToken_Call { +func (_c *TokenProvider_GetToken_Call) RunAndReturn(run func(scope string) (string, error)) *TokenProvider_GetToken_Call { _c.Call.Return(run) return _c } - -// NewTokenProvider creates a new instance of TokenProvider. 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 NewTokenProvider(t interface { - mock.TestingT - Cleanup(func()) -}) *TokenProvider { - mock := &TokenProvider{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -}