mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com> Signed-off-by: reggie-k <[email protected]> Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com> Co-authored-by: reggie-k <[email protected]>
388 lines
14 KiB
Go
Generated
388 lines
14 KiB
Go
Generated
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/aws/aws-sdk-go-v2/service/codecommit"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// 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
|
|
}
|
|
|
|
type AWSCodeCommitClient_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *AWSCodeCommitClient) EXPECT() *AWSCodeCommitClient_Expecter {
|
|
return &AWSCodeCommitClient_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// GetFolder provides a mock function for the type AWSCodeCommitClient
|
|
func (_mock *AWSCodeCommitClient) GetFolder(context1 context.Context, getFolderInput *codecommit.GetFolderInput, fns ...func(*codecommit.Options)) (*codecommit.GetFolderOutput, error) {
|
|
// func(*codecommit.Options)
|
|
_va := make([]any, len(fns))
|
|
for _i := range fns {
|
|
_va[_i] = fns[_i]
|
|
}
|
|
var _ca []any
|
|
_ca = append(_ca, context1, getFolderInput)
|
|
_ca = append(_ca, _va...)
|
|
ret := _mock.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetFolder")
|
|
}
|
|
|
|
var r0 *codecommit.GetFolderOutput
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.GetFolderInput, ...func(*codecommit.Options)) (*codecommit.GetFolderOutput, error)); ok {
|
|
return returnFunc(context1, getFolderInput, fns...)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.GetFolderInput, ...func(*codecommit.Options)) *codecommit.GetFolderOutput); ok {
|
|
r0 = returnFunc(context1, getFolderInput, fns...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*codecommit.GetFolderOutput)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *codecommit.GetFolderInput, ...func(*codecommit.Options)) error); ok {
|
|
r1 = returnFunc(context1, getFolderInput, fns...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// AWSCodeCommitClient_GetFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFolder'
|
|
type AWSCodeCommitClient_GetFolder_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetFolder is a helper method to define mock.On call
|
|
// - context1 context.Context
|
|
// - getFolderInput *codecommit.GetFolderInput
|
|
// - fns ...func(*codecommit.Options)
|
|
func (_e *AWSCodeCommitClient_Expecter) GetFolder(context1 any, getFolderInput any, fns ...any) *AWSCodeCommitClient_GetFolder_Call {
|
|
return &AWSCodeCommitClient_GetFolder_Call{Call: _e.mock.On("GetFolder",
|
|
append([]any{context1, getFolderInput}, fns...)...)}
|
|
}
|
|
|
|
func (_c *AWSCodeCommitClient_GetFolder_Call) Run(run func(context1 context.Context, getFolderInput *codecommit.GetFolderInput, fns ...func(*codecommit.Options))) *AWSCodeCommitClient_GetFolder_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *codecommit.GetFolderInput
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*codecommit.GetFolderInput)
|
|
}
|
|
var arg2 []func(*codecommit.Options)
|
|
variadicArgs := make([]func(*codecommit.Options), len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(func(*codecommit.Options))
|
|
}
|
|
}
|
|
arg2 = variadicArgs
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2...,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *AWSCodeCommitClient_GetFolder_Call) Return(getFolderOutput *codecommit.GetFolderOutput, err error) *AWSCodeCommitClient_GetFolder_Call {
|
|
_c.Call.Return(getFolderOutput, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *AWSCodeCommitClient_GetFolder_Call) RunAndReturn(run func(context1 context.Context, getFolderInput *codecommit.GetFolderInput, fns ...func(*codecommit.Options)) (*codecommit.GetFolderOutput, error)) *AWSCodeCommitClient_GetFolder_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetRepository provides a mock function for the type AWSCodeCommitClient
|
|
func (_mock *AWSCodeCommitClient) GetRepository(context1 context.Context, getRepositoryInput *codecommit.GetRepositoryInput, fns ...func(*codecommit.Options)) (*codecommit.GetRepositoryOutput, error) {
|
|
// func(*codecommit.Options)
|
|
_va := make([]any, len(fns))
|
|
for _i := range fns {
|
|
_va[_i] = fns[_i]
|
|
}
|
|
var _ca []any
|
|
_ca = append(_ca, context1, getRepositoryInput)
|
|
_ca = append(_ca, _va...)
|
|
ret := _mock.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetRepository")
|
|
}
|
|
|
|
var r0 *codecommit.GetRepositoryOutput
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.GetRepositoryInput, ...func(*codecommit.Options)) (*codecommit.GetRepositoryOutput, error)); ok {
|
|
return returnFunc(context1, getRepositoryInput, fns...)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.GetRepositoryInput, ...func(*codecommit.Options)) *codecommit.GetRepositoryOutput); ok {
|
|
r0 = returnFunc(context1, getRepositoryInput, fns...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*codecommit.GetRepositoryOutput)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *codecommit.GetRepositoryInput, ...func(*codecommit.Options)) error); ok {
|
|
r1 = returnFunc(context1, getRepositoryInput, fns...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// AWSCodeCommitClient_GetRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepository'
|
|
type AWSCodeCommitClient_GetRepository_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetRepository is a helper method to define mock.On call
|
|
// - context1 context.Context
|
|
// - getRepositoryInput *codecommit.GetRepositoryInput
|
|
// - fns ...func(*codecommit.Options)
|
|
func (_e *AWSCodeCommitClient_Expecter) GetRepository(context1 any, getRepositoryInput any, fns ...any) *AWSCodeCommitClient_GetRepository_Call {
|
|
return &AWSCodeCommitClient_GetRepository_Call{Call: _e.mock.On("GetRepository",
|
|
append([]any{context1, getRepositoryInput}, fns...)...)}
|
|
}
|
|
|
|
func (_c *AWSCodeCommitClient_GetRepository_Call) Run(run func(context1 context.Context, getRepositoryInput *codecommit.GetRepositoryInput, fns ...func(*codecommit.Options))) *AWSCodeCommitClient_GetRepository_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *codecommit.GetRepositoryInput
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*codecommit.GetRepositoryInput)
|
|
}
|
|
var arg2 []func(*codecommit.Options)
|
|
variadicArgs := make([]func(*codecommit.Options), len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(func(*codecommit.Options))
|
|
}
|
|
}
|
|
arg2 = variadicArgs
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2...,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *AWSCodeCommitClient_GetRepository_Call) Return(getRepositoryOutput *codecommit.GetRepositoryOutput, err error) *AWSCodeCommitClient_GetRepository_Call {
|
|
_c.Call.Return(getRepositoryOutput, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *AWSCodeCommitClient_GetRepository_Call) RunAndReturn(run func(context1 context.Context, getRepositoryInput *codecommit.GetRepositoryInput, fns ...func(*codecommit.Options)) (*codecommit.GetRepositoryOutput, error)) *AWSCodeCommitClient_GetRepository_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListBranches provides a mock function for the type AWSCodeCommitClient
|
|
func (_mock *AWSCodeCommitClient) ListBranches(context1 context.Context, listBranchesInput *codecommit.ListBranchesInput, fns ...func(*codecommit.Options)) (*codecommit.ListBranchesOutput, error) {
|
|
// func(*codecommit.Options)
|
|
_va := make([]any, len(fns))
|
|
for _i := range fns {
|
|
_va[_i] = fns[_i]
|
|
}
|
|
var _ca []any
|
|
_ca = append(_ca, context1, listBranchesInput)
|
|
_ca = append(_ca, _va...)
|
|
ret := _mock.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListBranches")
|
|
}
|
|
|
|
var r0 *codecommit.ListBranchesOutput
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.ListBranchesInput, ...func(*codecommit.Options)) (*codecommit.ListBranchesOutput, error)); ok {
|
|
return returnFunc(context1, listBranchesInput, fns...)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.ListBranchesInput, ...func(*codecommit.Options)) *codecommit.ListBranchesOutput); ok {
|
|
r0 = returnFunc(context1, listBranchesInput, fns...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*codecommit.ListBranchesOutput)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *codecommit.ListBranchesInput, ...func(*codecommit.Options)) error); ok {
|
|
r1 = returnFunc(context1, listBranchesInput, fns...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// AWSCodeCommitClient_ListBranches_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBranches'
|
|
type AWSCodeCommitClient_ListBranches_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListBranches is a helper method to define mock.On call
|
|
// - context1 context.Context
|
|
// - listBranchesInput *codecommit.ListBranchesInput
|
|
// - fns ...func(*codecommit.Options)
|
|
func (_e *AWSCodeCommitClient_Expecter) ListBranches(context1 any, listBranchesInput any, fns ...any) *AWSCodeCommitClient_ListBranches_Call {
|
|
return &AWSCodeCommitClient_ListBranches_Call{Call: _e.mock.On("ListBranches",
|
|
append([]any{context1, listBranchesInput}, fns...)...)}
|
|
}
|
|
|
|
func (_c *AWSCodeCommitClient_ListBranches_Call) Run(run func(context1 context.Context, listBranchesInput *codecommit.ListBranchesInput, fns ...func(*codecommit.Options))) *AWSCodeCommitClient_ListBranches_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *codecommit.ListBranchesInput
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*codecommit.ListBranchesInput)
|
|
}
|
|
var arg2 []func(*codecommit.Options)
|
|
variadicArgs := make([]func(*codecommit.Options), len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(func(*codecommit.Options))
|
|
}
|
|
}
|
|
arg2 = variadicArgs
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2...,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *AWSCodeCommitClient_ListBranches_Call) Return(listBranchesOutput *codecommit.ListBranchesOutput, err error) *AWSCodeCommitClient_ListBranches_Call {
|
|
_c.Call.Return(listBranchesOutput, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *AWSCodeCommitClient_ListBranches_Call) RunAndReturn(run func(context1 context.Context, listBranchesInput *codecommit.ListBranchesInput, fns ...func(*codecommit.Options)) (*codecommit.ListBranchesOutput, error)) *AWSCodeCommitClient_ListBranches_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListRepositories provides a mock function for the type AWSCodeCommitClient
|
|
func (_mock *AWSCodeCommitClient) ListRepositories(context1 context.Context, listRepositoriesInput *codecommit.ListRepositoriesInput, fns ...func(*codecommit.Options)) (*codecommit.ListRepositoriesOutput, error) {
|
|
// func(*codecommit.Options)
|
|
_va := make([]any, len(fns))
|
|
for _i := range fns {
|
|
_va[_i] = fns[_i]
|
|
}
|
|
var _ca []any
|
|
_ca = append(_ca, context1, listRepositoriesInput)
|
|
_ca = append(_ca, _va...)
|
|
ret := _mock.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListRepositories")
|
|
}
|
|
|
|
var r0 *codecommit.ListRepositoriesOutput
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.ListRepositoriesInput, ...func(*codecommit.Options)) (*codecommit.ListRepositoriesOutput, error)); ok {
|
|
return returnFunc(context1, listRepositoriesInput, fns...)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.ListRepositoriesInput, ...func(*codecommit.Options)) *codecommit.ListRepositoriesOutput); ok {
|
|
r0 = returnFunc(context1, listRepositoriesInput, fns...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*codecommit.ListRepositoriesOutput)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, *codecommit.ListRepositoriesInput, ...func(*codecommit.Options)) error); ok {
|
|
r1 = returnFunc(context1, listRepositoriesInput, fns...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// AWSCodeCommitClient_ListRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRepositories'
|
|
type AWSCodeCommitClient_ListRepositories_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListRepositories is a helper method to define mock.On call
|
|
// - context1 context.Context
|
|
// - listRepositoriesInput *codecommit.ListRepositoriesInput
|
|
// - fns ...func(*codecommit.Options)
|
|
func (_e *AWSCodeCommitClient_Expecter) ListRepositories(context1 any, listRepositoriesInput any, fns ...any) *AWSCodeCommitClient_ListRepositories_Call {
|
|
return &AWSCodeCommitClient_ListRepositories_Call{Call: _e.mock.On("ListRepositories",
|
|
append([]any{context1, listRepositoriesInput}, fns...)...)}
|
|
}
|
|
|
|
func (_c *AWSCodeCommitClient_ListRepositories_Call) Run(run func(context1 context.Context, listRepositoriesInput *codecommit.ListRepositoriesInput, fns ...func(*codecommit.Options))) *AWSCodeCommitClient_ListRepositories_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 *codecommit.ListRepositoriesInput
|
|
if args[1] != nil {
|
|
arg1 = args[1].(*codecommit.ListRepositoriesInput)
|
|
}
|
|
var arg2 []func(*codecommit.Options)
|
|
variadicArgs := make([]func(*codecommit.Options), len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(func(*codecommit.Options))
|
|
}
|
|
}
|
|
arg2 = variadicArgs
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2...,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *AWSCodeCommitClient_ListRepositories_Call) Return(listRepositoriesOutput *codecommit.ListRepositoriesOutput, err error) *AWSCodeCommitClient_ListRepositories_Call {
|
|
_c.Call.Return(listRepositoriesOutput, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *AWSCodeCommitClient_ListRepositories_Call) RunAndReturn(run func(context1 context.Context, listRepositoriesInput *codecommit.ListRepositoriesInput, fns ...func(*codecommit.Options)) (*codecommit.ListRepositoriesOutput, error)) *AWSCodeCommitClient_ListRepositories_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|