github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/atc/exec/execfakes/fake_check_delegate.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package execfakes 3 4 import ( 5 "context" 6 "io" 7 "sync" 8 9 "code.cloudfoundry.org/lager" 10 "github.com/pf-qiu/concourse/v6/atc" 11 "github.com/pf-qiu/concourse/v6/atc/db" 12 "github.com/pf-qiu/concourse/v6/atc/db/lock" 13 "github.com/pf-qiu/concourse/v6/atc/exec" 14 "github.com/pf-qiu/concourse/v6/atc/worker" 15 "github.com/pf-qiu/concourse/v6/tracing" 16 "go.opentelemetry.io/otel/api/trace" 17 ) 18 19 type FakeCheckDelegate struct { 20 ErroredStub func(lager.Logger, string) 21 erroredMutex sync.RWMutex 22 erroredArgsForCall []struct { 23 arg1 lager.Logger 24 arg2 string 25 } 26 FetchImageStub func(context.Context, atc.ImageResource, atc.VersionedResourceTypes, bool) (worker.ImageSpec, error) 27 fetchImageMutex sync.RWMutex 28 fetchImageArgsForCall []struct { 29 arg1 context.Context 30 arg2 atc.ImageResource 31 arg3 atc.VersionedResourceTypes 32 arg4 bool 33 } 34 fetchImageReturns struct { 35 result1 worker.ImageSpec 36 result2 error 37 } 38 fetchImageReturnsOnCall map[int]struct { 39 result1 worker.ImageSpec 40 result2 error 41 } 42 FindOrCreateScopeStub func(db.ResourceConfig) (db.ResourceConfigScope, error) 43 findOrCreateScopeMutex sync.RWMutex 44 findOrCreateScopeArgsForCall []struct { 45 arg1 db.ResourceConfig 46 } 47 findOrCreateScopeReturns struct { 48 result1 db.ResourceConfigScope 49 result2 error 50 } 51 findOrCreateScopeReturnsOnCall map[int]struct { 52 result1 db.ResourceConfigScope 53 result2 error 54 } 55 FinishedStub func(lager.Logger, bool) 56 finishedMutex sync.RWMutex 57 finishedArgsForCall []struct { 58 arg1 lager.Logger 59 arg2 bool 60 } 61 InitializingStub func(lager.Logger) 62 initializingMutex sync.RWMutex 63 initializingArgsForCall []struct { 64 arg1 lager.Logger 65 } 66 PointToCheckedConfigStub func(db.ResourceConfigScope) error 67 pointToCheckedConfigMutex sync.RWMutex 68 pointToCheckedConfigArgsForCall []struct { 69 arg1 db.ResourceConfigScope 70 } 71 pointToCheckedConfigReturns struct { 72 result1 error 73 } 74 pointToCheckedConfigReturnsOnCall map[int]struct { 75 result1 error 76 } 77 SelectedWorkerStub func(lager.Logger, string) 78 selectedWorkerMutex sync.RWMutex 79 selectedWorkerArgsForCall []struct { 80 arg1 lager.Logger 81 arg2 string 82 } 83 StartSpanStub func(context.Context, string, tracing.Attrs) (context.Context, trace.Span) 84 startSpanMutex sync.RWMutex 85 startSpanArgsForCall []struct { 86 arg1 context.Context 87 arg2 string 88 arg3 tracing.Attrs 89 } 90 startSpanReturns struct { 91 result1 context.Context 92 result2 trace.Span 93 } 94 startSpanReturnsOnCall map[int]struct { 95 result1 context.Context 96 result2 trace.Span 97 } 98 StartingStub func(lager.Logger) 99 startingMutex sync.RWMutex 100 startingArgsForCall []struct { 101 arg1 lager.Logger 102 } 103 StderrStub func() io.Writer 104 stderrMutex sync.RWMutex 105 stderrArgsForCall []struct { 106 } 107 stderrReturns struct { 108 result1 io.Writer 109 } 110 stderrReturnsOnCall map[int]struct { 111 result1 io.Writer 112 } 113 StdoutStub func() io.Writer 114 stdoutMutex sync.RWMutex 115 stdoutArgsForCall []struct { 116 } 117 stdoutReturns struct { 118 result1 io.Writer 119 } 120 stdoutReturnsOnCall map[int]struct { 121 result1 io.Writer 122 } 123 WaitToRunStub func(context.Context, db.ResourceConfigScope) (lock.Lock, bool, error) 124 waitToRunMutex sync.RWMutex 125 waitToRunArgsForCall []struct { 126 arg1 context.Context 127 arg2 db.ResourceConfigScope 128 } 129 waitToRunReturns struct { 130 result1 lock.Lock 131 result2 bool 132 result3 error 133 } 134 waitToRunReturnsOnCall map[int]struct { 135 result1 lock.Lock 136 result2 bool 137 result3 error 138 } 139 invocations map[string][][]interface{} 140 invocationsMutex sync.RWMutex 141 } 142 143 func (fake *FakeCheckDelegate) Errored(arg1 lager.Logger, arg2 string) { 144 fake.erroredMutex.Lock() 145 fake.erroredArgsForCall = append(fake.erroredArgsForCall, struct { 146 arg1 lager.Logger 147 arg2 string 148 }{arg1, arg2}) 149 fake.recordInvocation("Errored", []interface{}{arg1, arg2}) 150 fake.erroredMutex.Unlock() 151 if fake.ErroredStub != nil { 152 fake.ErroredStub(arg1, arg2) 153 } 154 } 155 156 func (fake *FakeCheckDelegate) ErroredCallCount() int { 157 fake.erroredMutex.RLock() 158 defer fake.erroredMutex.RUnlock() 159 return len(fake.erroredArgsForCall) 160 } 161 162 func (fake *FakeCheckDelegate) ErroredCalls(stub func(lager.Logger, string)) { 163 fake.erroredMutex.Lock() 164 defer fake.erroredMutex.Unlock() 165 fake.ErroredStub = stub 166 } 167 168 func (fake *FakeCheckDelegate) ErroredArgsForCall(i int) (lager.Logger, string) { 169 fake.erroredMutex.RLock() 170 defer fake.erroredMutex.RUnlock() 171 argsForCall := fake.erroredArgsForCall[i] 172 return argsForCall.arg1, argsForCall.arg2 173 } 174 175 func (fake *FakeCheckDelegate) FetchImage(arg1 context.Context, arg2 atc.ImageResource, arg3 atc.VersionedResourceTypes, arg4 bool) (worker.ImageSpec, error) { 176 fake.fetchImageMutex.Lock() 177 ret, specificReturn := fake.fetchImageReturnsOnCall[len(fake.fetchImageArgsForCall)] 178 fake.fetchImageArgsForCall = append(fake.fetchImageArgsForCall, struct { 179 arg1 context.Context 180 arg2 atc.ImageResource 181 arg3 atc.VersionedResourceTypes 182 arg4 bool 183 }{arg1, arg2, arg3, arg4}) 184 fake.recordInvocation("FetchImage", []interface{}{arg1, arg2, arg3, arg4}) 185 fake.fetchImageMutex.Unlock() 186 if fake.FetchImageStub != nil { 187 return fake.FetchImageStub(arg1, arg2, arg3, arg4) 188 } 189 if specificReturn { 190 return ret.result1, ret.result2 191 } 192 fakeReturns := fake.fetchImageReturns 193 return fakeReturns.result1, fakeReturns.result2 194 } 195 196 func (fake *FakeCheckDelegate) FetchImageCallCount() int { 197 fake.fetchImageMutex.RLock() 198 defer fake.fetchImageMutex.RUnlock() 199 return len(fake.fetchImageArgsForCall) 200 } 201 202 func (fake *FakeCheckDelegate) FetchImageCalls(stub func(context.Context, atc.ImageResource, atc.VersionedResourceTypes, bool) (worker.ImageSpec, error)) { 203 fake.fetchImageMutex.Lock() 204 defer fake.fetchImageMutex.Unlock() 205 fake.FetchImageStub = stub 206 } 207 208 func (fake *FakeCheckDelegate) FetchImageArgsForCall(i int) (context.Context, atc.ImageResource, atc.VersionedResourceTypes, bool) { 209 fake.fetchImageMutex.RLock() 210 defer fake.fetchImageMutex.RUnlock() 211 argsForCall := fake.fetchImageArgsForCall[i] 212 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 213 } 214 215 func (fake *FakeCheckDelegate) FetchImageReturns(result1 worker.ImageSpec, result2 error) { 216 fake.fetchImageMutex.Lock() 217 defer fake.fetchImageMutex.Unlock() 218 fake.FetchImageStub = nil 219 fake.fetchImageReturns = struct { 220 result1 worker.ImageSpec 221 result2 error 222 }{result1, result2} 223 } 224 225 func (fake *FakeCheckDelegate) FetchImageReturnsOnCall(i int, result1 worker.ImageSpec, result2 error) { 226 fake.fetchImageMutex.Lock() 227 defer fake.fetchImageMutex.Unlock() 228 fake.FetchImageStub = nil 229 if fake.fetchImageReturnsOnCall == nil { 230 fake.fetchImageReturnsOnCall = make(map[int]struct { 231 result1 worker.ImageSpec 232 result2 error 233 }) 234 } 235 fake.fetchImageReturnsOnCall[i] = struct { 236 result1 worker.ImageSpec 237 result2 error 238 }{result1, result2} 239 } 240 241 func (fake *FakeCheckDelegate) FindOrCreateScope(arg1 db.ResourceConfig) (db.ResourceConfigScope, error) { 242 fake.findOrCreateScopeMutex.Lock() 243 ret, specificReturn := fake.findOrCreateScopeReturnsOnCall[len(fake.findOrCreateScopeArgsForCall)] 244 fake.findOrCreateScopeArgsForCall = append(fake.findOrCreateScopeArgsForCall, struct { 245 arg1 db.ResourceConfig 246 }{arg1}) 247 fake.recordInvocation("FindOrCreateScope", []interface{}{arg1}) 248 fake.findOrCreateScopeMutex.Unlock() 249 if fake.FindOrCreateScopeStub != nil { 250 return fake.FindOrCreateScopeStub(arg1) 251 } 252 if specificReturn { 253 return ret.result1, ret.result2 254 } 255 fakeReturns := fake.findOrCreateScopeReturns 256 return fakeReturns.result1, fakeReturns.result2 257 } 258 259 func (fake *FakeCheckDelegate) FindOrCreateScopeCallCount() int { 260 fake.findOrCreateScopeMutex.RLock() 261 defer fake.findOrCreateScopeMutex.RUnlock() 262 return len(fake.findOrCreateScopeArgsForCall) 263 } 264 265 func (fake *FakeCheckDelegate) FindOrCreateScopeCalls(stub func(db.ResourceConfig) (db.ResourceConfigScope, error)) { 266 fake.findOrCreateScopeMutex.Lock() 267 defer fake.findOrCreateScopeMutex.Unlock() 268 fake.FindOrCreateScopeStub = stub 269 } 270 271 func (fake *FakeCheckDelegate) FindOrCreateScopeArgsForCall(i int) db.ResourceConfig { 272 fake.findOrCreateScopeMutex.RLock() 273 defer fake.findOrCreateScopeMutex.RUnlock() 274 argsForCall := fake.findOrCreateScopeArgsForCall[i] 275 return argsForCall.arg1 276 } 277 278 func (fake *FakeCheckDelegate) FindOrCreateScopeReturns(result1 db.ResourceConfigScope, result2 error) { 279 fake.findOrCreateScopeMutex.Lock() 280 defer fake.findOrCreateScopeMutex.Unlock() 281 fake.FindOrCreateScopeStub = nil 282 fake.findOrCreateScopeReturns = struct { 283 result1 db.ResourceConfigScope 284 result2 error 285 }{result1, result2} 286 } 287 288 func (fake *FakeCheckDelegate) FindOrCreateScopeReturnsOnCall(i int, result1 db.ResourceConfigScope, result2 error) { 289 fake.findOrCreateScopeMutex.Lock() 290 defer fake.findOrCreateScopeMutex.Unlock() 291 fake.FindOrCreateScopeStub = nil 292 if fake.findOrCreateScopeReturnsOnCall == nil { 293 fake.findOrCreateScopeReturnsOnCall = make(map[int]struct { 294 result1 db.ResourceConfigScope 295 result2 error 296 }) 297 } 298 fake.findOrCreateScopeReturnsOnCall[i] = struct { 299 result1 db.ResourceConfigScope 300 result2 error 301 }{result1, result2} 302 } 303 304 func (fake *FakeCheckDelegate) Finished(arg1 lager.Logger, arg2 bool) { 305 fake.finishedMutex.Lock() 306 fake.finishedArgsForCall = append(fake.finishedArgsForCall, struct { 307 arg1 lager.Logger 308 arg2 bool 309 }{arg1, arg2}) 310 fake.recordInvocation("Finished", []interface{}{arg1, arg2}) 311 fake.finishedMutex.Unlock() 312 if fake.FinishedStub != nil { 313 fake.FinishedStub(arg1, arg2) 314 } 315 } 316 317 func (fake *FakeCheckDelegate) FinishedCallCount() int { 318 fake.finishedMutex.RLock() 319 defer fake.finishedMutex.RUnlock() 320 return len(fake.finishedArgsForCall) 321 } 322 323 func (fake *FakeCheckDelegate) FinishedCalls(stub func(lager.Logger, bool)) { 324 fake.finishedMutex.Lock() 325 defer fake.finishedMutex.Unlock() 326 fake.FinishedStub = stub 327 } 328 329 func (fake *FakeCheckDelegate) FinishedArgsForCall(i int) (lager.Logger, bool) { 330 fake.finishedMutex.RLock() 331 defer fake.finishedMutex.RUnlock() 332 argsForCall := fake.finishedArgsForCall[i] 333 return argsForCall.arg1, argsForCall.arg2 334 } 335 336 func (fake *FakeCheckDelegate) Initializing(arg1 lager.Logger) { 337 fake.initializingMutex.Lock() 338 fake.initializingArgsForCall = append(fake.initializingArgsForCall, struct { 339 arg1 lager.Logger 340 }{arg1}) 341 fake.recordInvocation("Initializing", []interface{}{arg1}) 342 fake.initializingMutex.Unlock() 343 if fake.InitializingStub != nil { 344 fake.InitializingStub(arg1) 345 } 346 } 347 348 func (fake *FakeCheckDelegate) InitializingCallCount() int { 349 fake.initializingMutex.RLock() 350 defer fake.initializingMutex.RUnlock() 351 return len(fake.initializingArgsForCall) 352 } 353 354 func (fake *FakeCheckDelegate) InitializingCalls(stub func(lager.Logger)) { 355 fake.initializingMutex.Lock() 356 defer fake.initializingMutex.Unlock() 357 fake.InitializingStub = stub 358 } 359 360 func (fake *FakeCheckDelegate) InitializingArgsForCall(i int) lager.Logger { 361 fake.initializingMutex.RLock() 362 defer fake.initializingMutex.RUnlock() 363 argsForCall := fake.initializingArgsForCall[i] 364 return argsForCall.arg1 365 } 366 367 func (fake *FakeCheckDelegate) PointToCheckedConfig(arg1 db.ResourceConfigScope) error { 368 fake.pointToCheckedConfigMutex.Lock() 369 ret, specificReturn := fake.pointToCheckedConfigReturnsOnCall[len(fake.pointToCheckedConfigArgsForCall)] 370 fake.pointToCheckedConfigArgsForCall = append(fake.pointToCheckedConfigArgsForCall, struct { 371 arg1 db.ResourceConfigScope 372 }{arg1}) 373 fake.recordInvocation("PointToCheckedConfig", []interface{}{arg1}) 374 fake.pointToCheckedConfigMutex.Unlock() 375 if fake.PointToCheckedConfigStub != nil { 376 return fake.PointToCheckedConfigStub(arg1) 377 } 378 if specificReturn { 379 return ret.result1 380 } 381 fakeReturns := fake.pointToCheckedConfigReturns 382 return fakeReturns.result1 383 } 384 385 func (fake *FakeCheckDelegate) PointToCheckedConfigCallCount() int { 386 fake.pointToCheckedConfigMutex.RLock() 387 defer fake.pointToCheckedConfigMutex.RUnlock() 388 return len(fake.pointToCheckedConfigArgsForCall) 389 } 390 391 func (fake *FakeCheckDelegate) PointToCheckedConfigCalls(stub func(db.ResourceConfigScope) error) { 392 fake.pointToCheckedConfigMutex.Lock() 393 defer fake.pointToCheckedConfigMutex.Unlock() 394 fake.PointToCheckedConfigStub = stub 395 } 396 397 func (fake *FakeCheckDelegate) PointToCheckedConfigArgsForCall(i int) db.ResourceConfigScope { 398 fake.pointToCheckedConfigMutex.RLock() 399 defer fake.pointToCheckedConfigMutex.RUnlock() 400 argsForCall := fake.pointToCheckedConfigArgsForCall[i] 401 return argsForCall.arg1 402 } 403 404 func (fake *FakeCheckDelegate) PointToCheckedConfigReturns(result1 error) { 405 fake.pointToCheckedConfigMutex.Lock() 406 defer fake.pointToCheckedConfigMutex.Unlock() 407 fake.PointToCheckedConfigStub = nil 408 fake.pointToCheckedConfigReturns = struct { 409 result1 error 410 }{result1} 411 } 412 413 func (fake *FakeCheckDelegate) PointToCheckedConfigReturnsOnCall(i int, result1 error) { 414 fake.pointToCheckedConfigMutex.Lock() 415 defer fake.pointToCheckedConfigMutex.Unlock() 416 fake.PointToCheckedConfigStub = nil 417 if fake.pointToCheckedConfigReturnsOnCall == nil { 418 fake.pointToCheckedConfigReturnsOnCall = make(map[int]struct { 419 result1 error 420 }) 421 } 422 fake.pointToCheckedConfigReturnsOnCall[i] = struct { 423 result1 error 424 }{result1} 425 } 426 427 func (fake *FakeCheckDelegate) SelectedWorker(arg1 lager.Logger, arg2 string) { 428 fake.selectedWorkerMutex.Lock() 429 fake.selectedWorkerArgsForCall = append(fake.selectedWorkerArgsForCall, struct { 430 arg1 lager.Logger 431 arg2 string 432 }{arg1, arg2}) 433 fake.recordInvocation("SelectedWorker", []interface{}{arg1, arg2}) 434 fake.selectedWorkerMutex.Unlock() 435 if fake.SelectedWorkerStub != nil { 436 fake.SelectedWorkerStub(arg1, arg2) 437 } 438 } 439 440 func (fake *FakeCheckDelegate) SelectedWorkerCallCount() int { 441 fake.selectedWorkerMutex.RLock() 442 defer fake.selectedWorkerMutex.RUnlock() 443 return len(fake.selectedWorkerArgsForCall) 444 } 445 446 func (fake *FakeCheckDelegate) SelectedWorkerCalls(stub func(lager.Logger, string)) { 447 fake.selectedWorkerMutex.Lock() 448 defer fake.selectedWorkerMutex.Unlock() 449 fake.SelectedWorkerStub = stub 450 } 451 452 func (fake *FakeCheckDelegate) SelectedWorkerArgsForCall(i int) (lager.Logger, string) { 453 fake.selectedWorkerMutex.RLock() 454 defer fake.selectedWorkerMutex.RUnlock() 455 argsForCall := fake.selectedWorkerArgsForCall[i] 456 return argsForCall.arg1, argsForCall.arg2 457 } 458 459 func (fake *FakeCheckDelegate) StartSpan(arg1 context.Context, arg2 string, arg3 tracing.Attrs) (context.Context, trace.Span) { 460 fake.startSpanMutex.Lock() 461 ret, specificReturn := fake.startSpanReturnsOnCall[len(fake.startSpanArgsForCall)] 462 fake.startSpanArgsForCall = append(fake.startSpanArgsForCall, struct { 463 arg1 context.Context 464 arg2 string 465 arg3 tracing.Attrs 466 }{arg1, arg2, arg3}) 467 fake.recordInvocation("StartSpan", []interface{}{arg1, arg2, arg3}) 468 fake.startSpanMutex.Unlock() 469 if fake.StartSpanStub != nil { 470 return fake.StartSpanStub(arg1, arg2, arg3) 471 } 472 if specificReturn { 473 return ret.result1, ret.result2 474 } 475 fakeReturns := fake.startSpanReturns 476 return fakeReturns.result1, fakeReturns.result2 477 } 478 479 func (fake *FakeCheckDelegate) StartSpanCallCount() int { 480 fake.startSpanMutex.RLock() 481 defer fake.startSpanMutex.RUnlock() 482 return len(fake.startSpanArgsForCall) 483 } 484 485 func (fake *FakeCheckDelegate) StartSpanCalls(stub func(context.Context, string, tracing.Attrs) (context.Context, trace.Span)) { 486 fake.startSpanMutex.Lock() 487 defer fake.startSpanMutex.Unlock() 488 fake.StartSpanStub = stub 489 } 490 491 func (fake *FakeCheckDelegate) StartSpanArgsForCall(i int) (context.Context, string, tracing.Attrs) { 492 fake.startSpanMutex.RLock() 493 defer fake.startSpanMutex.RUnlock() 494 argsForCall := fake.startSpanArgsForCall[i] 495 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 496 } 497 498 func (fake *FakeCheckDelegate) StartSpanReturns(result1 context.Context, result2 trace.Span) { 499 fake.startSpanMutex.Lock() 500 defer fake.startSpanMutex.Unlock() 501 fake.StartSpanStub = nil 502 fake.startSpanReturns = struct { 503 result1 context.Context 504 result2 trace.Span 505 }{result1, result2} 506 } 507 508 func (fake *FakeCheckDelegate) StartSpanReturnsOnCall(i int, result1 context.Context, result2 trace.Span) { 509 fake.startSpanMutex.Lock() 510 defer fake.startSpanMutex.Unlock() 511 fake.StartSpanStub = nil 512 if fake.startSpanReturnsOnCall == nil { 513 fake.startSpanReturnsOnCall = make(map[int]struct { 514 result1 context.Context 515 result2 trace.Span 516 }) 517 } 518 fake.startSpanReturnsOnCall[i] = struct { 519 result1 context.Context 520 result2 trace.Span 521 }{result1, result2} 522 } 523 524 func (fake *FakeCheckDelegate) Starting(arg1 lager.Logger) { 525 fake.startingMutex.Lock() 526 fake.startingArgsForCall = append(fake.startingArgsForCall, struct { 527 arg1 lager.Logger 528 }{arg1}) 529 fake.recordInvocation("Starting", []interface{}{arg1}) 530 fake.startingMutex.Unlock() 531 if fake.StartingStub != nil { 532 fake.StartingStub(arg1) 533 } 534 } 535 536 func (fake *FakeCheckDelegate) StartingCallCount() int { 537 fake.startingMutex.RLock() 538 defer fake.startingMutex.RUnlock() 539 return len(fake.startingArgsForCall) 540 } 541 542 func (fake *FakeCheckDelegate) StartingCalls(stub func(lager.Logger)) { 543 fake.startingMutex.Lock() 544 defer fake.startingMutex.Unlock() 545 fake.StartingStub = stub 546 } 547 548 func (fake *FakeCheckDelegate) StartingArgsForCall(i int) lager.Logger { 549 fake.startingMutex.RLock() 550 defer fake.startingMutex.RUnlock() 551 argsForCall := fake.startingArgsForCall[i] 552 return argsForCall.arg1 553 } 554 555 func (fake *FakeCheckDelegate) Stderr() io.Writer { 556 fake.stderrMutex.Lock() 557 ret, specificReturn := fake.stderrReturnsOnCall[len(fake.stderrArgsForCall)] 558 fake.stderrArgsForCall = append(fake.stderrArgsForCall, struct { 559 }{}) 560 fake.recordInvocation("Stderr", []interface{}{}) 561 fake.stderrMutex.Unlock() 562 if fake.StderrStub != nil { 563 return fake.StderrStub() 564 } 565 if specificReturn { 566 return ret.result1 567 } 568 fakeReturns := fake.stderrReturns 569 return fakeReturns.result1 570 } 571 572 func (fake *FakeCheckDelegate) StderrCallCount() int { 573 fake.stderrMutex.RLock() 574 defer fake.stderrMutex.RUnlock() 575 return len(fake.stderrArgsForCall) 576 } 577 578 func (fake *FakeCheckDelegate) StderrCalls(stub func() io.Writer) { 579 fake.stderrMutex.Lock() 580 defer fake.stderrMutex.Unlock() 581 fake.StderrStub = stub 582 } 583 584 func (fake *FakeCheckDelegate) StderrReturns(result1 io.Writer) { 585 fake.stderrMutex.Lock() 586 defer fake.stderrMutex.Unlock() 587 fake.StderrStub = nil 588 fake.stderrReturns = struct { 589 result1 io.Writer 590 }{result1} 591 } 592 593 func (fake *FakeCheckDelegate) StderrReturnsOnCall(i int, result1 io.Writer) { 594 fake.stderrMutex.Lock() 595 defer fake.stderrMutex.Unlock() 596 fake.StderrStub = nil 597 if fake.stderrReturnsOnCall == nil { 598 fake.stderrReturnsOnCall = make(map[int]struct { 599 result1 io.Writer 600 }) 601 } 602 fake.stderrReturnsOnCall[i] = struct { 603 result1 io.Writer 604 }{result1} 605 } 606 607 func (fake *FakeCheckDelegate) Stdout() io.Writer { 608 fake.stdoutMutex.Lock() 609 ret, specificReturn := fake.stdoutReturnsOnCall[len(fake.stdoutArgsForCall)] 610 fake.stdoutArgsForCall = append(fake.stdoutArgsForCall, struct { 611 }{}) 612 fake.recordInvocation("Stdout", []interface{}{}) 613 fake.stdoutMutex.Unlock() 614 if fake.StdoutStub != nil { 615 return fake.StdoutStub() 616 } 617 if specificReturn { 618 return ret.result1 619 } 620 fakeReturns := fake.stdoutReturns 621 return fakeReturns.result1 622 } 623 624 func (fake *FakeCheckDelegate) StdoutCallCount() int { 625 fake.stdoutMutex.RLock() 626 defer fake.stdoutMutex.RUnlock() 627 return len(fake.stdoutArgsForCall) 628 } 629 630 func (fake *FakeCheckDelegate) StdoutCalls(stub func() io.Writer) { 631 fake.stdoutMutex.Lock() 632 defer fake.stdoutMutex.Unlock() 633 fake.StdoutStub = stub 634 } 635 636 func (fake *FakeCheckDelegate) StdoutReturns(result1 io.Writer) { 637 fake.stdoutMutex.Lock() 638 defer fake.stdoutMutex.Unlock() 639 fake.StdoutStub = nil 640 fake.stdoutReturns = struct { 641 result1 io.Writer 642 }{result1} 643 } 644 645 func (fake *FakeCheckDelegate) StdoutReturnsOnCall(i int, result1 io.Writer) { 646 fake.stdoutMutex.Lock() 647 defer fake.stdoutMutex.Unlock() 648 fake.StdoutStub = nil 649 if fake.stdoutReturnsOnCall == nil { 650 fake.stdoutReturnsOnCall = make(map[int]struct { 651 result1 io.Writer 652 }) 653 } 654 fake.stdoutReturnsOnCall[i] = struct { 655 result1 io.Writer 656 }{result1} 657 } 658 659 func (fake *FakeCheckDelegate) WaitToRun(arg1 context.Context, arg2 db.ResourceConfigScope) (lock.Lock, bool, error) { 660 fake.waitToRunMutex.Lock() 661 ret, specificReturn := fake.waitToRunReturnsOnCall[len(fake.waitToRunArgsForCall)] 662 fake.waitToRunArgsForCall = append(fake.waitToRunArgsForCall, struct { 663 arg1 context.Context 664 arg2 db.ResourceConfigScope 665 }{arg1, arg2}) 666 fake.recordInvocation("WaitToRun", []interface{}{arg1, arg2}) 667 fake.waitToRunMutex.Unlock() 668 if fake.WaitToRunStub != nil { 669 return fake.WaitToRunStub(arg1, arg2) 670 } 671 if specificReturn { 672 return ret.result1, ret.result2, ret.result3 673 } 674 fakeReturns := fake.waitToRunReturns 675 return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 676 } 677 678 func (fake *FakeCheckDelegate) WaitToRunCallCount() int { 679 fake.waitToRunMutex.RLock() 680 defer fake.waitToRunMutex.RUnlock() 681 return len(fake.waitToRunArgsForCall) 682 } 683 684 func (fake *FakeCheckDelegate) WaitToRunCalls(stub func(context.Context, db.ResourceConfigScope) (lock.Lock, bool, error)) { 685 fake.waitToRunMutex.Lock() 686 defer fake.waitToRunMutex.Unlock() 687 fake.WaitToRunStub = stub 688 } 689 690 func (fake *FakeCheckDelegate) WaitToRunArgsForCall(i int) (context.Context, db.ResourceConfigScope) { 691 fake.waitToRunMutex.RLock() 692 defer fake.waitToRunMutex.RUnlock() 693 argsForCall := fake.waitToRunArgsForCall[i] 694 return argsForCall.arg1, argsForCall.arg2 695 } 696 697 func (fake *FakeCheckDelegate) WaitToRunReturns(result1 lock.Lock, result2 bool, result3 error) { 698 fake.waitToRunMutex.Lock() 699 defer fake.waitToRunMutex.Unlock() 700 fake.WaitToRunStub = nil 701 fake.waitToRunReturns = struct { 702 result1 lock.Lock 703 result2 bool 704 result3 error 705 }{result1, result2, result3} 706 } 707 708 func (fake *FakeCheckDelegate) WaitToRunReturnsOnCall(i int, result1 lock.Lock, result2 bool, result3 error) { 709 fake.waitToRunMutex.Lock() 710 defer fake.waitToRunMutex.Unlock() 711 fake.WaitToRunStub = nil 712 if fake.waitToRunReturnsOnCall == nil { 713 fake.waitToRunReturnsOnCall = make(map[int]struct { 714 result1 lock.Lock 715 result2 bool 716 result3 error 717 }) 718 } 719 fake.waitToRunReturnsOnCall[i] = struct { 720 result1 lock.Lock 721 result2 bool 722 result3 error 723 }{result1, result2, result3} 724 } 725 726 func (fake *FakeCheckDelegate) Invocations() map[string][][]interface{} { 727 fake.invocationsMutex.RLock() 728 defer fake.invocationsMutex.RUnlock() 729 fake.erroredMutex.RLock() 730 defer fake.erroredMutex.RUnlock() 731 fake.fetchImageMutex.RLock() 732 defer fake.fetchImageMutex.RUnlock() 733 fake.findOrCreateScopeMutex.RLock() 734 defer fake.findOrCreateScopeMutex.RUnlock() 735 fake.finishedMutex.RLock() 736 defer fake.finishedMutex.RUnlock() 737 fake.initializingMutex.RLock() 738 defer fake.initializingMutex.RUnlock() 739 fake.pointToCheckedConfigMutex.RLock() 740 defer fake.pointToCheckedConfigMutex.RUnlock() 741 fake.selectedWorkerMutex.RLock() 742 defer fake.selectedWorkerMutex.RUnlock() 743 fake.startSpanMutex.RLock() 744 defer fake.startSpanMutex.RUnlock() 745 fake.startingMutex.RLock() 746 defer fake.startingMutex.RUnlock() 747 fake.stderrMutex.RLock() 748 defer fake.stderrMutex.RUnlock() 749 fake.stdoutMutex.RLock() 750 defer fake.stdoutMutex.RUnlock() 751 fake.waitToRunMutex.RLock() 752 defer fake.waitToRunMutex.RUnlock() 753 copiedInvocations := map[string][][]interface{}{} 754 for key, value := range fake.invocations { 755 copiedInvocations[key] = value 756 } 757 return copiedInvocations 758 } 759 760 func (fake *FakeCheckDelegate) recordInvocation(key string, args []interface{}) { 761 fake.invocationsMutex.Lock() 762 defer fake.invocationsMutex.Unlock() 763 if fake.invocations == nil { 764 fake.invocations = map[string][][]interface{}{} 765 } 766 if fake.invocations[key] == nil { 767 fake.invocations[key] = [][]interface{}{} 768 } 769 fake.invocations[key] = append(fake.invocations[key], args) 770 } 771 772 var _ exec.CheckDelegate = new(FakeCheckDelegate)