github.com/argoproj/argo-cd/v2@v2.10.9/applicationset/services/scm_provider/aws_codecommit/mocks/AWSCodeCommitClient.go (about) 1 // Code generated by mockery v2.26.1. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 context "context" 7 8 codecommit "github.com/aws/aws-sdk-go/service/codecommit" 9 10 mock "github.com/stretchr/testify/mock" 11 12 request "github.com/aws/aws-sdk-go/aws/request" 13 ) 14 15 // AWSCodeCommitClient is an autogenerated mock type for the AWSCodeCommitClient type 16 type AWSCodeCommitClient struct { 17 mock.Mock 18 } 19 20 type AWSCodeCommitClient_Expecter struct { 21 mock *mock.Mock 22 } 23 24 func (_m *AWSCodeCommitClient) EXPECT() *AWSCodeCommitClient_Expecter { 25 return &AWSCodeCommitClient_Expecter{mock: &_m.Mock} 26 } 27 28 // GetFolderWithContext provides a mock function with given fields: _a0, _a1, _a2 29 func (_m *AWSCodeCommitClient) GetFolderWithContext(_a0 context.Context, _a1 *codecommit.GetFolderInput, _a2 ...request.Option) (*codecommit.GetFolderOutput, error) { 30 _va := make([]interface{}, len(_a2)) 31 for _i := range _a2 { 32 _va[_i] = _a2[_i] 33 } 34 var _ca []interface{} 35 _ca = append(_ca, _a0, _a1) 36 _ca = append(_ca, _va...) 37 ret := _m.Called(_ca...) 38 39 var r0 *codecommit.GetFolderOutput 40 var r1 error 41 if rf, ok := ret.Get(0).(func(context.Context, *codecommit.GetFolderInput, ...request.Option) (*codecommit.GetFolderOutput, error)); ok { 42 return rf(_a0, _a1, _a2...) 43 } 44 if rf, ok := ret.Get(0).(func(context.Context, *codecommit.GetFolderInput, ...request.Option) *codecommit.GetFolderOutput); ok { 45 r0 = rf(_a0, _a1, _a2...) 46 } else { 47 if ret.Get(0) != nil { 48 r0 = ret.Get(0).(*codecommit.GetFolderOutput) 49 } 50 } 51 52 if rf, ok := ret.Get(1).(func(context.Context, *codecommit.GetFolderInput, ...request.Option) error); ok { 53 r1 = rf(_a0, _a1, _a2...) 54 } else { 55 r1 = ret.Error(1) 56 } 57 58 return r0, r1 59 } 60 61 // AWSCodeCommitClient_GetFolderWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFolderWithContext' 62 type AWSCodeCommitClient_GetFolderWithContext_Call struct { 63 *mock.Call 64 } 65 66 // GetFolderWithContext is a helper method to define mock.On call 67 // - _a0 context.Context 68 // - _a1 *codecommit.GetFolderInput 69 // - _a2 ...request.Option 70 func (_e *AWSCodeCommitClient_Expecter) GetFolderWithContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *AWSCodeCommitClient_GetFolderWithContext_Call { 71 return &AWSCodeCommitClient_GetFolderWithContext_Call{Call: _e.mock.On("GetFolderWithContext", 72 append([]interface{}{_a0, _a1}, _a2...)...)} 73 } 74 75 func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) Run(run func(_a0 context.Context, _a1 *codecommit.GetFolderInput, _a2 ...request.Option)) *AWSCodeCommitClient_GetFolderWithContext_Call { 76 _c.Call.Run(func(args mock.Arguments) { 77 variadicArgs := make([]request.Option, len(args)-2) 78 for i, a := range args[2:] { 79 if a != nil { 80 variadicArgs[i] = a.(request.Option) 81 } 82 } 83 run(args[0].(context.Context), args[1].(*codecommit.GetFolderInput), variadicArgs...) 84 }) 85 return _c 86 } 87 88 func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) Return(_a0 *codecommit.GetFolderOutput, _a1 error) *AWSCodeCommitClient_GetFolderWithContext_Call { 89 _c.Call.Return(_a0, _a1) 90 return _c 91 } 92 93 func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) RunAndReturn(run func(context.Context, *codecommit.GetFolderInput, ...request.Option) (*codecommit.GetFolderOutput, error)) *AWSCodeCommitClient_GetFolderWithContext_Call { 94 _c.Call.Return(run) 95 return _c 96 } 97 98 // GetRepositoryWithContext provides a mock function with given fields: _a0, _a1, _a2 99 func (_m *AWSCodeCommitClient) GetRepositoryWithContext(_a0 context.Context, _a1 *codecommit.GetRepositoryInput, _a2 ...request.Option) (*codecommit.GetRepositoryOutput, error) { 100 _va := make([]interface{}, len(_a2)) 101 for _i := range _a2 { 102 _va[_i] = _a2[_i] 103 } 104 var _ca []interface{} 105 _ca = append(_ca, _a0, _a1) 106 _ca = append(_ca, _va...) 107 ret := _m.Called(_ca...) 108 109 var r0 *codecommit.GetRepositoryOutput 110 var r1 error 111 if rf, ok := ret.Get(0).(func(context.Context, *codecommit.GetRepositoryInput, ...request.Option) (*codecommit.GetRepositoryOutput, error)); ok { 112 return rf(_a0, _a1, _a2...) 113 } 114 if rf, ok := ret.Get(0).(func(context.Context, *codecommit.GetRepositoryInput, ...request.Option) *codecommit.GetRepositoryOutput); ok { 115 r0 = rf(_a0, _a1, _a2...) 116 } else { 117 if ret.Get(0) != nil { 118 r0 = ret.Get(0).(*codecommit.GetRepositoryOutput) 119 } 120 } 121 122 if rf, ok := ret.Get(1).(func(context.Context, *codecommit.GetRepositoryInput, ...request.Option) error); ok { 123 r1 = rf(_a0, _a1, _a2...) 124 } else { 125 r1 = ret.Error(1) 126 } 127 128 return r0, r1 129 } 130 131 // AWSCodeCommitClient_GetRepositoryWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepositoryWithContext' 132 type AWSCodeCommitClient_GetRepositoryWithContext_Call struct { 133 *mock.Call 134 } 135 136 // GetRepositoryWithContext is a helper method to define mock.On call 137 // - _a0 context.Context 138 // - _a1 *codecommit.GetRepositoryInput 139 // - _a2 ...request.Option 140 func (_e *AWSCodeCommitClient_Expecter) GetRepositoryWithContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *AWSCodeCommitClient_GetRepositoryWithContext_Call { 141 return &AWSCodeCommitClient_GetRepositoryWithContext_Call{Call: _e.mock.On("GetRepositoryWithContext", 142 append([]interface{}{_a0, _a1}, _a2...)...)} 143 } 144 145 func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) Run(run func(_a0 context.Context, _a1 *codecommit.GetRepositoryInput, _a2 ...request.Option)) *AWSCodeCommitClient_GetRepositoryWithContext_Call { 146 _c.Call.Run(func(args mock.Arguments) { 147 variadicArgs := make([]request.Option, len(args)-2) 148 for i, a := range args[2:] { 149 if a != nil { 150 variadicArgs[i] = a.(request.Option) 151 } 152 } 153 run(args[0].(context.Context), args[1].(*codecommit.GetRepositoryInput), variadicArgs...) 154 }) 155 return _c 156 } 157 158 func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) Return(_a0 *codecommit.GetRepositoryOutput, _a1 error) *AWSCodeCommitClient_GetRepositoryWithContext_Call { 159 _c.Call.Return(_a0, _a1) 160 return _c 161 } 162 163 func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) RunAndReturn(run func(context.Context, *codecommit.GetRepositoryInput, ...request.Option) (*codecommit.GetRepositoryOutput, error)) *AWSCodeCommitClient_GetRepositoryWithContext_Call { 164 _c.Call.Return(run) 165 return _c 166 } 167 168 // ListBranchesWithContext provides a mock function with given fields: _a0, _a1, _a2 169 func (_m *AWSCodeCommitClient) ListBranchesWithContext(_a0 context.Context, _a1 *codecommit.ListBranchesInput, _a2 ...request.Option) (*codecommit.ListBranchesOutput, error) { 170 _va := make([]interface{}, len(_a2)) 171 for _i := range _a2 { 172 _va[_i] = _a2[_i] 173 } 174 var _ca []interface{} 175 _ca = append(_ca, _a0, _a1) 176 _ca = append(_ca, _va...) 177 ret := _m.Called(_ca...) 178 179 var r0 *codecommit.ListBranchesOutput 180 var r1 error 181 if rf, ok := ret.Get(0).(func(context.Context, *codecommit.ListBranchesInput, ...request.Option) (*codecommit.ListBranchesOutput, error)); ok { 182 return rf(_a0, _a1, _a2...) 183 } 184 if rf, ok := ret.Get(0).(func(context.Context, *codecommit.ListBranchesInput, ...request.Option) *codecommit.ListBranchesOutput); ok { 185 r0 = rf(_a0, _a1, _a2...) 186 } else { 187 if ret.Get(0) != nil { 188 r0 = ret.Get(0).(*codecommit.ListBranchesOutput) 189 } 190 } 191 192 if rf, ok := ret.Get(1).(func(context.Context, *codecommit.ListBranchesInput, ...request.Option) error); ok { 193 r1 = rf(_a0, _a1, _a2...) 194 } else { 195 r1 = ret.Error(1) 196 } 197 198 return r0, r1 199 } 200 201 // AWSCodeCommitClient_ListBranchesWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBranchesWithContext' 202 type AWSCodeCommitClient_ListBranchesWithContext_Call struct { 203 *mock.Call 204 } 205 206 // ListBranchesWithContext is a helper method to define mock.On call 207 // - _a0 context.Context 208 // - _a1 *codecommit.ListBranchesInput 209 // - _a2 ...request.Option 210 func (_e *AWSCodeCommitClient_Expecter) ListBranchesWithContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *AWSCodeCommitClient_ListBranchesWithContext_Call { 211 return &AWSCodeCommitClient_ListBranchesWithContext_Call{Call: _e.mock.On("ListBranchesWithContext", 212 append([]interface{}{_a0, _a1}, _a2...)...)} 213 } 214 215 func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) Run(run func(_a0 context.Context, _a1 *codecommit.ListBranchesInput, _a2 ...request.Option)) *AWSCodeCommitClient_ListBranchesWithContext_Call { 216 _c.Call.Run(func(args mock.Arguments) { 217 variadicArgs := make([]request.Option, len(args)-2) 218 for i, a := range args[2:] { 219 if a != nil { 220 variadicArgs[i] = a.(request.Option) 221 } 222 } 223 run(args[0].(context.Context), args[1].(*codecommit.ListBranchesInput), variadicArgs...) 224 }) 225 return _c 226 } 227 228 func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) Return(_a0 *codecommit.ListBranchesOutput, _a1 error) *AWSCodeCommitClient_ListBranchesWithContext_Call { 229 _c.Call.Return(_a0, _a1) 230 return _c 231 } 232 233 func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) RunAndReturn(run func(context.Context, *codecommit.ListBranchesInput, ...request.Option) (*codecommit.ListBranchesOutput, error)) *AWSCodeCommitClient_ListBranchesWithContext_Call { 234 _c.Call.Return(run) 235 return _c 236 } 237 238 // ListRepositoriesWithContext provides a mock function with given fields: _a0, _a1, _a2 239 func (_m *AWSCodeCommitClient) ListRepositoriesWithContext(_a0 context.Context, _a1 *codecommit.ListRepositoriesInput, _a2 ...request.Option) (*codecommit.ListRepositoriesOutput, error) { 240 _va := make([]interface{}, len(_a2)) 241 for _i := range _a2 { 242 _va[_i] = _a2[_i] 243 } 244 var _ca []interface{} 245 _ca = append(_ca, _a0, _a1) 246 _ca = append(_ca, _va...) 247 ret := _m.Called(_ca...) 248 249 var r0 *codecommit.ListRepositoriesOutput 250 var r1 error 251 if rf, ok := ret.Get(0).(func(context.Context, *codecommit.ListRepositoriesInput, ...request.Option) (*codecommit.ListRepositoriesOutput, error)); ok { 252 return rf(_a0, _a1, _a2...) 253 } 254 if rf, ok := ret.Get(0).(func(context.Context, *codecommit.ListRepositoriesInput, ...request.Option) *codecommit.ListRepositoriesOutput); ok { 255 r0 = rf(_a0, _a1, _a2...) 256 } else { 257 if ret.Get(0) != nil { 258 r0 = ret.Get(0).(*codecommit.ListRepositoriesOutput) 259 } 260 } 261 262 if rf, ok := ret.Get(1).(func(context.Context, *codecommit.ListRepositoriesInput, ...request.Option) error); ok { 263 r1 = rf(_a0, _a1, _a2...) 264 } else { 265 r1 = ret.Error(1) 266 } 267 268 return r0, r1 269 } 270 271 // AWSCodeCommitClient_ListRepositoriesWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRepositoriesWithContext' 272 type AWSCodeCommitClient_ListRepositoriesWithContext_Call struct { 273 *mock.Call 274 } 275 276 // ListRepositoriesWithContext is a helper method to define mock.On call 277 // - _a0 context.Context 278 // - _a1 *codecommit.ListRepositoriesInput 279 // - _a2 ...request.Option 280 func (_e *AWSCodeCommitClient_Expecter) ListRepositoriesWithContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { 281 return &AWSCodeCommitClient_ListRepositoriesWithContext_Call{Call: _e.mock.On("ListRepositoriesWithContext", 282 append([]interface{}{_a0, _a1}, _a2...)...)} 283 } 284 285 func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) Run(run func(_a0 context.Context, _a1 *codecommit.ListRepositoriesInput, _a2 ...request.Option)) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { 286 _c.Call.Run(func(args mock.Arguments) { 287 variadicArgs := make([]request.Option, len(args)-2) 288 for i, a := range args[2:] { 289 if a != nil { 290 variadicArgs[i] = a.(request.Option) 291 } 292 } 293 run(args[0].(context.Context), args[1].(*codecommit.ListRepositoriesInput), variadicArgs...) 294 }) 295 return _c 296 } 297 298 func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) Return(_a0 *codecommit.ListRepositoriesOutput, _a1 error) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { 299 _c.Call.Return(_a0, _a1) 300 return _c 301 } 302 303 func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) RunAndReturn(run func(context.Context, *codecommit.ListRepositoriesInput, ...request.Option) (*codecommit.ListRepositoriesOutput, error)) *AWSCodeCommitClient_ListRepositoriesWithContext_Call { 304 _c.Call.Return(run) 305 return _c 306 } 307 308 type mockConstructorTestingTNewAWSCodeCommitClient interface { 309 mock.TestingT 310 Cleanup(func()) 311 } 312 313 // 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. 314 func NewAWSCodeCommitClient(t mockConstructorTestingTNewAWSCodeCommitClient) *AWSCodeCommitClient { 315 mock := &AWSCodeCommitClient{} 316 mock.Mock.Test(t) 317 318 t.Cleanup(func() { mock.AssertExpectations(t) }) 319 320 return mock 321 }