github.com/argoproj/argo-cd/v3@v3.2.1/applicationset/services/scm_provider/aws_codecommit/mocks/AWSCodeCommitClient.go (about)

     1  // Code generated by mockery; DO NOT EDIT.
     2  // github.com/vektra/mockery
     3  // template: testify
     4  
     5  package mocks
     6  
     7  import (
     8  	"github.com/aws/aws-sdk-go/aws"
     9  	"github.com/aws/aws-sdk-go/aws/request"
    10  	"github.com/aws/aws-sdk-go/service/codecommit"
    11  	mock "github.com/stretchr/testify/mock"
    12  )
    13  
    14  // 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.
    15  // The first argument is typically a *testing.T value.
    16  func NewAWSCodeCommitClient(t interface {
    17  	mock.TestingT
    18  	Cleanup(func())
    19  }) *AWSCodeCommitClient {
    20  	mock := &AWSCodeCommitClient{}
    21  	mock.Mock.Test(t)
    22  
    23  	t.Cleanup(func() { mock.AssertExpectations(t) })
    24  
    25  	return mock
    26  }
    27  
    28  // AWSCodeCommitClient is an autogenerated mock type for the AWSCodeCommitClient type
    29  type AWSCodeCommitClient struct {
    30  	mock.Mock
    31  }
    32  
    33  type AWSCodeCommitClient_Expecter struct {
    34  	mock *mock.Mock
    35  }
    36  
    37  func (_m *AWSCodeCommitClient) EXPECT() *AWSCodeCommitClient_Expecter {
    38  	return &AWSCodeCommitClient_Expecter{mock: &_m.Mock}
    39  }
    40  
    41  // GetFolderWithContext provides a mock function for the type AWSCodeCommitClient
    42  func (_mock *AWSCodeCommitClient) GetFolderWithContext(v aws.Context, getFolderInput *codecommit.GetFolderInput, options ...request.Option) (*codecommit.GetFolderOutput, error) {
    43  	// request.Option
    44  	_va := make([]interface{}, len(options))
    45  	for _i := range options {
    46  		_va[_i] = options[_i]
    47  	}
    48  	var _ca []interface{}
    49  	_ca = append(_ca, v, getFolderInput)
    50  	_ca = append(_ca, _va...)
    51  	ret := _mock.Called(_ca...)
    52  
    53  	if len(ret) == 0 {
    54  		panic("no return value specified for GetFolderWithContext")
    55  	}
    56  
    57  	var r0 *codecommit.GetFolderOutput
    58  	var r1 error
    59  	if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.GetFolderInput, ...request.Option) (*codecommit.GetFolderOutput, error)); ok {
    60  		return returnFunc(v, getFolderInput, options...)
    61  	}
    62  	if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.GetFolderInput, ...request.Option) *codecommit.GetFolderOutput); ok {
    63  		r0 = returnFunc(v, getFolderInput, options...)
    64  	} else {
    65  		if ret.Get(0) != nil {
    66  			r0 = ret.Get(0).(*codecommit.GetFolderOutput)
    67  		}
    68  	}
    69  	if returnFunc, ok := ret.Get(1).(func(aws.Context, *codecommit.GetFolderInput, ...request.Option) error); ok {
    70  		r1 = returnFunc(v, getFolderInput, options...)
    71  	} else {
    72  		r1 = ret.Error(1)
    73  	}
    74  	return r0, r1
    75  }
    76  
    77  // AWSCodeCommitClient_GetFolderWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFolderWithContext'
    78  type AWSCodeCommitClient_GetFolderWithContext_Call struct {
    79  	*mock.Call
    80  }
    81  
    82  // GetFolderWithContext is a helper method to define mock.On call
    83  //   - v aws.Context
    84  //   - getFolderInput *codecommit.GetFolderInput
    85  //   - options ...request.Option
    86  func (_e *AWSCodeCommitClient_Expecter) GetFolderWithContext(v interface{}, getFolderInput interface{}, options ...interface{}) *AWSCodeCommitClient_GetFolderWithContext_Call {
    87  	return &AWSCodeCommitClient_GetFolderWithContext_Call{Call: _e.mock.On("GetFolderWithContext",
    88  		append([]interface{}{v, getFolderInput}, options...)...)}
    89  }
    90  
    91  func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) Run(run func(v aws.Context, getFolderInput *codecommit.GetFolderInput, options ...request.Option)) *AWSCodeCommitClient_GetFolderWithContext_Call {
    92  	_c.Call.Run(func(args mock.Arguments) {
    93  		var arg0 aws.Context
    94  		if args[0] != nil {
    95  			arg0 = args[0].(aws.Context)
    96  		}
    97  		var arg1 *codecommit.GetFolderInput
    98  		if args[1] != nil {
    99  			arg1 = args[1].(*codecommit.GetFolderInput)
   100  		}
   101  		var arg2 []request.Option
   102  		variadicArgs := make([]request.Option, len(args)-2)
   103  		for i, a := range args[2:] {
   104  			if a != nil {
   105  				variadicArgs[i] = a.(request.Option)
   106  			}
   107  		}
   108  		arg2 = variadicArgs
   109  		run(
   110  			arg0,
   111  			arg1,
   112  			arg2...,
   113  		)
   114  	})
   115  	return _c
   116  }
   117  
   118  func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) Return(getFolderOutput *codecommit.GetFolderOutput, err error) *AWSCodeCommitClient_GetFolderWithContext_Call {
   119  	_c.Call.Return(getFolderOutput, err)
   120  	return _c
   121  }
   122  
   123  func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) RunAndReturn(run func(v aws.Context, getFolderInput *codecommit.GetFolderInput, options ...request.Option) (*codecommit.GetFolderOutput, error)) *AWSCodeCommitClient_GetFolderWithContext_Call {
   124  	_c.Call.Return(run)
   125  	return _c
   126  }
   127  
   128  // GetRepositoryWithContext provides a mock function for the type AWSCodeCommitClient
   129  func (_mock *AWSCodeCommitClient) GetRepositoryWithContext(v aws.Context, getRepositoryInput *codecommit.GetRepositoryInput, options ...request.Option) (*codecommit.GetRepositoryOutput, error) {
   130  	// request.Option
   131  	_va := make([]interface{}, len(options))
   132  	for _i := range options {
   133  		_va[_i] = options[_i]
   134  	}
   135  	var _ca []interface{}
   136  	_ca = append(_ca, v, getRepositoryInput)
   137  	_ca = append(_ca, _va...)
   138  	ret := _mock.Called(_ca...)
   139  
   140  	if len(ret) == 0 {
   141  		panic("no return value specified for GetRepositoryWithContext")
   142  	}
   143  
   144  	var r0 *codecommit.GetRepositoryOutput
   145  	var r1 error
   146  	if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) (*codecommit.GetRepositoryOutput, error)); ok {
   147  		return returnFunc(v, getRepositoryInput, options...)
   148  	}
   149  	if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) *codecommit.GetRepositoryOutput); ok {
   150  		r0 = returnFunc(v, getRepositoryInput, options...)
   151  	} else {
   152  		if ret.Get(0) != nil {
   153  			r0 = ret.Get(0).(*codecommit.GetRepositoryOutput)
   154  		}
   155  	}
   156  	if returnFunc, ok := ret.Get(1).(func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) error); ok {
   157  		r1 = returnFunc(v, getRepositoryInput, options...)
   158  	} else {
   159  		r1 = ret.Error(1)
   160  	}
   161  	return r0, r1
   162  }
   163  
   164  // AWSCodeCommitClient_GetRepositoryWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepositoryWithContext'
   165  type AWSCodeCommitClient_GetRepositoryWithContext_Call struct {
   166  	*mock.Call
   167  }
   168  
   169  // GetRepositoryWithContext is a helper method to define mock.On call
   170  //   - v aws.Context
   171  //   - getRepositoryInput *codecommit.GetRepositoryInput
   172  //   - options ...request.Option
   173  func (_e *AWSCodeCommitClient_Expecter) GetRepositoryWithContext(v interface{}, getRepositoryInput interface{}, options ...interface{}) *AWSCodeCommitClient_GetRepositoryWithContext_Call {
   174  	return &AWSCodeCommitClient_GetRepositoryWithContext_Call{Call: _e.mock.On("GetRepositoryWithContext",
   175  		append([]interface{}{v, getRepositoryInput}, options...)...)}
   176  }
   177  
   178  func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) Run(run func(v aws.Context, getRepositoryInput *codecommit.GetRepositoryInput, options ...request.Option)) *AWSCodeCommitClient_GetRepositoryWithContext_Call {
   179  	_c.Call.Run(func(args mock.Arguments) {
   180  		var arg0 aws.Context
   181  		if args[0] != nil {
   182  			arg0 = args[0].(aws.Context)
   183  		}
   184  		var arg1 *codecommit.GetRepositoryInput
   185  		if args[1] != nil {
   186  			arg1 = args[1].(*codecommit.GetRepositoryInput)
   187  		}
   188  		var arg2 []request.Option
   189  		variadicArgs := make([]request.Option, len(args)-2)
   190  		for i, a := range args[2:] {
   191  			if a != nil {
   192  				variadicArgs[i] = a.(request.Option)
   193  			}
   194  		}
   195  		arg2 = variadicArgs
   196  		run(
   197  			arg0,
   198  			arg1,
   199  			arg2...,
   200  		)
   201  	})
   202  	return _c
   203  }
   204  
   205  func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) Return(getRepositoryOutput *codecommit.GetRepositoryOutput, err error) *AWSCodeCommitClient_GetRepositoryWithContext_Call {
   206  	_c.Call.Return(getRepositoryOutput, err)
   207  	return _c
   208  }
   209  
   210  func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) RunAndReturn(run func(v aws.Context, getRepositoryInput *codecommit.GetRepositoryInput, options ...request.Option) (*codecommit.GetRepositoryOutput, error)) *AWSCodeCommitClient_GetRepositoryWithContext_Call {
   211  	_c.Call.Return(run)
   212  	return _c
   213  }
   214  
   215  // ListBranchesWithContext provides a mock function for the type AWSCodeCommitClient
   216  func (_mock *AWSCodeCommitClient) ListBranchesWithContext(v aws.Context, listBranchesInput *codecommit.ListBranchesInput, options ...request.Option) (*codecommit.ListBranchesOutput, error) {
   217  	// request.Option
   218  	_va := make([]interface{}, len(options))
   219  	for _i := range options {
   220  		_va[_i] = options[_i]
   221  	}
   222  	var _ca []interface{}
   223  	_ca = append(_ca, v, listBranchesInput)
   224  	_ca = append(_ca, _va...)
   225  	ret := _mock.Called(_ca...)
   226  
   227  	if len(ret) == 0 {
   228  		panic("no return value specified for ListBranchesWithContext")
   229  	}
   230  
   231  	var r0 *codecommit.ListBranchesOutput
   232  	var r1 error
   233  	if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) (*codecommit.ListBranchesOutput, error)); ok {
   234  		return returnFunc(v, listBranchesInput, options...)
   235  	}
   236  	if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) *codecommit.ListBranchesOutput); ok {
   237  		r0 = returnFunc(v, listBranchesInput, options...)
   238  	} else {
   239  		if ret.Get(0) != nil {
   240  			r0 = ret.Get(0).(*codecommit.ListBranchesOutput)
   241  		}
   242  	}
   243  	if returnFunc, ok := ret.Get(1).(func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) error); ok {
   244  		r1 = returnFunc(v, listBranchesInput, options...)
   245  	} else {
   246  		r1 = ret.Error(1)
   247  	}
   248  	return r0, r1
   249  }
   250  
   251  // AWSCodeCommitClient_ListBranchesWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBranchesWithContext'
   252  type AWSCodeCommitClient_ListBranchesWithContext_Call struct {
   253  	*mock.Call
   254  }
   255  
   256  // ListBranchesWithContext is a helper method to define mock.On call
   257  //   - v aws.Context
   258  //   - listBranchesInput *codecommit.ListBranchesInput
   259  //   - options ...request.Option
   260  func (_e *AWSCodeCommitClient_Expecter) ListBranchesWithContext(v interface{}, listBranchesInput interface{}, options ...interface{}) *AWSCodeCommitClient_ListBranchesWithContext_Call {
   261  	return &AWSCodeCommitClient_ListBranchesWithContext_Call{Call: _e.mock.On("ListBranchesWithContext",
   262  		append([]interface{}{v, listBranchesInput}, options...)...)}
   263  }
   264  
   265  func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) Run(run func(v aws.Context, listBranchesInput *codecommit.ListBranchesInput, options ...request.Option)) *AWSCodeCommitClient_ListBranchesWithContext_Call {
   266  	_c.Call.Run(func(args mock.Arguments) {
   267  		var arg0 aws.Context
   268  		if args[0] != nil {
   269  			arg0 = args[0].(aws.Context)
   270  		}
   271  		var arg1 *codecommit.ListBranchesInput
   272  		if args[1] != nil {
   273  			arg1 = args[1].(*codecommit.ListBranchesInput)
   274  		}
   275  		var arg2 []request.Option
   276  		variadicArgs := make([]request.Option, len(args)-2)
   277  		for i, a := range args[2:] {
   278  			if a != nil {
   279  				variadicArgs[i] = a.(request.Option)
   280  			}
   281  		}
   282  		arg2 = variadicArgs
   283  		run(
   284  			arg0,
   285  			arg1,
   286  			arg2...,
   287  		)
   288  	})
   289  	return _c
   290  }
   291  
   292  func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) Return(listBranchesOutput *codecommit.ListBranchesOutput, err error) *AWSCodeCommitClient_ListBranchesWithContext_Call {
   293  	_c.Call.Return(listBranchesOutput, err)
   294  	return _c
   295  }
   296  
   297  func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) RunAndReturn(run func(v aws.Context, listBranchesInput *codecommit.ListBranchesInput, options ...request.Option) (*codecommit.ListBranchesOutput, error)) *AWSCodeCommitClient_ListBranchesWithContext_Call {
   298  	_c.Call.Return(run)
   299  	return _c
   300  }
   301  
   302  // ListRepositoriesWithContext provides a mock function for the type AWSCodeCommitClient
   303  func (_mock *AWSCodeCommitClient) ListRepositoriesWithContext(v aws.Context, listRepositoriesInput *codecommit.ListRepositoriesInput, options ...request.Option) (*codecommit.ListRepositoriesOutput, error) {
   304  	// request.Option
   305  	_va := make([]interface{}, len(options))
   306  	for _i := range options {
   307  		_va[_i] = options[_i]
   308  	}
   309  	var _ca []interface{}
   310  	_ca = append(_ca, v, listRepositoriesInput)
   311  	_ca = append(_ca, _va...)
   312  	ret := _mock.Called(_ca...)
   313  
   314  	if len(ret) == 0 {
   315  		panic("no return value specified for ListRepositoriesWithContext")
   316  	}
   317  
   318  	var r0 *codecommit.ListRepositoriesOutput
   319  	var r1 error
   320  	if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) (*codecommit.ListRepositoriesOutput, error)); ok {
   321  		return returnFunc(v, listRepositoriesInput, options...)
   322  	}
   323  	if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) *codecommit.ListRepositoriesOutput); ok {
   324  		r0 = returnFunc(v, listRepositoriesInput, options...)
   325  	} else {
   326  		if ret.Get(0) != nil {
   327  			r0 = ret.Get(0).(*codecommit.ListRepositoriesOutput)
   328  		}
   329  	}
   330  	if returnFunc, ok := ret.Get(1).(func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) error); ok {
   331  		r1 = returnFunc(v, listRepositoriesInput, options...)
   332  	} else {
   333  		r1 = ret.Error(1)
   334  	}
   335  	return r0, r1
   336  }
   337  
   338  // AWSCodeCommitClient_ListRepositoriesWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRepositoriesWithContext'
   339  type AWSCodeCommitClient_ListRepositoriesWithContext_Call struct {
   340  	*mock.Call
   341  }
   342  
   343  // ListRepositoriesWithContext is a helper method to define mock.On call
   344  //   - v aws.Context
   345  //   - listRepositoriesInput *codecommit.ListRepositoriesInput
   346  //   - options ...request.Option
   347  func (_e *AWSCodeCommitClient_Expecter) ListRepositoriesWithContext(v interface{}, listRepositoriesInput interface{}, options ...interface{}) *AWSCodeCommitClient_ListRepositoriesWithContext_Call {
   348  	return &AWSCodeCommitClient_ListRepositoriesWithContext_Call{Call: _e.mock.On("ListRepositoriesWithContext",
   349  		append([]interface{}{v, listRepositoriesInput}, options...)...)}
   350  }
   351  
   352  func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) Run(run func(v aws.Context, listRepositoriesInput *codecommit.ListRepositoriesInput, options ...request.Option)) *AWSCodeCommitClient_ListRepositoriesWithContext_Call {
   353  	_c.Call.Run(func(args mock.Arguments) {
   354  		var arg0 aws.Context
   355  		if args[0] != nil {
   356  			arg0 = args[0].(aws.Context)
   357  		}
   358  		var arg1 *codecommit.ListRepositoriesInput
   359  		if args[1] != nil {
   360  			arg1 = args[1].(*codecommit.ListRepositoriesInput)
   361  		}
   362  		var arg2 []request.Option
   363  		variadicArgs := make([]request.Option, len(args)-2)
   364  		for i, a := range args[2:] {
   365  			if a != nil {
   366  				variadicArgs[i] = a.(request.Option)
   367  			}
   368  		}
   369  		arg2 = variadicArgs
   370  		run(
   371  			arg0,
   372  			arg1,
   373  			arg2...,
   374  		)
   375  	})
   376  	return _c
   377  }
   378  
   379  func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) Return(listRepositoriesOutput *codecommit.ListRepositoriesOutput, err error) *AWSCodeCommitClient_ListRepositoriesWithContext_Call {
   380  	_c.Call.Return(listRepositoriesOutput, err)
   381  	return _c
   382  }
   383  
   384  func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) RunAndReturn(run func(v aws.Context, listRepositoriesInput *codecommit.ListRepositoriesInput, options ...request.Option) (*codecommit.ListRepositoriesOutput, error)) *AWSCodeCommitClient_ListRepositoriesWithContext_Call {
   385  	_c.Call.Return(run)
   386  	return _c
   387  }