github.com/orange-cloudfoundry/cli@v7.1.0+incompatible/command/v6/v6fakes/fake_v3zero_downtime_restart_actor.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v6fakes 3 4 import ( 5 "sync" 6 7 "code.cloudfoundry.org/cli/actor/v3action" 8 v6 "code.cloudfoundry.org/cli/command/v6" 9 ) 10 11 type FakeV3ZeroDowntimeRestartActor struct { 12 CloudControllerAPIVersionStub func() string 13 cloudControllerAPIVersionMutex sync.RWMutex 14 cloudControllerAPIVersionArgsForCall []struct { 15 } 16 cloudControllerAPIVersionReturns struct { 17 result1 string 18 } 19 cloudControllerAPIVersionReturnsOnCall map[int]struct { 20 result1 string 21 } 22 CreateDeploymentStub func(string, string) (string, v3action.Warnings, error) 23 createDeploymentMutex sync.RWMutex 24 createDeploymentArgsForCall []struct { 25 arg1 string 26 arg2 string 27 } 28 createDeploymentReturns struct { 29 result1 string 30 result2 v3action.Warnings 31 result3 error 32 } 33 createDeploymentReturnsOnCall map[int]struct { 34 result1 string 35 result2 v3action.Warnings 36 result3 error 37 } 38 GetApplicationByNameAndSpaceStub func(string, string) (v3action.Application, v3action.Warnings, error) 39 getApplicationByNameAndSpaceMutex sync.RWMutex 40 getApplicationByNameAndSpaceArgsForCall []struct { 41 arg1 string 42 arg2 string 43 } 44 getApplicationByNameAndSpaceReturns struct { 45 result1 v3action.Application 46 result2 v3action.Warnings 47 result3 error 48 } 49 getApplicationByNameAndSpaceReturnsOnCall map[int]struct { 50 result1 v3action.Application 51 result2 v3action.Warnings 52 result3 error 53 } 54 StartApplicationStub func(string) (v3action.Warnings, error) 55 startApplicationMutex sync.RWMutex 56 startApplicationArgsForCall []struct { 57 arg1 string 58 } 59 startApplicationReturns struct { 60 result1 v3action.Warnings 61 result2 error 62 } 63 startApplicationReturnsOnCall map[int]struct { 64 result1 v3action.Warnings 65 result2 error 66 } 67 ZeroDowntimePollStartStub func(string, chan<- v3action.Warnings) error 68 zeroDowntimePollStartMutex sync.RWMutex 69 zeroDowntimePollStartArgsForCall []struct { 70 arg1 string 71 arg2 chan<- v3action.Warnings 72 } 73 zeroDowntimePollStartReturns struct { 74 result1 error 75 } 76 zeroDowntimePollStartReturnsOnCall map[int]struct { 77 result1 error 78 } 79 invocations map[string][][]interface{} 80 invocationsMutex sync.RWMutex 81 } 82 83 func (fake *FakeV3ZeroDowntimeRestartActor) CloudControllerAPIVersion() string { 84 fake.cloudControllerAPIVersionMutex.Lock() 85 ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)] 86 fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct { 87 }{}) 88 fake.recordInvocation("CloudControllerAPIVersion", []interface{}{}) 89 fake.cloudControllerAPIVersionMutex.Unlock() 90 if fake.CloudControllerAPIVersionStub != nil { 91 return fake.CloudControllerAPIVersionStub() 92 } 93 if specificReturn { 94 return ret.result1 95 } 96 fakeReturns := fake.cloudControllerAPIVersionReturns 97 return fakeReturns.result1 98 } 99 100 func (fake *FakeV3ZeroDowntimeRestartActor) CloudControllerAPIVersionCallCount() int { 101 fake.cloudControllerAPIVersionMutex.RLock() 102 defer fake.cloudControllerAPIVersionMutex.RUnlock() 103 return len(fake.cloudControllerAPIVersionArgsForCall) 104 } 105 106 func (fake *FakeV3ZeroDowntimeRestartActor) CloudControllerAPIVersionCalls(stub func() string) { 107 fake.cloudControllerAPIVersionMutex.Lock() 108 defer fake.cloudControllerAPIVersionMutex.Unlock() 109 fake.CloudControllerAPIVersionStub = stub 110 } 111 112 func (fake *FakeV3ZeroDowntimeRestartActor) CloudControllerAPIVersionReturns(result1 string) { 113 fake.cloudControllerAPIVersionMutex.Lock() 114 defer fake.cloudControllerAPIVersionMutex.Unlock() 115 fake.CloudControllerAPIVersionStub = nil 116 fake.cloudControllerAPIVersionReturns = struct { 117 result1 string 118 }{result1} 119 } 120 121 func (fake *FakeV3ZeroDowntimeRestartActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) { 122 fake.cloudControllerAPIVersionMutex.Lock() 123 defer fake.cloudControllerAPIVersionMutex.Unlock() 124 fake.CloudControllerAPIVersionStub = nil 125 if fake.cloudControllerAPIVersionReturnsOnCall == nil { 126 fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct { 127 result1 string 128 }) 129 } 130 fake.cloudControllerAPIVersionReturnsOnCall[i] = struct { 131 result1 string 132 }{result1} 133 } 134 135 func (fake *FakeV3ZeroDowntimeRestartActor) CreateDeployment(arg1 string, arg2 string) (string, v3action.Warnings, error) { 136 fake.createDeploymentMutex.Lock() 137 ret, specificReturn := fake.createDeploymentReturnsOnCall[len(fake.createDeploymentArgsForCall)] 138 fake.createDeploymentArgsForCall = append(fake.createDeploymentArgsForCall, struct { 139 arg1 string 140 arg2 string 141 }{arg1, arg2}) 142 fake.recordInvocation("CreateDeployment", []interface{}{arg1, arg2}) 143 fake.createDeploymentMutex.Unlock() 144 if fake.CreateDeploymentStub != nil { 145 return fake.CreateDeploymentStub(arg1, arg2) 146 } 147 if specificReturn { 148 return ret.result1, ret.result2, ret.result3 149 } 150 fakeReturns := fake.createDeploymentReturns 151 return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 152 } 153 154 func (fake *FakeV3ZeroDowntimeRestartActor) CreateDeploymentCallCount() int { 155 fake.createDeploymentMutex.RLock() 156 defer fake.createDeploymentMutex.RUnlock() 157 return len(fake.createDeploymentArgsForCall) 158 } 159 160 func (fake *FakeV3ZeroDowntimeRestartActor) CreateDeploymentCalls(stub func(string, string) (string, v3action.Warnings, error)) { 161 fake.createDeploymentMutex.Lock() 162 defer fake.createDeploymentMutex.Unlock() 163 fake.CreateDeploymentStub = stub 164 } 165 166 func (fake *FakeV3ZeroDowntimeRestartActor) CreateDeploymentArgsForCall(i int) (string, string) { 167 fake.createDeploymentMutex.RLock() 168 defer fake.createDeploymentMutex.RUnlock() 169 argsForCall := fake.createDeploymentArgsForCall[i] 170 return argsForCall.arg1, argsForCall.arg2 171 } 172 173 func (fake *FakeV3ZeroDowntimeRestartActor) CreateDeploymentReturns(result1 string, result2 v3action.Warnings, result3 error) { 174 fake.createDeploymentMutex.Lock() 175 defer fake.createDeploymentMutex.Unlock() 176 fake.CreateDeploymentStub = nil 177 fake.createDeploymentReturns = struct { 178 result1 string 179 result2 v3action.Warnings 180 result3 error 181 }{result1, result2, result3} 182 } 183 184 func (fake *FakeV3ZeroDowntimeRestartActor) CreateDeploymentReturnsOnCall(i int, result1 string, result2 v3action.Warnings, result3 error) { 185 fake.createDeploymentMutex.Lock() 186 defer fake.createDeploymentMutex.Unlock() 187 fake.CreateDeploymentStub = nil 188 if fake.createDeploymentReturnsOnCall == nil { 189 fake.createDeploymentReturnsOnCall = make(map[int]struct { 190 result1 string 191 result2 v3action.Warnings 192 result3 error 193 }) 194 } 195 fake.createDeploymentReturnsOnCall[i] = struct { 196 result1 string 197 result2 v3action.Warnings 198 result3 error 199 }{result1, result2, result3} 200 } 201 202 func (fake *FakeV3ZeroDowntimeRestartActor) GetApplicationByNameAndSpace(arg1 string, arg2 string) (v3action.Application, v3action.Warnings, error) { 203 fake.getApplicationByNameAndSpaceMutex.Lock() 204 ret, specificReturn := fake.getApplicationByNameAndSpaceReturnsOnCall[len(fake.getApplicationByNameAndSpaceArgsForCall)] 205 fake.getApplicationByNameAndSpaceArgsForCall = append(fake.getApplicationByNameAndSpaceArgsForCall, struct { 206 arg1 string 207 arg2 string 208 }{arg1, arg2}) 209 fake.recordInvocation("GetApplicationByNameAndSpace", []interface{}{arg1, arg2}) 210 fake.getApplicationByNameAndSpaceMutex.Unlock() 211 if fake.GetApplicationByNameAndSpaceStub != nil { 212 return fake.GetApplicationByNameAndSpaceStub(arg1, arg2) 213 } 214 if specificReturn { 215 return ret.result1, ret.result2, ret.result3 216 } 217 fakeReturns := fake.getApplicationByNameAndSpaceReturns 218 return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 219 } 220 221 func (fake *FakeV3ZeroDowntimeRestartActor) GetApplicationByNameAndSpaceCallCount() int { 222 fake.getApplicationByNameAndSpaceMutex.RLock() 223 defer fake.getApplicationByNameAndSpaceMutex.RUnlock() 224 return len(fake.getApplicationByNameAndSpaceArgsForCall) 225 } 226 227 func (fake *FakeV3ZeroDowntimeRestartActor) GetApplicationByNameAndSpaceCalls(stub func(string, string) (v3action.Application, v3action.Warnings, error)) { 228 fake.getApplicationByNameAndSpaceMutex.Lock() 229 defer fake.getApplicationByNameAndSpaceMutex.Unlock() 230 fake.GetApplicationByNameAndSpaceStub = stub 231 } 232 233 func (fake *FakeV3ZeroDowntimeRestartActor) GetApplicationByNameAndSpaceArgsForCall(i int) (string, string) { 234 fake.getApplicationByNameAndSpaceMutex.RLock() 235 defer fake.getApplicationByNameAndSpaceMutex.RUnlock() 236 argsForCall := fake.getApplicationByNameAndSpaceArgsForCall[i] 237 return argsForCall.arg1, argsForCall.arg2 238 } 239 240 func (fake *FakeV3ZeroDowntimeRestartActor) GetApplicationByNameAndSpaceReturns(result1 v3action.Application, result2 v3action.Warnings, result3 error) { 241 fake.getApplicationByNameAndSpaceMutex.Lock() 242 defer fake.getApplicationByNameAndSpaceMutex.Unlock() 243 fake.GetApplicationByNameAndSpaceStub = nil 244 fake.getApplicationByNameAndSpaceReturns = struct { 245 result1 v3action.Application 246 result2 v3action.Warnings 247 result3 error 248 }{result1, result2, result3} 249 } 250 251 func (fake *FakeV3ZeroDowntimeRestartActor) GetApplicationByNameAndSpaceReturnsOnCall(i int, result1 v3action.Application, result2 v3action.Warnings, result3 error) { 252 fake.getApplicationByNameAndSpaceMutex.Lock() 253 defer fake.getApplicationByNameAndSpaceMutex.Unlock() 254 fake.GetApplicationByNameAndSpaceStub = nil 255 if fake.getApplicationByNameAndSpaceReturnsOnCall == nil { 256 fake.getApplicationByNameAndSpaceReturnsOnCall = make(map[int]struct { 257 result1 v3action.Application 258 result2 v3action.Warnings 259 result3 error 260 }) 261 } 262 fake.getApplicationByNameAndSpaceReturnsOnCall[i] = struct { 263 result1 v3action.Application 264 result2 v3action.Warnings 265 result3 error 266 }{result1, result2, result3} 267 } 268 269 func (fake *FakeV3ZeroDowntimeRestartActor) StartApplication(arg1 string) (v3action.Warnings, error) { 270 fake.startApplicationMutex.Lock() 271 ret, specificReturn := fake.startApplicationReturnsOnCall[len(fake.startApplicationArgsForCall)] 272 fake.startApplicationArgsForCall = append(fake.startApplicationArgsForCall, struct { 273 arg1 string 274 }{arg1}) 275 fake.recordInvocation("StartApplication", []interface{}{arg1}) 276 fake.startApplicationMutex.Unlock() 277 if fake.StartApplicationStub != nil { 278 return fake.StartApplicationStub(arg1) 279 } 280 if specificReturn { 281 return ret.result1, ret.result2 282 } 283 fakeReturns := fake.startApplicationReturns 284 return fakeReturns.result1, fakeReturns.result2 285 } 286 287 func (fake *FakeV3ZeroDowntimeRestartActor) StartApplicationCallCount() int { 288 fake.startApplicationMutex.RLock() 289 defer fake.startApplicationMutex.RUnlock() 290 return len(fake.startApplicationArgsForCall) 291 } 292 293 func (fake *FakeV3ZeroDowntimeRestartActor) StartApplicationCalls(stub func(string) (v3action.Warnings, error)) { 294 fake.startApplicationMutex.Lock() 295 defer fake.startApplicationMutex.Unlock() 296 fake.StartApplicationStub = stub 297 } 298 299 func (fake *FakeV3ZeroDowntimeRestartActor) StartApplicationArgsForCall(i int) string { 300 fake.startApplicationMutex.RLock() 301 defer fake.startApplicationMutex.RUnlock() 302 argsForCall := fake.startApplicationArgsForCall[i] 303 return argsForCall.arg1 304 } 305 306 func (fake *FakeV3ZeroDowntimeRestartActor) StartApplicationReturns(result1 v3action.Warnings, result2 error) { 307 fake.startApplicationMutex.Lock() 308 defer fake.startApplicationMutex.Unlock() 309 fake.StartApplicationStub = nil 310 fake.startApplicationReturns = struct { 311 result1 v3action.Warnings 312 result2 error 313 }{result1, result2} 314 } 315 316 func (fake *FakeV3ZeroDowntimeRestartActor) StartApplicationReturnsOnCall(i int, result1 v3action.Warnings, result2 error) { 317 fake.startApplicationMutex.Lock() 318 defer fake.startApplicationMutex.Unlock() 319 fake.StartApplicationStub = nil 320 if fake.startApplicationReturnsOnCall == nil { 321 fake.startApplicationReturnsOnCall = make(map[int]struct { 322 result1 v3action.Warnings 323 result2 error 324 }) 325 } 326 fake.startApplicationReturnsOnCall[i] = struct { 327 result1 v3action.Warnings 328 result2 error 329 }{result1, result2} 330 } 331 332 func (fake *FakeV3ZeroDowntimeRestartActor) ZeroDowntimePollStart(arg1 string, arg2 chan<- v3action.Warnings) error { 333 fake.zeroDowntimePollStartMutex.Lock() 334 ret, specificReturn := fake.zeroDowntimePollStartReturnsOnCall[len(fake.zeroDowntimePollStartArgsForCall)] 335 fake.zeroDowntimePollStartArgsForCall = append(fake.zeroDowntimePollStartArgsForCall, struct { 336 arg1 string 337 arg2 chan<- v3action.Warnings 338 }{arg1, arg2}) 339 fake.recordInvocation("ZeroDowntimePollStart", []interface{}{arg1, arg2}) 340 fake.zeroDowntimePollStartMutex.Unlock() 341 if fake.ZeroDowntimePollStartStub != nil { 342 return fake.ZeroDowntimePollStartStub(arg1, arg2) 343 } 344 if specificReturn { 345 return ret.result1 346 } 347 fakeReturns := fake.zeroDowntimePollStartReturns 348 return fakeReturns.result1 349 } 350 351 func (fake *FakeV3ZeroDowntimeRestartActor) ZeroDowntimePollStartCallCount() int { 352 fake.zeroDowntimePollStartMutex.RLock() 353 defer fake.zeroDowntimePollStartMutex.RUnlock() 354 return len(fake.zeroDowntimePollStartArgsForCall) 355 } 356 357 func (fake *FakeV3ZeroDowntimeRestartActor) ZeroDowntimePollStartCalls(stub func(string, chan<- v3action.Warnings) error) { 358 fake.zeroDowntimePollStartMutex.Lock() 359 defer fake.zeroDowntimePollStartMutex.Unlock() 360 fake.ZeroDowntimePollStartStub = stub 361 } 362 363 func (fake *FakeV3ZeroDowntimeRestartActor) ZeroDowntimePollStartArgsForCall(i int) (string, chan<- v3action.Warnings) { 364 fake.zeroDowntimePollStartMutex.RLock() 365 defer fake.zeroDowntimePollStartMutex.RUnlock() 366 argsForCall := fake.zeroDowntimePollStartArgsForCall[i] 367 return argsForCall.arg1, argsForCall.arg2 368 } 369 370 func (fake *FakeV3ZeroDowntimeRestartActor) ZeroDowntimePollStartReturns(result1 error) { 371 fake.zeroDowntimePollStartMutex.Lock() 372 defer fake.zeroDowntimePollStartMutex.Unlock() 373 fake.ZeroDowntimePollStartStub = nil 374 fake.zeroDowntimePollStartReturns = struct { 375 result1 error 376 }{result1} 377 } 378 379 func (fake *FakeV3ZeroDowntimeRestartActor) ZeroDowntimePollStartReturnsOnCall(i int, result1 error) { 380 fake.zeroDowntimePollStartMutex.Lock() 381 defer fake.zeroDowntimePollStartMutex.Unlock() 382 fake.ZeroDowntimePollStartStub = nil 383 if fake.zeroDowntimePollStartReturnsOnCall == nil { 384 fake.zeroDowntimePollStartReturnsOnCall = make(map[int]struct { 385 result1 error 386 }) 387 } 388 fake.zeroDowntimePollStartReturnsOnCall[i] = struct { 389 result1 error 390 }{result1} 391 } 392 393 func (fake *FakeV3ZeroDowntimeRestartActor) Invocations() map[string][][]interface{} { 394 fake.invocationsMutex.RLock() 395 defer fake.invocationsMutex.RUnlock() 396 fake.cloudControllerAPIVersionMutex.RLock() 397 defer fake.cloudControllerAPIVersionMutex.RUnlock() 398 fake.createDeploymentMutex.RLock() 399 defer fake.createDeploymentMutex.RUnlock() 400 fake.getApplicationByNameAndSpaceMutex.RLock() 401 defer fake.getApplicationByNameAndSpaceMutex.RUnlock() 402 fake.startApplicationMutex.RLock() 403 defer fake.startApplicationMutex.RUnlock() 404 fake.zeroDowntimePollStartMutex.RLock() 405 defer fake.zeroDowntimePollStartMutex.RUnlock() 406 copiedInvocations := map[string][][]interface{}{} 407 for key, value := range fake.invocations { 408 copiedInvocations[key] = value 409 } 410 return copiedInvocations 411 } 412 413 func (fake *FakeV3ZeroDowntimeRestartActor) recordInvocation(key string, args []interface{}) { 414 fake.invocationsMutex.Lock() 415 defer fake.invocationsMutex.Unlock() 416 if fake.invocations == nil { 417 fake.invocations = map[string][][]interface{}{} 418 } 419 if fake.invocations[key] == nil { 420 fake.invocations[key] = [][]interface{}{} 421 } 422 fake.invocations[key] = append(fake.invocations[key], args) 423 } 424 425 var _ v6.V3ZeroDowntimeRestartActor = new(FakeV3ZeroDowntimeRestartActor)