github.com/chenbh/concourse/v6@v6.4.2/worker/runtime/libcontainerd/libcontainerdfakes/fake_task.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package libcontainerdfakes 3 4 import ( 5 "context" 6 "sync" 7 "syscall" 8 9 "github.com/containerd/containerd" 10 "github.com/containerd/containerd/api/types" 11 "github.com/containerd/containerd/cio" 12 specs "github.com/opencontainers/runtime-spec/specs-go" 13 ) 14 15 type FakeTask struct { 16 CheckpointStub func(context.Context, ...containerd.CheckpointTaskOpts) (containerd.Image, error) 17 checkpointMutex sync.RWMutex 18 checkpointArgsForCall []struct { 19 arg1 context.Context 20 arg2 []containerd.CheckpointTaskOpts 21 } 22 checkpointReturns struct { 23 result1 containerd.Image 24 result2 error 25 } 26 checkpointReturnsOnCall map[int]struct { 27 result1 containerd.Image 28 result2 error 29 } 30 CloseIOStub func(context.Context, ...containerd.IOCloserOpts) error 31 closeIOMutex sync.RWMutex 32 closeIOArgsForCall []struct { 33 arg1 context.Context 34 arg2 []containerd.IOCloserOpts 35 } 36 closeIOReturns struct { 37 result1 error 38 } 39 closeIOReturnsOnCall map[int]struct { 40 result1 error 41 } 42 DeleteStub func(context.Context, ...containerd.ProcessDeleteOpts) (*containerd.ExitStatus, error) 43 deleteMutex sync.RWMutex 44 deleteArgsForCall []struct { 45 arg1 context.Context 46 arg2 []containerd.ProcessDeleteOpts 47 } 48 deleteReturns struct { 49 result1 *containerd.ExitStatus 50 result2 error 51 } 52 deleteReturnsOnCall map[int]struct { 53 result1 *containerd.ExitStatus 54 result2 error 55 } 56 ExecStub func(context.Context, string, *specs.Process, cio.Creator) (containerd.Process, error) 57 execMutex sync.RWMutex 58 execArgsForCall []struct { 59 arg1 context.Context 60 arg2 string 61 arg3 *specs.Process 62 arg4 cio.Creator 63 } 64 execReturns struct { 65 result1 containerd.Process 66 result2 error 67 } 68 execReturnsOnCall map[int]struct { 69 result1 containerd.Process 70 result2 error 71 } 72 IDStub func() string 73 iDMutex sync.RWMutex 74 iDArgsForCall []struct { 75 } 76 iDReturns struct { 77 result1 string 78 } 79 iDReturnsOnCall map[int]struct { 80 result1 string 81 } 82 IOStub func() cio.IO 83 iOMutex sync.RWMutex 84 iOArgsForCall []struct { 85 } 86 iOReturns struct { 87 result1 cio.IO 88 } 89 iOReturnsOnCall map[int]struct { 90 result1 cio.IO 91 } 92 KillStub func(context.Context, syscall.Signal, ...containerd.KillOpts) error 93 killMutex sync.RWMutex 94 killArgsForCall []struct { 95 arg1 context.Context 96 arg2 syscall.Signal 97 arg3 []containerd.KillOpts 98 } 99 killReturns struct { 100 result1 error 101 } 102 killReturnsOnCall map[int]struct { 103 result1 error 104 } 105 LoadProcessStub func(context.Context, string, cio.Attach) (containerd.Process, error) 106 loadProcessMutex sync.RWMutex 107 loadProcessArgsForCall []struct { 108 arg1 context.Context 109 arg2 string 110 arg3 cio.Attach 111 } 112 loadProcessReturns struct { 113 result1 containerd.Process 114 result2 error 115 } 116 loadProcessReturnsOnCall map[int]struct { 117 result1 containerd.Process 118 result2 error 119 } 120 MetricsStub func(context.Context) (*types.Metric, error) 121 metricsMutex sync.RWMutex 122 metricsArgsForCall []struct { 123 arg1 context.Context 124 } 125 metricsReturns struct { 126 result1 *types.Metric 127 result2 error 128 } 129 metricsReturnsOnCall map[int]struct { 130 result1 *types.Metric 131 result2 error 132 } 133 PauseStub func(context.Context) error 134 pauseMutex sync.RWMutex 135 pauseArgsForCall []struct { 136 arg1 context.Context 137 } 138 pauseReturns struct { 139 result1 error 140 } 141 pauseReturnsOnCall map[int]struct { 142 result1 error 143 } 144 PidStub func() uint32 145 pidMutex sync.RWMutex 146 pidArgsForCall []struct { 147 } 148 pidReturns struct { 149 result1 uint32 150 } 151 pidReturnsOnCall map[int]struct { 152 result1 uint32 153 } 154 PidsStub func(context.Context) ([]containerd.ProcessInfo, error) 155 pidsMutex sync.RWMutex 156 pidsArgsForCall []struct { 157 arg1 context.Context 158 } 159 pidsReturns struct { 160 result1 []containerd.ProcessInfo 161 result2 error 162 } 163 pidsReturnsOnCall map[int]struct { 164 result1 []containerd.ProcessInfo 165 result2 error 166 } 167 ResizeStub func(context.Context, uint32, uint32) error 168 resizeMutex sync.RWMutex 169 resizeArgsForCall []struct { 170 arg1 context.Context 171 arg2 uint32 172 arg3 uint32 173 } 174 resizeReturns struct { 175 result1 error 176 } 177 resizeReturnsOnCall map[int]struct { 178 result1 error 179 } 180 ResumeStub func(context.Context) error 181 resumeMutex sync.RWMutex 182 resumeArgsForCall []struct { 183 arg1 context.Context 184 } 185 resumeReturns struct { 186 result1 error 187 } 188 resumeReturnsOnCall map[int]struct { 189 result1 error 190 } 191 StartStub func(context.Context) error 192 startMutex sync.RWMutex 193 startArgsForCall []struct { 194 arg1 context.Context 195 } 196 startReturns struct { 197 result1 error 198 } 199 startReturnsOnCall map[int]struct { 200 result1 error 201 } 202 StatusStub func(context.Context) (containerd.Status, error) 203 statusMutex sync.RWMutex 204 statusArgsForCall []struct { 205 arg1 context.Context 206 } 207 statusReturns struct { 208 result1 containerd.Status 209 result2 error 210 } 211 statusReturnsOnCall map[int]struct { 212 result1 containerd.Status 213 result2 error 214 } 215 UpdateStub func(context.Context, ...containerd.UpdateTaskOpts) error 216 updateMutex sync.RWMutex 217 updateArgsForCall []struct { 218 arg1 context.Context 219 arg2 []containerd.UpdateTaskOpts 220 } 221 updateReturns struct { 222 result1 error 223 } 224 updateReturnsOnCall map[int]struct { 225 result1 error 226 } 227 WaitStub func(context.Context) (<-chan containerd.ExitStatus, error) 228 waitMutex sync.RWMutex 229 waitArgsForCall []struct { 230 arg1 context.Context 231 } 232 waitReturns struct { 233 result1 <-chan containerd.ExitStatus 234 result2 error 235 } 236 waitReturnsOnCall map[int]struct { 237 result1 <-chan containerd.ExitStatus 238 result2 error 239 } 240 invocations map[string][][]interface{} 241 invocationsMutex sync.RWMutex 242 } 243 244 func (fake *FakeTask) Checkpoint(arg1 context.Context, arg2 ...containerd.CheckpointTaskOpts) (containerd.Image, error) { 245 fake.checkpointMutex.Lock() 246 ret, specificReturn := fake.checkpointReturnsOnCall[len(fake.checkpointArgsForCall)] 247 fake.checkpointArgsForCall = append(fake.checkpointArgsForCall, struct { 248 arg1 context.Context 249 arg2 []containerd.CheckpointTaskOpts 250 }{arg1, arg2}) 251 fake.recordInvocation("Checkpoint", []interface{}{arg1, arg2}) 252 fake.checkpointMutex.Unlock() 253 if fake.CheckpointStub != nil { 254 return fake.CheckpointStub(arg1, arg2...) 255 } 256 if specificReturn { 257 return ret.result1, ret.result2 258 } 259 fakeReturns := fake.checkpointReturns 260 return fakeReturns.result1, fakeReturns.result2 261 } 262 263 func (fake *FakeTask) CheckpointCallCount() int { 264 fake.checkpointMutex.RLock() 265 defer fake.checkpointMutex.RUnlock() 266 return len(fake.checkpointArgsForCall) 267 } 268 269 func (fake *FakeTask) CheckpointCalls(stub func(context.Context, ...containerd.CheckpointTaskOpts) (containerd.Image, error)) { 270 fake.checkpointMutex.Lock() 271 defer fake.checkpointMutex.Unlock() 272 fake.CheckpointStub = stub 273 } 274 275 func (fake *FakeTask) CheckpointArgsForCall(i int) (context.Context, []containerd.CheckpointTaskOpts) { 276 fake.checkpointMutex.RLock() 277 defer fake.checkpointMutex.RUnlock() 278 argsForCall := fake.checkpointArgsForCall[i] 279 return argsForCall.arg1, argsForCall.arg2 280 } 281 282 func (fake *FakeTask) CheckpointReturns(result1 containerd.Image, result2 error) { 283 fake.checkpointMutex.Lock() 284 defer fake.checkpointMutex.Unlock() 285 fake.CheckpointStub = nil 286 fake.checkpointReturns = struct { 287 result1 containerd.Image 288 result2 error 289 }{result1, result2} 290 } 291 292 func (fake *FakeTask) CheckpointReturnsOnCall(i int, result1 containerd.Image, result2 error) { 293 fake.checkpointMutex.Lock() 294 defer fake.checkpointMutex.Unlock() 295 fake.CheckpointStub = nil 296 if fake.checkpointReturnsOnCall == nil { 297 fake.checkpointReturnsOnCall = make(map[int]struct { 298 result1 containerd.Image 299 result2 error 300 }) 301 } 302 fake.checkpointReturnsOnCall[i] = struct { 303 result1 containerd.Image 304 result2 error 305 }{result1, result2} 306 } 307 308 func (fake *FakeTask) CloseIO(arg1 context.Context, arg2 ...containerd.IOCloserOpts) error { 309 fake.closeIOMutex.Lock() 310 ret, specificReturn := fake.closeIOReturnsOnCall[len(fake.closeIOArgsForCall)] 311 fake.closeIOArgsForCall = append(fake.closeIOArgsForCall, struct { 312 arg1 context.Context 313 arg2 []containerd.IOCloserOpts 314 }{arg1, arg2}) 315 fake.recordInvocation("CloseIO", []interface{}{arg1, arg2}) 316 fake.closeIOMutex.Unlock() 317 if fake.CloseIOStub != nil { 318 return fake.CloseIOStub(arg1, arg2...) 319 } 320 if specificReturn { 321 return ret.result1 322 } 323 fakeReturns := fake.closeIOReturns 324 return fakeReturns.result1 325 } 326 327 func (fake *FakeTask) CloseIOCallCount() int { 328 fake.closeIOMutex.RLock() 329 defer fake.closeIOMutex.RUnlock() 330 return len(fake.closeIOArgsForCall) 331 } 332 333 func (fake *FakeTask) CloseIOCalls(stub func(context.Context, ...containerd.IOCloserOpts) error) { 334 fake.closeIOMutex.Lock() 335 defer fake.closeIOMutex.Unlock() 336 fake.CloseIOStub = stub 337 } 338 339 func (fake *FakeTask) CloseIOArgsForCall(i int) (context.Context, []containerd.IOCloserOpts) { 340 fake.closeIOMutex.RLock() 341 defer fake.closeIOMutex.RUnlock() 342 argsForCall := fake.closeIOArgsForCall[i] 343 return argsForCall.arg1, argsForCall.arg2 344 } 345 346 func (fake *FakeTask) CloseIOReturns(result1 error) { 347 fake.closeIOMutex.Lock() 348 defer fake.closeIOMutex.Unlock() 349 fake.CloseIOStub = nil 350 fake.closeIOReturns = struct { 351 result1 error 352 }{result1} 353 } 354 355 func (fake *FakeTask) CloseIOReturnsOnCall(i int, result1 error) { 356 fake.closeIOMutex.Lock() 357 defer fake.closeIOMutex.Unlock() 358 fake.CloseIOStub = nil 359 if fake.closeIOReturnsOnCall == nil { 360 fake.closeIOReturnsOnCall = make(map[int]struct { 361 result1 error 362 }) 363 } 364 fake.closeIOReturnsOnCall[i] = struct { 365 result1 error 366 }{result1} 367 } 368 369 func (fake *FakeTask) Delete(arg1 context.Context, arg2 ...containerd.ProcessDeleteOpts) (*containerd.ExitStatus, error) { 370 fake.deleteMutex.Lock() 371 ret, specificReturn := fake.deleteReturnsOnCall[len(fake.deleteArgsForCall)] 372 fake.deleteArgsForCall = append(fake.deleteArgsForCall, struct { 373 arg1 context.Context 374 arg2 []containerd.ProcessDeleteOpts 375 }{arg1, arg2}) 376 fake.recordInvocation("Delete", []interface{}{arg1, arg2}) 377 fake.deleteMutex.Unlock() 378 if fake.DeleteStub != nil { 379 return fake.DeleteStub(arg1, arg2...) 380 } 381 if specificReturn { 382 return ret.result1, ret.result2 383 } 384 fakeReturns := fake.deleteReturns 385 return fakeReturns.result1, fakeReturns.result2 386 } 387 388 func (fake *FakeTask) DeleteCallCount() int { 389 fake.deleteMutex.RLock() 390 defer fake.deleteMutex.RUnlock() 391 return len(fake.deleteArgsForCall) 392 } 393 394 func (fake *FakeTask) DeleteCalls(stub func(context.Context, ...containerd.ProcessDeleteOpts) (*containerd.ExitStatus, error)) { 395 fake.deleteMutex.Lock() 396 defer fake.deleteMutex.Unlock() 397 fake.DeleteStub = stub 398 } 399 400 func (fake *FakeTask) DeleteArgsForCall(i int) (context.Context, []containerd.ProcessDeleteOpts) { 401 fake.deleteMutex.RLock() 402 defer fake.deleteMutex.RUnlock() 403 argsForCall := fake.deleteArgsForCall[i] 404 return argsForCall.arg1, argsForCall.arg2 405 } 406 407 func (fake *FakeTask) DeleteReturns(result1 *containerd.ExitStatus, result2 error) { 408 fake.deleteMutex.Lock() 409 defer fake.deleteMutex.Unlock() 410 fake.DeleteStub = nil 411 fake.deleteReturns = struct { 412 result1 *containerd.ExitStatus 413 result2 error 414 }{result1, result2} 415 } 416 417 func (fake *FakeTask) DeleteReturnsOnCall(i int, result1 *containerd.ExitStatus, result2 error) { 418 fake.deleteMutex.Lock() 419 defer fake.deleteMutex.Unlock() 420 fake.DeleteStub = nil 421 if fake.deleteReturnsOnCall == nil { 422 fake.deleteReturnsOnCall = make(map[int]struct { 423 result1 *containerd.ExitStatus 424 result2 error 425 }) 426 } 427 fake.deleteReturnsOnCall[i] = struct { 428 result1 *containerd.ExitStatus 429 result2 error 430 }{result1, result2} 431 } 432 433 func (fake *FakeTask) Exec(arg1 context.Context, arg2 string, arg3 *specs.Process, arg4 cio.Creator) (containerd.Process, error) { 434 fake.execMutex.Lock() 435 ret, specificReturn := fake.execReturnsOnCall[len(fake.execArgsForCall)] 436 fake.execArgsForCall = append(fake.execArgsForCall, struct { 437 arg1 context.Context 438 arg2 string 439 arg3 *specs.Process 440 arg4 cio.Creator 441 }{arg1, arg2, arg3, arg4}) 442 fake.recordInvocation("Exec", []interface{}{arg1, arg2, arg3, arg4}) 443 fake.execMutex.Unlock() 444 if fake.ExecStub != nil { 445 return fake.ExecStub(arg1, arg2, arg3, arg4) 446 } 447 if specificReturn { 448 return ret.result1, ret.result2 449 } 450 fakeReturns := fake.execReturns 451 return fakeReturns.result1, fakeReturns.result2 452 } 453 454 func (fake *FakeTask) ExecCallCount() int { 455 fake.execMutex.RLock() 456 defer fake.execMutex.RUnlock() 457 return len(fake.execArgsForCall) 458 } 459 460 func (fake *FakeTask) ExecCalls(stub func(context.Context, string, *specs.Process, cio.Creator) (containerd.Process, error)) { 461 fake.execMutex.Lock() 462 defer fake.execMutex.Unlock() 463 fake.ExecStub = stub 464 } 465 466 func (fake *FakeTask) ExecArgsForCall(i int) (context.Context, string, *specs.Process, cio.Creator) { 467 fake.execMutex.RLock() 468 defer fake.execMutex.RUnlock() 469 argsForCall := fake.execArgsForCall[i] 470 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 471 } 472 473 func (fake *FakeTask) ExecReturns(result1 containerd.Process, result2 error) { 474 fake.execMutex.Lock() 475 defer fake.execMutex.Unlock() 476 fake.ExecStub = nil 477 fake.execReturns = struct { 478 result1 containerd.Process 479 result2 error 480 }{result1, result2} 481 } 482 483 func (fake *FakeTask) ExecReturnsOnCall(i int, result1 containerd.Process, result2 error) { 484 fake.execMutex.Lock() 485 defer fake.execMutex.Unlock() 486 fake.ExecStub = nil 487 if fake.execReturnsOnCall == nil { 488 fake.execReturnsOnCall = make(map[int]struct { 489 result1 containerd.Process 490 result2 error 491 }) 492 } 493 fake.execReturnsOnCall[i] = struct { 494 result1 containerd.Process 495 result2 error 496 }{result1, result2} 497 } 498 499 func (fake *FakeTask) ID() string { 500 fake.iDMutex.Lock() 501 ret, specificReturn := fake.iDReturnsOnCall[len(fake.iDArgsForCall)] 502 fake.iDArgsForCall = append(fake.iDArgsForCall, struct { 503 }{}) 504 fake.recordInvocation("ID", []interface{}{}) 505 fake.iDMutex.Unlock() 506 if fake.IDStub != nil { 507 return fake.IDStub() 508 } 509 if specificReturn { 510 return ret.result1 511 } 512 fakeReturns := fake.iDReturns 513 return fakeReturns.result1 514 } 515 516 func (fake *FakeTask) IDCallCount() int { 517 fake.iDMutex.RLock() 518 defer fake.iDMutex.RUnlock() 519 return len(fake.iDArgsForCall) 520 } 521 522 func (fake *FakeTask) IDCalls(stub func() string) { 523 fake.iDMutex.Lock() 524 defer fake.iDMutex.Unlock() 525 fake.IDStub = stub 526 } 527 528 func (fake *FakeTask) IDReturns(result1 string) { 529 fake.iDMutex.Lock() 530 defer fake.iDMutex.Unlock() 531 fake.IDStub = nil 532 fake.iDReturns = struct { 533 result1 string 534 }{result1} 535 } 536 537 func (fake *FakeTask) IDReturnsOnCall(i int, result1 string) { 538 fake.iDMutex.Lock() 539 defer fake.iDMutex.Unlock() 540 fake.IDStub = nil 541 if fake.iDReturnsOnCall == nil { 542 fake.iDReturnsOnCall = make(map[int]struct { 543 result1 string 544 }) 545 } 546 fake.iDReturnsOnCall[i] = struct { 547 result1 string 548 }{result1} 549 } 550 551 func (fake *FakeTask) IO() cio.IO { 552 fake.iOMutex.Lock() 553 ret, specificReturn := fake.iOReturnsOnCall[len(fake.iOArgsForCall)] 554 fake.iOArgsForCall = append(fake.iOArgsForCall, struct { 555 }{}) 556 fake.recordInvocation("IO", []interface{}{}) 557 fake.iOMutex.Unlock() 558 if fake.IOStub != nil { 559 return fake.IOStub() 560 } 561 if specificReturn { 562 return ret.result1 563 } 564 fakeReturns := fake.iOReturns 565 return fakeReturns.result1 566 } 567 568 func (fake *FakeTask) IOCallCount() int { 569 fake.iOMutex.RLock() 570 defer fake.iOMutex.RUnlock() 571 return len(fake.iOArgsForCall) 572 } 573 574 func (fake *FakeTask) IOCalls(stub func() cio.IO) { 575 fake.iOMutex.Lock() 576 defer fake.iOMutex.Unlock() 577 fake.IOStub = stub 578 } 579 580 func (fake *FakeTask) IOReturns(result1 cio.IO) { 581 fake.iOMutex.Lock() 582 defer fake.iOMutex.Unlock() 583 fake.IOStub = nil 584 fake.iOReturns = struct { 585 result1 cio.IO 586 }{result1} 587 } 588 589 func (fake *FakeTask) IOReturnsOnCall(i int, result1 cio.IO) { 590 fake.iOMutex.Lock() 591 defer fake.iOMutex.Unlock() 592 fake.IOStub = nil 593 if fake.iOReturnsOnCall == nil { 594 fake.iOReturnsOnCall = make(map[int]struct { 595 result1 cio.IO 596 }) 597 } 598 fake.iOReturnsOnCall[i] = struct { 599 result1 cio.IO 600 }{result1} 601 } 602 603 func (fake *FakeTask) Kill(arg1 context.Context, arg2 syscall.Signal, arg3 ...containerd.KillOpts) error { 604 fake.killMutex.Lock() 605 ret, specificReturn := fake.killReturnsOnCall[len(fake.killArgsForCall)] 606 fake.killArgsForCall = append(fake.killArgsForCall, struct { 607 arg1 context.Context 608 arg2 syscall.Signal 609 arg3 []containerd.KillOpts 610 }{arg1, arg2, arg3}) 611 fake.recordInvocation("Kill", []interface{}{arg1, arg2, arg3}) 612 fake.killMutex.Unlock() 613 if fake.KillStub != nil { 614 return fake.KillStub(arg1, arg2, arg3...) 615 } 616 if specificReturn { 617 return ret.result1 618 } 619 fakeReturns := fake.killReturns 620 return fakeReturns.result1 621 } 622 623 func (fake *FakeTask) KillCallCount() int { 624 fake.killMutex.RLock() 625 defer fake.killMutex.RUnlock() 626 return len(fake.killArgsForCall) 627 } 628 629 func (fake *FakeTask) KillCalls(stub func(context.Context, syscall.Signal, ...containerd.KillOpts) error) { 630 fake.killMutex.Lock() 631 defer fake.killMutex.Unlock() 632 fake.KillStub = stub 633 } 634 635 func (fake *FakeTask) KillArgsForCall(i int) (context.Context, syscall.Signal, []containerd.KillOpts) { 636 fake.killMutex.RLock() 637 defer fake.killMutex.RUnlock() 638 argsForCall := fake.killArgsForCall[i] 639 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 640 } 641 642 func (fake *FakeTask) KillReturns(result1 error) { 643 fake.killMutex.Lock() 644 defer fake.killMutex.Unlock() 645 fake.KillStub = nil 646 fake.killReturns = struct { 647 result1 error 648 }{result1} 649 } 650 651 func (fake *FakeTask) KillReturnsOnCall(i int, result1 error) { 652 fake.killMutex.Lock() 653 defer fake.killMutex.Unlock() 654 fake.KillStub = nil 655 if fake.killReturnsOnCall == nil { 656 fake.killReturnsOnCall = make(map[int]struct { 657 result1 error 658 }) 659 } 660 fake.killReturnsOnCall[i] = struct { 661 result1 error 662 }{result1} 663 } 664 665 func (fake *FakeTask) LoadProcess(arg1 context.Context, arg2 string, arg3 cio.Attach) (containerd.Process, error) { 666 fake.loadProcessMutex.Lock() 667 ret, specificReturn := fake.loadProcessReturnsOnCall[len(fake.loadProcessArgsForCall)] 668 fake.loadProcessArgsForCall = append(fake.loadProcessArgsForCall, struct { 669 arg1 context.Context 670 arg2 string 671 arg3 cio.Attach 672 }{arg1, arg2, arg3}) 673 fake.recordInvocation("LoadProcess", []interface{}{arg1, arg2, arg3}) 674 fake.loadProcessMutex.Unlock() 675 if fake.LoadProcessStub != nil { 676 return fake.LoadProcessStub(arg1, arg2, arg3) 677 } 678 if specificReturn { 679 return ret.result1, ret.result2 680 } 681 fakeReturns := fake.loadProcessReturns 682 return fakeReturns.result1, fakeReturns.result2 683 } 684 685 func (fake *FakeTask) LoadProcessCallCount() int { 686 fake.loadProcessMutex.RLock() 687 defer fake.loadProcessMutex.RUnlock() 688 return len(fake.loadProcessArgsForCall) 689 } 690 691 func (fake *FakeTask) LoadProcessCalls(stub func(context.Context, string, cio.Attach) (containerd.Process, error)) { 692 fake.loadProcessMutex.Lock() 693 defer fake.loadProcessMutex.Unlock() 694 fake.LoadProcessStub = stub 695 } 696 697 func (fake *FakeTask) LoadProcessArgsForCall(i int) (context.Context, string, cio.Attach) { 698 fake.loadProcessMutex.RLock() 699 defer fake.loadProcessMutex.RUnlock() 700 argsForCall := fake.loadProcessArgsForCall[i] 701 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 702 } 703 704 func (fake *FakeTask) LoadProcessReturns(result1 containerd.Process, result2 error) { 705 fake.loadProcessMutex.Lock() 706 defer fake.loadProcessMutex.Unlock() 707 fake.LoadProcessStub = nil 708 fake.loadProcessReturns = struct { 709 result1 containerd.Process 710 result2 error 711 }{result1, result2} 712 } 713 714 func (fake *FakeTask) LoadProcessReturnsOnCall(i int, result1 containerd.Process, result2 error) { 715 fake.loadProcessMutex.Lock() 716 defer fake.loadProcessMutex.Unlock() 717 fake.LoadProcessStub = nil 718 if fake.loadProcessReturnsOnCall == nil { 719 fake.loadProcessReturnsOnCall = make(map[int]struct { 720 result1 containerd.Process 721 result2 error 722 }) 723 } 724 fake.loadProcessReturnsOnCall[i] = struct { 725 result1 containerd.Process 726 result2 error 727 }{result1, result2} 728 } 729 730 func (fake *FakeTask) Metrics(arg1 context.Context) (*types.Metric, error) { 731 fake.metricsMutex.Lock() 732 ret, specificReturn := fake.metricsReturnsOnCall[len(fake.metricsArgsForCall)] 733 fake.metricsArgsForCall = append(fake.metricsArgsForCall, struct { 734 arg1 context.Context 735 }{arg1}) 736 fake.recordInvocation("Metrics", []interface{}{arg1}) 737 fake.metricsMutex.Unlock() 738 if fake.MetricsStub != nil { 739 return fake.MetricsStub(arg1) 740 } 741 if specificReturn { 742 return ret.result1, ret.result2 743 } 744 fakeReturns := fake.metricsReturns 745 return fakeReturns.result1, fakeReturns.result2 746 } 747 748 func (fake *FakeTask) MetricsCallCount() int { 749 fake.metricsMutex.RLock() 750 defer fake.metricsMutex.RUnlock() 751 return len(fake.metricsArgsForCall) 752 } 753 754 func (fake *FakeTask) MetricsCalls(stub func(context.Context) (*types.Metric, error)) { 755 fake.metricsMutex.Lock() 756 defer fake.metricsMutex.Unlock() 757 fake.MetricsStub = stub 758 } 759 760 func (fake *FakeTask) MetricsArgsForCall(i int) context.Context { 761 fake.metricsMutex.RLock() 762 defer fake.metricsMutex.RUnlock() 763 argsForCall := fake.metricsArgsForCall[i] 764 return argsForCall.arg1 765 } 766 767 func (fake *FakeTask) MetricsReturns(result1 *types.Metric, result2 error) { 768 fake.metricsMutex.Lock() 769 defer fake.metricsMutex.Unlock() 770 fake.MetricsStub = nil 771 fake.metricsReturns = struct { 772 result1 *types.Metric 773 result2 error 774 }{result1, result2} 775 } 776 777 func (fake *FakeTask) MetricsReturnsOnCall(i int, result1 *types.Metric, result2 error) { 778 fake.metricsMutex.Lock() 779 defer fake.metricsMutex.Unlock() 780 fake.MetricsStub = nil 781 if fake.metricsReturnsOnCall == nil { 782 fake.metricsReturnsOnCall = make(map[int]struct { 783 result1 *types.Metric 784 result2 error 785 }) 786 } 787 fake.metricsReturnsOnCall[i] = struct { 788 result1 *types.Metric 789 result2 error 790 }{result1, result2} 791 } 792 793 func (fake *FakeTask) Pause(arg1 context.Context) error { 794 fake.pauseMutex.Lock() 795 ret, specificReturn := fake.pauseReturnsOnCall[len(fake.pauseArgsForCall)] 796 fake.pauseArgsForCall = append(fake.pauseArgsForCall, struct { 797 arg1 context.Context 798 }{arg1}) 799 fake.recordInvocation("Pause", []interface{}{arg1}) 800 fake.pauseMutex.Unlock() 801 if fake.PauseStub != nil { 802 return fake.PauseStub(arg1) 803 } 804 if specificReturn { 805 return ret.result1 806 } 807 fakeReturns := fake.pauseReturns 808 return fakeReturns.result1 809 } 810 811 func (fake *FakeTask) PauseCallCount() int { 812 fake.pauseMutex.RLock() 813 defer fake.pauseMutex.RUnlock() 814 return len(fake.pauseArgsForCall) 815 } 816 817 func (fake *FakeTask) PauseCalls(stub func(context.Context) error) { 818 fake.pauseMutex.Lock() 819 defer fake.pauseMutex.Unlock() 820 fake.PauseStub = stub 821 } 822 823 func (fake *FakeTask) PauseArgsForCall(i int) context.Context { 824 fake.pauseMutex.RLock() 825 defer fake.pauseMutex.RUnlock() 826 argsForCall := fake.pauseArgsForCall[i] 827 return argsForCall.arg1 828 } 829 830 func (fake *FakeTask) PauseReturns(result1 error) { 831 fake.pauseMutex.Lock() 832 defer fake.pauseMutex.Unlock() 833 fake.PauseStub = nil 834 fake.pauseReturns = struct { 835 result1 error 836 }{result1} 837 } 838 839 func (fake *FakeTask) PauseReturnsOnCall(i int, result1 error) { 840 fake.pauseMutex.Lock() 841 defer fake.pauseMutex.Unlock() 842 fake.PauseStub = nil 843 if fake.pauseReturnsOnCall == nil { 844 fake.pauseReturnsOnCall = make(map[int]struct { 845 result1 error 846 }) 847 } 848 fake.pauseReturnsOnCall[i] = struct { 849 result1 error 850 }{result1} 851 } 852 853 func (fake *FakeTask) Pid() uint32 { 854 fake.pidMutex.Lock() 855 ret, specificReturn := fake.pidReturnsOnCall[len(fake.pidArgsForCall)] 856 fake.pidArgsForCall = append(fake.pidArgsForCall, struct { 857 }{}) 858 fake.recordInvocation("Pid", []interface{}{}) 859 fake.pidMutex.Unlock() 860 if fake.PidStub != nil { 861 return fake.PidStub() 862 } 863 if specificReturn { 864 return ret.result1 865 } 866 fakeReturns := fake.pidReturns 867 return fakeReturns.result1 868 } 869 870 func (fake *FakeTask) PidCallCount() int { 871 fake.pidMutex.RLock() 872 defer fake.pidMutex.RUnlock() 873 return len(fake.pidArgsForCall) 874 } 875 876 func (fake *FakeTask) PidCalls(stub func() uint32) { 877 fake.pidMutex.Lock() 878 defer fake.pidMutex.Unlock() 879 fake.PidStub = stub 880 } 881 882 func (fake *FakeTask) PidReturns(result1 uint32) { 883 fake.pidMutex.Lock() 884 defer fake.pidMutex.Unlock() 885 fake.PidStub = nil 886 fake.pidReturns = struct { 887 result1 uint32 888 }{result1} 889 } 890 891 func (fake *FakeTask) PidReturnsOnCall(i int, result1 uint32) { 892 fake.pidMutex.Lock() 893 defer fake.pidMutex.Unlock() 894 fake.PidStub = nil 895 if fake.pidReturnsOnCall == nil { 896 fake.pidReturnsOnCall = make(map[int]struct { 897 result1 uint32 898 }) 899 } 900 fake.pidReturnsOnCall[i] = struct { 901 result1 uint32 902 }{result1} 903 } 904 905 func (fake *FakeTask) Pids(arg1 context.Context) ([]containerd.ProcessInfo, error) { 906 fake.pidsMutex.Lock() 907 ret, specificReturn := fake.pidsReturnsOnCall[len(fake.pidsArgsForCall)] 908 fake.pidsArgsForCall = append(fake.pidsArgsForCall, struct { 909 arg1 context.Context 910 }{arg1}) 911 fake.recordInvocation("Pids", []interface{}{arg1}) 912 fake.pidsMutex.Unlock() 913 if fake.PidsStub != nil { 914 return fake.PidsStub(arg1) 915 } 916 if specificReturn { 917 return ret.result1, ret.result2 918 } 919 fakeReturns := fake.pidsReturns 920 return fakeReturns.result1, fakeReturns.result2 921 } 922 923 func (fake *FakeTask) PidsCallCount() int { 924 fake.pidsMutex.RLock() 925 defer fake.pidsMutex.RUnlock() 926 return len(fake.pidsArgsForCall) 927 } 928 929 func (fake *FakeTask) PidsCalls(stub func(context.Context) ([]containerd.ProcessInfo, error)) { 930 fake.pidsMutex.Lock() 931 defer fake.pidsMutex.Unlock() 932 fake.PidsStub = stub 933 } 934 935 func (fake *FakeTask) PidsArgsForCall(i int) context.Context { 936 fake.pidsMutex.RLock() 937 defer fake.pidsMutex.RUnlock() 938 argsForCall := fake.pidsArgsForCall[i] 939 return argsForCall.arg1 940 } 941 942 func (fake *FakeTask) PidsReturns(result1 []containerd.ProcessInfo, result2 error) { 943 fake.pidsMutex.Lock() 944 defer fake.pidsMutex.Unlock() 945 fake.PidsStub = nil 946 fake.pidsReturns = struct { 947 result1 []containerd.ProcessInfo 948 result2 error 949 }{result1, result2} 950 } 951 952 func (fake *FakeTask) PidsReturnsOnCall(i int, result1 []containerd.ProcessInfo, result2 error) { 953 fake.pidsMutex.Lock() 954 defer fake.pidsMutex.Unlock() 955 fake.PidsStub = nil 956 if fake.pidsReturnsOnCall == nil { 957 fake.pidsReturnsOnCall = make(map[int]struct { 958 result1 []containerd.ProcessInfo 959 result2 error 960 }) 961 } 962 fake.pidsReturnsOnCall[i] = struct { 963 result1 []containerd.ProcessInfo 964 result2 error 965 }{result1, result2} 966 } 967 968 func (fake *FakeTask) Resize(arg1 context.Context, arg2 uint32, arg3 uint32) error { 969 fake.resizeMutex.Lock() 970 ret, specificReturn := fake.resizeReturnsOnCall[len(fake.resizeArgsForCall)] 971 fake.resizeArgsForCall = append(fake.resizeArgsForCall, struct { 972 arg1 context.Context 973 arg2 uint32 974 arg3 uint32 975 }{arg1, arg2, arg3}) 976 fake.recordInvocation("Resize", []interface{}{arg1, arg2, arg3}) 977 fake.resizeMutex.Unlock() 978 if fake.ResizeStub != nil { 979 return fake.ResizeStub(arg1, arg2, arg3) 980 } 981 if specificReturn { 982 return ret.result1 983 } 984 fakeReturns := fake.resizeReturns 985 return fakeReturns.result1 986 } 987 988 func (fake *FakeTask) ResizeCallCount() int { 989 fake.resizeMutex.RLock() 990 defer fake.resizeMutex.RUnlock() 991 return len(fake.resizeArgsForCall) 992 } 993 994 func (fake *FakeTask) ResizeCalls(stub func(context.Context, uint32, uint32) error) { 995 fake.resizeMutex.Lock() 996 defer fake.resizeMutex.Unlock() 997 fake.ResizeStub = stub 998 } 999 1000 func (fake *FakeTask) ResizeArgsForCall(i int) (context.Context, uint32, uint32) { 1001 fake.resizeMutex.RLock() 1002 defer fake.resizeMutex.RUnlock() 1003 argsForCall := fake.resizeArgsForCall[i] 1004 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 1005 } 1006 1007 func (fake *FakeTask) ResizeReturns(result1 error) { 1008 fake.resizeMutex.Lock() 1009 defer fake.resizeMutex.Unlock() 1010 fake.ResizeStub = nil 1011 fake.resizeReturns = struct { 1012 result1 error 1013 }{result1} 1014 } 1015 1016 func (fake *FakeTask) ResizeReturnsOnCall(i int, result1 error) { 1017 fake.resizeMutex.Lock() 1018 defer fake.resizeMutex.Unlock() 1019 fake.ResizeStub = nil 1020 if fake.resizeReturnsOnCall == nil { 1021 fake.resizeReturnsOnCall = make(map[int]struct { 1022 result1 error 1023 }) 1024 } 1025 fake.resizeReturnsOnCall[i] = struct { 1026 result1 error 1027 }{result1} 1028 } 1029 1030 func (fake *FakeTask) Resume(arg1 context.Context) error { 1031 fake.resumeMutex.Lock() 1032 ret, specificReturn := fake.resumeReturnsOnCall[len(fake.resumeArgsForCall)] 1033 fake.resumeArgsForCall = append(fake.resumeArgsForCall, struct { 1034 arg1 context.Context 1035 }{arg1}) 1036 fake.recordInvocation("Resume", []interface{}{arg1}) 1037 fake.resumeMutex.Unlock() 1038 if fake.ResumeStub != nil { 1039 return fake.ResumeStub(arg1) 1040 } 1041 if specificReturn { 1042 return ret.result1 1043 } 1044 fakeReturns := fake.resumeReturns 1045 return fakeReturns.result1 1046 } 1047 1048 func (fake *FakeTask) ResumeCallCount() int { 1049 fake.resumeMutex.RLock() 1050 defer fake.resumeMutex.RUnlock() 1051 return len(fake.resumeArgsForCall) 1052 } 1053 1054 func (fake *FakeTask) ResumeCalls(stub func(context.Context) error) { 1055 fake.resumeMutex.Lock() 1056 defer fake.resumeMutex.Unlock() 1057 fake.ResumeStub = stub 1058 } 1059 1060 func (fake *FakeTask) ResumeArgsForCall(i int) context.Context { 1061 fake.resumeMutex.RLock() 1062 defer fake.resumeMutex.RUnlock() 1063 argsForCall := fake.resumeArgsForCall[i] 1064 return argsForCall.arg1 1065 } 1066 1067 func (fake *FakeTask) ResumeReturns(result1 error) { 1068 fake.resumeMutex.Lock() 1069 defer fake.resumeMutex.Unlock() 1070 fake.ResumeStub = nil 1071 fake.resumeReturns = struct { 1072 result1 error 1073 }{result1} 1074 } 1075 1076 func (fake *FakeTask) ResumeReturnsOnCall(i int, result1 error) { 1077 fake.resumeMutex.Lock() 1078 defer fake.resumeMutex.Unlock() 1079 fake.ResumeStub = nil 1080 if fake.resumeReturnsOnCall == nil { 1081 fake.resumeReturnsOnCall = make(map[int]struct { 1082 result1 error 1083 }) 1084 } 1085 fake.resumeReturnsOnCall[i] = struct { 1086 result1 error 1087 }{result1} 1088 } 1089 1090 func (fake *FakeTask) Start(arg1 context.Context) error { 1091 fake.startMutex.Lock() 1092 ret, specificReturn := fake.startReturnsOnCall[len(fake.startArgsForCall)] 1093 fake.startArgsForCall = append(fake.startArgsForCall, struct { 1094 arg1 context.Context 1095 }{arg1}) 1096 fake.recordInvocation("Start", []interface{}{arg1}) 1097 fake.startMutex.Unlock() 1098 if fake.StartStub != nil { 1099 return fake.StartStub(arg1) 1100 } 1101 if specificReturn { 1102 return ret.result1 1103 } 1104 fakeReturns := fake.startReturns 1105 return fakeReturns.result1 1106 } 1107 1108 func (fake *FakeTask) StartCallCount() int { 1109 fake.startMutex.RLock() 1110 defer fake.startMutex.RUnlock() 1111 return len(fake.startArgsForCall) 1112 } 1113 1114 func (fake *FakeTask) StartCalls(stub func(context.Context) error) { 1115 fake.startMutex.Lock() 1116 defer fake.startMutex.Unlock() 1117 fake.StartStub = stub 1118 } 1119 1120 func (fake *FakeTask) StartArgsForCall(i int) context.Context { 1121 fake.startMutex.RLock() 1122 defer fake.startMutex.RUnlock() 1123 argsForCall := fake.startArgsForCall[i] 1124 return argsForCall.arg1 1125 } 1126 1127 func (fake *FakeTask) StartReturns(result1 error) { 1128 fake.startMutex.Lock() 1129 defer fake.startMutex.Unlock() 1130 fake.StartStub = nil 1131 fake.startReturns = struct { 1132 result1 error 1133 }{result1} 1134 } 1135 1136 func (fake *FakeTask) StartReturnsOnCall(i int, result1 error) { 1137 fake.startMutex.Lock() 1138 defer fake.startMutex.Unlock() 1139 fake.StartStub = nil 1140 if fake.startReturnsOnCall == nil { 1141 fake.startReturnsOnCall = make(map[int]struct { 1142 result1 error 1143 }) 1144 } 1145 fake.startReturnsOnCall[i] = struct { 1146 result1 error 1147 }{result1} 1148 } 1149 1150 func (fake *FakeTask) Status(arg1 context.Context) (containerd.Status, error) { 1151 fake.statusMutex.Lock() 1152 ret, specificReturn := fake.statusReturnsOnCall[len(fake.statusArgsForCall)] 1153 fake.statusArgsForCall = append(fake.statusArgsForCall, struct { 1154 arg1 context.Context 1155 }{arg1}) 1156 fake.recordInvocation("Status", []interface{}{arg1}) 1157 fake.statusMutex.Unlock() 1158 if fake.StatusStub != nil { 1159 return fake.StatusStub(arg1) 1160 } 1161 if specificReturn { 1162 return ret.result1, ret.result2 1163 } 1164 fakeReturns := fake.statusReturns 1165 return fakeReturns.result1, fakeReturns.result2 1166 } 1167 1168 func (fake *FakeTask) StatusCallCount() int { 1169 fake.statusMutex.RLock() 1170 defer fake.statusMutex.RUnlock() 1171 return len(fake.statusArgsForCall) 1172 } 1173 1174 func (fake *FakeTask) StatusCalls(stub func(context.Context) (containerd.Status, error)) { 1175 fake.statusMutex.Lock() 1176 defer fake.statusMutex.Unlock() 1177 fake.StatusStub = stub 1178 } 1179 1180 func (fake *FakeTask) StatusArgsForCall(i int) context.Context { 1181 fake.statusMutex.RLock() 1182 defer fake.statusMutex.RUnlock() 1183 argsForCall := fake.statusArgsForCall[i] 1184 return argsForCall.arg1 1185 } 1186 1187 func (fake *FakeTask) StatusReturns(result1 containerd.Status, result2 error) { 1188 fake.statusMutex.Lock() 1189 defer fake.statusMutex.Unlock() 1190 fake.StatusStub = nil 1191 fake.statusReturns = struct { 1192 result1 containerd.Status 1193 result2 error 1194 }{result1, result2} 1195 } 1196 1197 func (fake *FakeTask) StatusReturnsOnCall(i int, result1 containerd.Status, result2 error) { 1198 fake.statusMutex.Lock() 1199 defer fake.statusMutex.Unlock() 1200 fake.StatusStub = nil 1201 if fake.statusReturnsOnCall == nil { 1202 fake.statusReturnsOnCall = make(map[int]struct { 1203 result1 containerd.Status 1204 result2 error 1205 }) 1206 } 1207 fake.statusReturnsOnCall[i] = struct { 1208 result1 containerd.Status 1209 result2 error 1210 }{result1, result2} 1211 } 1212 1213 func (fake *FakeTask) Update(arg1 context.Context, arg2 ...containerd.UpdateTaskOpts) error { 1214 fake.updateMutex.Lock() 1215 ret, specificReturn := fake.updateReturnsOnCall[len(fake.updateArgsForCall)] 1216 fake.updateArgsForCall = append(fake.updateArgsForCall, struct { 1217 arg1 context.Context 1218 arg2 []containerd.UpdateTaskOpts 1219 }{arg1, arg2}) 1220 fake.recordInvocation("Update", []interface{}{arg1, arg2}) 1221 fake.updateMutex.Unlock() 1222 if fake.UpdateStub != nil { 1223 return fake.UpdateStub(arg1, arg2...) 1224 } 1225 if specificReturn { 1226 return ret.result1 1227 } 1228 fakeReturns := fake.updateReturns 1229 return fakeReturns.result1 1230 } 1231 1232 func (fake *FakeTask) UpdateCallCount() int { 1233 fake.updateMutex.RLock() 1234 defer fake.updateMutex.RUnlock() 1235 return len(fake.updateArgsForCall) 1236 } 1237 1238 func (fake *FakeTask) UpdateCalls(stub func(context.Context, ...containerd.UpdateTaskOpts) error) { 1239 fake.updateMutex.Lock() 1240 defer fake.updateMutex.Unlock() 1241 fake.UpdateStub = stub 1242 } 1243 1244 func (fake *FakeTask) UpdateArgsForCall(i int) (context.Context, []containerd.UpdateTaskOpts) { 1245 fake.updateMutex.RLock() 1246 defer fake.updateMutex.RUnlock() 1247 argsForCall := fake.updateArgsForCall[i] 1248 return argsForCall.arg1, argsForCall.arg2 1249 } 1250 1251 func (fake *FakeTask) UpdateReturns(result1 error) { 1252 fake.updateMutex.Lock() 1253 defer fake.updateMutex.Unlock() 1254 fake.UpdateStub = nil 1255 fake.updateReturns = struct { 1256 result1 error 1257 }{result1} 1258 } 1259 1260 func (fake *FakeTask) UpdateReturnsOnCall(i int, result1 error) { 1261 fake.updateMutex.Lock() 1262 defer fake.updateMutex.Unlock() 1263 fake.UpdateStub = nil 1264 if fake.updateReturnsOnCall == nil { 1265 fake.updateReturnsOnCall = make(map[int]struct { 1266 result1 error 1267 }) 1268 } 1269 fake.updateReturnsOnCall[i] = struct { 1270 result1 error 1271 }{result1} 1272 } 1273 1274 func (fake *FakeTask) Wait(arg1 context.Context) (<-chan containerd.ExitStatus, error) { 1275 fake.waitMutex.Lock() 1276 ret, specificReturn := fake.waitReturnsOnCall[len(fake.waitArgsForCall)] 1277 fake.waitArgsForCall = append(fake.waitArgsForCall, struct { 1278 arg1 context.Context 1279 }{arg1}) 1280 fake.recordInvocation("Wait", []interface{}{arg1}) 1281 fake.waitMutex.Unlock() 1282 if fake.WaitStub != nil { 1283 return fake.WaitStub(arg1) 1284 } 1285 if specificReturn { 1286 return ret.result1, ret.result2 1287 } 1288 fakeReturns := fake.waitReturns 1289 return fakeReturns.result1, fakeReturns.result2 1290 } 1291 1292 func (fake *FakeTask) WaitCallCount() int { 1293 fake.waitMutex.RLock() 1294 defer fake.waitMutex.RUnlock() 1295 return len(fake.waitArgsForCall) 1296 } 1297 1298 func (fake *FakeTask) WaitCalls(stub func(context.Context) (<-chan containerd.ExitStatus, error)) { 1299 fake.waitMutex.Lock() 1300 defer fake.waitMutex.Unlock() 1301 fake.WaitStub = stub 1302 } 1303 1304 func (fake *FakeTask) WaitArgsForCall(i int) context.Context { 1305 fake.waitMutex.RLock() 1306 defer fake.waitMutex.RUnlock() 1307 argsForCall := fake.waitArgsForCall[i] 1308 return argsForCall.arg1 1309 } 1310 1311 func (fake *FakeTask) WaitReturns(result1 <-chan containerd.ExitStatus, result2 error) { 1312 fake.waitMutex.Lock() 1313 defer fake.waitMutex.Unlock() 1314 fake.WaitStub = nil 1315 fake.waitReturns = struct { 1316 result1 <-chan containerd.ExitStatus 1317 result2 error 1318 }{result1, result2} 1319 } 1320 1321 func (fake *FakeTask) WaitReturnsOnCall(i int, result1 <-chan containerd.ExitStatus, result2 error) { 1322 fake.waitMutex.Lock() 1323 defer fake.waitMutex.Unlock() 1324 fake.WaitStub = nil 1325 if fake.waitReturnsOnCall == nil { 1326 fake.waitReturnsOnCall = make(map[int]struct { 1327 result1 <-chan containerd.ExitStatus 1328 result2 error 1329 }) 1330 } 1331 fake.waitReturnsOnCall[i] = struct { 1332 result1 <-chan containerd.ExitStatus 1333 result2 error 1334 }{result1, result2} 1335 } 1336 1337 func (fake *FakeTask) Invocations() map[string][][]interface{} { 1338 fake.invocationsMutex.RLock() 1339 defer fake.invocationsMutex.RUnlock() 1340 fake.checkpointMutex.RLock() 1341 defer fake.checkpointMutex.RUnlock() 1342 fake.closeIOMutex.RLock() 1343 defer fake.closeIOMutex.RUnlock() 1344 fake.deleteMutex.RLock() 1345 defer fake.deleteMutex.RUnlock() 1346 fake.execMutex.RLock() 1347 defer fake.execMutex.RUnlock() 1348 fake.iDMutex.RLock() 1349 defer fake.iDMutex.RUnlock() 1350 fake.iOMutex.RLock() 1351 defer fake.iOMutex.RUnlock() 1352 fake.killMutex.RLock() 1353 defer fake.killMutex.RUnlock() 1354 fake.loadProcessMutex.RLock() 1355 defer fake.loadProcessMutex.RUnlock() 1356 fake.metricsMutex.RLock() 1357 defer fake.metricsMutex.RUnlock() 1358 fake.pauseMutex.RLock() 1359 defer fake.pauseMutex.RUnlock() 1360 fake.pidMutex.RLock() 1361 defer fake.pidMutex.RUnlock() 1362 fake.pidsMutex.RLock() 1363 defer fake.pidsMutex.RUnlock() 1364 fake.resizeMutex.RLock() 1365 defer fake.resizeMutex.RUnlock() 1366 fake.resumeMutex.RLock() 1367 defer fake.resumeMutex.RUnlock() 1368 fake.startMutex.RLock() 1369 defer fake.startMutex.RUnlock() 1370 fake.statusMutex.RLock() 1371 defer fake.statusMutex.RUnlock() 1372 fake.updateMutex.RLock() 1373 defer fake.updateMutex.RUnlock() 1374 fake.waitMutex.RLock() 1375 defer fake.waitMutex.RUnlock() 1376 copiedInvocations := map[string][][]interface{}{} 1377 for key, value := range fake.invocations { 1378 copiedInvocations[key] = value 1379 } 1380 return copiedInvocations 1381 } 1382 1383 func (fake *FakeTask) recordInvocation(key string, args []interface{}) { 1384 fake.invocationsMutex.Lock() 1385 defer fake.invocationsMutex.Unlock() 1386 if fake.invocations == nil { 1387 fake.invocations = map[string][][]interface{}{} 1388 } 1389 if fake.invocations[key] == nil { 1390 fake.invocations[key] = [][]interface{}{} 1391 } 1392 fake.invocations[key] = append(fake.invocations[key], args) 1393 } 1394 1395 var _ containerd.Task = new(FakeTask)