github.com/chenbh/concourse/v6@v6.4.2/worker/runtime/libcontainerd/libcontainerdfakes/fake_process.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/cio" 11 ) 12 13 type FakeProcess struct { 14 CloseIOStub func(context.Context, ...containerd.IOCloserOpts) error 15 closeIOMutex sync.RWMutex 16 closeIOArgsForCall []struct { 17 arg1 context.Context 18 arg2 []containerd.IOCloserOpts 19 } 20 closeIOReturns struct { 21 result1 error 22 } 23 closeIOReturnsOnCall map[int]struct { 24 result1 error 25 } 26 DeleteStub func(context.Context, ...containerd.ProcessDeleteOpts) (*containerd.ExitStatus, error) 27 deleteMutex sync.RWMutex 28 deleteArgsForCall []struct { 29 arg1 context.Context 30 arg2 []containerd.ProcessDeleteOpts 31 } 32 deleteReturns struct { 33 result1 *containerd.ExitStatus 34 result2 error 35 } 36 deleteReturnsOnCall map[int]struct { 37 result1 *containerd.ExitStatus 38 result2 error 39 } 40 IDStub func() string 41 iDMutex sync.RWMutex 42 iDArgsForCall []struct { 43 } 44 iDReturns struct { 45 result1 string 46 } 47 iDReturnsOnCall map[int]struct { 48 result1 string 49 } 50 IOStub func() cio.IO 51 iOMutex sync.RWMutex 52 iOArgsForCall []struct { 53 } 54 iOReturns struct { 55 result1 cio.IO 56 } 57 iOReturnsOnCall map[int]struct { 58 result1 cio.IO 59 } 60 KillStub func(context.Context, syscall.Signal, ...containerd.KillOpts) error 61 killMutex sync.RWMutex 62 killArgsForCall []struct { 63 arg1 context.Context 64 arg2 syscall.Signal 65 arg3 []containerd.KillOpts 66 } 67 killReturns struct { 68 result1 error 69 } 70 killReturnsOnCall map[int]struct { 71 result1 error 72 } 73 PidStub func() uint32 74 pidMutex sync.RWMutex 75 pidArgsForCall []struct { 76 } 77 pidReturns struct { 78 result1 uint32 79 } 80 pidReturnsOnCall map[int]struct { 81 result1 uint32 82 } 83 ResizeStub func(context.Context, uint32, uint32) error 84 resizeMutex sync.RWMutex 85 resizeArgsForCall []struct { 86 arg1 context.Context 87 arg2 uint32 88 arg3 uint32 89 } 90 resizeReturns struct { 91 result1 error 92 } 93 resizeReturnsOnCall map[int]struct { 94 result1 error 95 } 96 StartStub func(context.Context) error 97 startMutex sync.RWMutex 98 startArgsForCall []struct { 99 arg1 context.Context 100 } 101 startReturns struct { 102 result1 error 103 } 104 startReturnsOnCall map[int]struct { 105 result1 error 106 } 107 StatusStub func(context.Context) (containerd.Status, error) 108 statusMutex sync.RWMutex 109 statusArgsForCall []struct { 110 arg1 context.Context 111 } 112 statusReturns struct { 113 result1 containerd.Status 114 result2 error 115 } 116 statusReturnsOnCall map[int]struct { 117 result1 containerd.Status 118 result2 error 119 } 120 WaitStub func(context.Context) (<-chan containerd.ExitStatus, error) 121 waitMutex sync.RWMutex 122 waitArgsForCall []struct { 123 arg1 context.Context 124 } 125 waitReturns struct { 126 result1 <-chan containerd.ExitStatus 127 result2 error 128 } 129 waitReturnsOnCall map[int]struct { 130 result1 <-chan containerd.ExitStatus 131 result2 error 132 } 133 invocations map[string][][]interface{} 134 invocationsMutex sync.RWMutex 135 } 136 137 func (fake *FakeProcess) CloseIO(arg1 context.Context, arg2 ...containerd.IOCloserOpts) error { 138 fake.closeIOMutex.Lock() 139 ret, specificReturn := fake.closeIOReturnsOnCall[len(fake.closeIOArgsForCall)] 140 fake.closeIOArgsForCall = append(fake.closeIOArgsForCall, struct { 141 arg1 context.Context 142 arg2 []containerd.IOCloserOpts 143 }{arg1, arg2}) 144 fake.recordInvocation("CloseIO", []interface{}{arg1, arg2}) 145 fake.closeIOMutex.Unlock() 146 if fake.CloseIOStub != nil { 147 return fake.CloseIOStub(arg1, arg2...) 148 } 149 if specificReturn { 150 return ret.result1 151 } 152 fakeReturns := fake.closeIOReturns 153 return fakeReturns.result1 154 } 155 156 func (fake *FakeProcess) CloseIOCallCount() int { 157 fake.closeIOMutex.RLock() 158 defer fake.closeIOMutex.RUnlock() 159 return len(fake.closeIOArgsForCall) 160 } 161 162 func (fake *FakeProcess) CloseIOCalls(stub func(context.Context, ...containerd.IOCloserOpts) error) { 163 fake.closeIOMutex.Lock() 164 defer fake.closeIOMutex.Unlock() 165 fake.CloseIOStub = stub 166 } 167 168 func (fake *FakeProcess) CloseIOArgsForCall(i int) (context.Context, []containerd.IOCloserOpts) { 169 fake.closeIOMutex.RLock() 170 defer fake.closeIOMutex.RUnlock() 171 argsForCall := fake.closeIOArgsForCall[i] 172 return argsForCall.arg1, argsForCall.arg2 173 } 174 175 func (fake *FakeProcess) CloseIOReturns(result1 error) { 176 fake.closeIOMutex.Lock() 177 defer fake.closeIOMutex.Unlock() 178 fake.CloseIOStub = nil 179 fake.closeIOReturns = struct { 180 result1 error 181 }{result1} 182 } 183 184 func (fake *FakeProcess) CloseIOReturnsOnCall(i int, result1 error) { 185 fake.closeIOMutex.Lock() 186 defer fake.closeIOMutex.Unlock() 187 fake.CloseIOStub = nil 188 if fake.closeIOReturnsOnCall == nil { 189 fake.closeIOReturnsOnCall = make(map[int]struct { 190 result1 error 191 }) 192 } 193 fake.closeIOReturnsOnCall[i] = struct { 194 result1 error 195 }{result1} 196 } 197 198 func (fake *FakeProcess) Delete(arg1 context.Context, arg2 ...containerd.ProcessDeleteOpts) (*containerd.ExitStatus, error) { 199 fake.deleteMutex.Lock() 200 ret, specificReturn := fake.deleteReturnsOnCall[len(fake.deleteArgsForCall)] 201 fake.deleteArgsForCall = append(fake.deleteArgsForCall, struct { 202 arg1 context.Context 203 arg2 []containerd.ProcessDeleteOpts 204 }{arg1, arg2}) 205 fake.recordInvocation("Delete", []interface{}{arg1, arg2}) 206 fake.deleteMutex.Unlock() 207 if fake.DeleteStub != nil { 208 return fake.DeleteStub(arg1, arg2...) 209 } 210 if specificReturn { 211 return ret.result1, ret.result2 212 } 213 fakeReturns := fake.deleteReturns 214 return fakeReturns.result1, fakeReturns.result2 215 } 216 217 func (fake *FakeProcess) DeleteCallCount() int { 218 fake.deleteMutex.RLock() 219 defer fake.deleteMutex.RUnlock() 220 return len(fake.deleteArgsForCall) 221 } 222 223 func (fake *FakeProcess) DeleteCalls(stub func(context.Context, ...containerd.ProcessDeleteOpts) (*containerd.ExitStatus, error)) { 224 fake.deleteMutex.Lock() 225 defer fake.deleteMutex.Unlock() 226 fake.DeleteStub = stub 227 } 228 229 func (fake *FakeProcess) DeleteArgsForCall(i int) (context.Context, []containerd.ProcessDeleteOpts) { 230 fake.deleteMutex.RLock() 231 defer fake.deleteMutex.RUnlock() 232 argsForCall := fake.deleteArgsForCall[i] 233 return argsForCall.arg1, argsForCall.arg2 234 } 235 236 func (fake *FakeProcess) DeleteReturns(result1 *containerd.ExitStatus, result2 error) { 237 fake.deleteMutex.Lock() 238 defer fake.deleteMutex.Unlock() 239 fake.DeleteStub = nil 240 fake.deleteReturns = struct { 241 result1 *containerd.ExitStatus 242 result2 error 243 }{result1, result2} 244 } 245 246 func (fake *FakeProcess) DeleteReturnsOnCall(i int, result1 *containerd.ExitStatus, result2 error) { 247 fake.deleteMutex.Lock() 248 defer fake.deleteMutex.Unlock() 249 fake.DeleteStub = nil 250 if fake.deleteReturnsOnCall == nil { 251 fake.deleteReturnsOnCall = make(map[int]struct { 252 result1 *containerd.ExitStatus 253 result2 error 254 }) 255 } 256 fake.deleteReturnsOnCall[i] = struct { 257 result1 *containerd.ExitStatus 258 result2 error 259 }{result1, result2} 260 } 261 262 func (fake *FakeProcess) ID() string { 263 fake.iDMutex.Lock() 264 ret, specificReturn := fake.iDReturnsOnCall[len(fake.iDArgsForCall)] 265 fake.iDArgsForCall = append(fake.iDArgsForCall, struct { 266 }{}) 267 fake.recordInvocation("ID", []interface{}{}) 268 fake.iDMutex.Unlock() 269 if fake.IDStub != nil { 270 return fake.IDStub() 271 } 272 if specificReturn { 273 return ret.result1 274 } 275 fakeReturns := fake.iDReturns 276 return fakeReturns.result1 277 } 278 279 func (fake *FakeProcess) IDCallCount() int { 280 fake.iDMutex.RLock() 281 defer fake.iDMutex.RUnlock() 282 return len(fake.iDArgsForCall) 283 } 284 285 func (fake *FakeProcess) IDCalls(stub func() string) { 286 fake.iDMutex.Lock() 287 defer fake.iDMutex.Unlock() 288 fake.IDStub = stub 289 } 290 291 func (fake *FakeProcess) IDReturns(result1 string) { 292 fake.iDMutex.Lock() 293 defer fake.iDMutex.Unlock() 294 fake.IDStub = nil 295 fake.iDReturns = struct { 296 result1 string 297 }{result1} 298 } 299 300 func (fake *FakeProcess) IDReturnsOnCall(i int, result1 string) { 301 fake.iDMutex.Lock() 302 defer fake.iDMutex.Unlock() 303 fake.IDStub = nil 304 if fake.iDReturnsOnCall == nil { 305 fake.iDReturnsOnCall = make(map[int]struct { 306 result1 string 307 }) 308 } 309 fake.iDReturnsOnCall[i] = struct { 310 result1 string 311 }{result1} 312 } 313 314 func (fake *FakeProcess) IO() cio.IO { 315 fake.iOMutex.Lock() 316 ret, specificReturn := fake.iOReturnsOnCall[len(fake.iOArgsForCall)] 317 fake.iOArgsForCall = append(fake.iOArgsForCall, struct { 318 }{}) 319 fake.recordInvocation("IO", []interface{}{}) 320 fake.iOMutex.Unlock() 321 if fake.IOStub != nil { 322 return fake.IOStub() 323 } 324 if specificReturn { 325 return ret.result1 326 } 327 fakeReturns := fake.iOReturns 328 return fakeReturns.result1 329 } 330 331 func (fake *FakeProcess) IOCallCount() int { 332 fake.iOMutex.RLock() 333 defer fake.iOMutex.RUnlock() 334 return len(fake.iOArgsForCall) 335 } 336 337 func (fake *FakeProcess) IOCalls(stub func() cio.IO) { 338 fake.iOMutex.Lock() 339 defer fake.iOMutex.Unlock() 340 fake.IOStub = stub 341 } 342 343 func (fake *FakeProcess) IOReturns(result1 cio.IO) { 344 fake.iOMutex.Lock() 345 defer fake.iOMutex.Unlock() 346 fake.IOStub = nil 347 fake.iOReturns = struct { 348 result1 cio.IO 349 }{result1} 350 } 351 352 func (fake *FakeProcess) IOReturnsOnCall(i int, result1 cio.IO) { 353 fake.iOMutex.Lock() 354 defer fake.iOMutex.Unlock() 355 fake.IOStub = nil 356 if fake.iOReturnsOnCall == nil { 357 fake.iOReturnsOnCall = make(map[int]struct { 358 result1 cio.IO 359 }) 360 } 361 fake.iOReturnsOnCall[i] = struct { 362 result1 cio.IO 363 }{result1} 364 } 365 366 func (fake *FakeProcess) Kill(arg1 context.Context, arg2 syscall.Signal, arg3 ...containerd.KillOpts) error { 367 fake.killMutex.Lock() 368 ret, specificReturn := fake.killReturnsOnCall[len(fake.killArgsForCall)] 369 fake.killArgsForCall = append(fake.killArgsForCall, struct { 370 arg1 context.Context 371 arg2 syscall.Signal 372 arg3 []containerd.KillOpts 373 }{arg1, arg2, arg3}) 374 fake.recordInvocation("Kill", []interface{}{arg1, arg2, arg3}) 375 fake.killMutex.Unlock() 376 if fake.KillStub != nil { 377 return fake.KillStub(arg1, arg2, arg3...) 378 } 379 if specificReturn { 380 return ret.result1 381 } 382 fakeReturns := fake.killReturns 383 return fakeReturns.result1 384 } 385 386 func (fake *FakeProcess) KillCallCount() int { 387 fake.killMutex.RLock() 388 defer fake.killMutex.RUnlock() 389 return len(fake.killArgsForCall) 390 } 391 392 func (fake *FakeProcess) KillCalls(stub func(context.Context, syscall.Signal, ...containerd.KillOpts) error) { 393 fake.killMutex.Lock() 394 defer fake.killMutex.Unlock() 395 fake.KillStub = stub 396 } 397 398 func (fake *FakeProcess) KillArgsForCall(i int) (context.Context, syscall.Signal, []containerd.KillOpts) { 399 fake.killMutex.RLock() 400 defer fake.killMutex.RUnlock() 401 argsForCall := fake.killArgsForCall[i] 402 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 403 } 404 405 func (fake *FakeProcess) KillReturns(result1 error) { 406 fake.killMutex.Lock() 407 defer fake.killMutex.Unlock() 408 fake.KillStub = nil 409 fake.killReturns = struct { 410 result1 error 411 }{result1} 412 } 413 414 func (fake *FakeProcess) KillReturnsOnCall(i int, result1 error) { 415 fake.killMutex.Lock() 416 defer fake.killMutex.Unlock() 417 fake.KillStub = nil 418 if fake.killReturnsOnCall == nil { 419 fake.killReturnsOnCall = make(map[int]struct { 420 result1 error 421 }) 422 } 423 fake.killReturnsOnCall[i] = struct { 424 result1 error 425 }{result1} 426 } 427 428 func (fake *FakeProcess) Pid() uint32 { 429 fake.pidMutex.Lock() 430 ret, specificReturn := fake.pidReturnsOnCall[len(fake.pidArgsForCall)] 431 fake.pidArgsForCall = append(fake.pidArgsForCall, struct { 432 }{}) 433 fake.recordInvocation("Pid", []interface{}{}) 434 fake.pidMutex.Unlock() 435 if fake.PidStub != nil { 436 return fake.PidStub() 437 } 438 if specificReturn { 439 return ret.result1 440 } 441 fakeReturns := fake.pidReturns 442 return fakeReturns.result1 443 } 444 445 func (fake *FakeProcess) PidCallCount() int { 446 fake.pidMutex.RLock() 447 defer fake.pidMutex.RUnlock() 448 return len(fake.pidArgsForCall) 449 } 450 451 func (fake *FakeProcess) PidCalls(stub func() uint32) { 452 fake.pidMutex.Lock() 453 defer fake.pidMutex.Unlock() 454 fake.PidStub = stub 455 } 456 457 func (fake *FakeProcess) PidReturns(result1 uint32) { 458 fake.pidMutex.Lock() 459 defer fake.pidMutex.Unlock() 460 fake.PidStub = nil 461 fake.pidReturns = struct { 462 result1 uint32 463 }{result1} 464 } 465 466 func (fake *FakeProcess) PidReturnsOnCall(i int, result1 uint32) { 467 fake.pidMutex.Lock() 468 defer fake.pidMutex.Unlock() 469 fake.PidStub = nil 470 if fake.pidReturnsOnCall == nil { 471 fake.pidReturnsOnCall = make(map[int]struct { 472 result1 uint32 473 }) 474 } 475 fake.pidReturnsOnCall[i] = struct { 476 result1 uint32 477 }{result1} 478 } 479 480 func (fake *FakeProcess) Resize(arg1 context.Context, arg2 uint32, arg3 uint32) error { 481 fake.resizeMutex.Lock() 482 ret, specificReturn := fake.resizeReturnsOnCall[len(fake.resizeArgsForCall)] 483 fake.resizeArgsForCall = append(fake.resizeArgsForCall, struct { 484 arg1 context.Context 485 arg2 uint32 486 arg3 uint32 487 }{arg1, arg2, arg3}) 488 fake.recordInvocation("Resize", []interface{}{arg1, arg2, arg3}) 489 fake.resizeMutex.Unlock() 490 if fake.ResizeStub != nil { 491 return fake.ResizeStub(arg1, arg2, arg3) 492 } 493 if specificReturn { 494 return ret.result1 495 } 496 fakeReturns := fake.resizeReturns 497 return fakeReturns.result1 498 } 499 500 func (fake *FakeProcess) ResizeCallCount() int { 501 fake.resizeMutex.RLock() 502 defer fake.resizeMutex.RUnlock() 503 return len(fake.resizeArgsForCall) 504 } 505 506 func (fake *FakeProcess) ResizeCalls(stub func(context.Context, uint32, uint32) error) { 507 fake.resizeMutex.Lock() 508 defer fake.resizeMutex.Unlock() 509 fake.ResizeStub = stub 510 } 511 512 func (fake *FakeProcess) ResizeArgsForCall(i int) (context.Context, uint32, uint32) { 513 fake.resizeMutex.RLock() 514 defer fake.resizeMutex.RUnlock() 515 argsForCall := fake.resizeArgsForCall[i] 516 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 517 } 518 519 func (fake *FakeProcess) ResizeReturns(result1 error) { 520 fake.resizeMutex.Lock() 521 defer fake.resizeMutex.Unlock() 522 fake.ResizeStub = nil 523 fake.resizeReturns = struct { 524 result1 error 525 }{result1} 526 } 527 528 func (fake *FakeProcess) ResizeReturnsOnCall(i int, result1 error) { 529 fake.resizeMutex.Lock() 530 defer fake.resizeMutex.Unlock() 531 fake.ResizeStub = nil 532 if fake.resizeReturnsOnCall == nil { 533 fake.resizeReturnsOnCall = make(map[int]struct { 534 result1 error 535 }) 536 } 537 fake.resizeReturnsOnCall[i] = struct { 538 result1 error 539 }{result1} 540 } 541 542 func (fake *FakeProcess) Start(arg1 context.Context) error { 543 fake.startMutex.Lock() 544 ret, specificReturn := fake.startReturnsOnCall[len(fake.startArgsForCall)] 545 fake.startArgsForCall = append(fake.startArgsForCall, struct { 546 arg1 context.Context 547 }{arg1}) 548 fake.recordInvocation("Start", []interface{}{arg1}) 549 fake.startMutex.Unlock() 550 if fake.StartStub != nil { 551 return fake.StartStub(arg1) 552 } 553 if specificReturn { 554 return ret.result1 555 } 556 fakeReturns := fake.startReturns 557 return fakeReturns.result1 558 } 559 560 func (fake *FakeProcess) StartCallCount() int { 561 fake.startMutex.RLock() 562 defer fake.startMutex.RUnlock() 563 return len(fake.startArgsForCall) 564 } 565 566 func (fake *FakeProcess) StartCalls(stub func(context.Context) error) { 567 fake.startMutex.Lock() 568 defer fake.startMutex.Unlock() 569 fake.StartStub = stub 570 } 571 572 func (fake *FakeProcess) StartArgsForCall(i int) context.Context { 573 fake.startMutex.RLock() 574 defer fake.startMutex.RUnlock() 575 argsForCall := fake.startArgsForCall[i] 576 return argsForCall.arg1 577 } 578 579 func (fake *FakeProcess) StartReturns(result1 error) { 580 fake.startMutex.Lock() 581 defer fake.startMutex.Unlock() 582 fake.StartStub = nil 583 fake.startReturns = struct { 584 result1 error 585 }{result1} 586 } 587 588 func (fake *FakeProcess) StartReturnsOnCall(i int, result1 error) { 589 fake.startMutex.Lock() 590 defer fake.startMutex.Unlock() 591 fake.StartStub = nil 592 if fake.startReturnsOnCall == nil { 593 fake.startReturnsOnCall = make(map[int]struct { 594 result1 error 595 }) 596 } 597 fake.startReturnsOnCall[i] = struct { 598 result1 error 599 }{result1} 600 } 601 602 func (fake *FakeProcess) Status(arg1 context.Context) (containerd.Status, error) { 603 fake.statusMutex.Lock() 604 ret, specificReturn := fake.statusReturnsOnCall[len(fake.statusArgsForCall)] 605 fake.statusArgsForCall = append(fake.statusArgsForCall, struct { 606 arg1 context.Context 607 }{arg1}) 608 fake.recordInvocation("Status", []interface{}{arg1}) 609 fake.statusMutex.Unlock() 610 if fake.StatusStub != nil { 611 return fake.StatusStub(arg1) 612 } 613 if specificReturn { 614 return ret.result1, ret.result2 615 } 616 fakeReturns := fake.statusReturns 617 return fakeReturns.result1, fakeReturns.result2 618 } 619 620 func (fake *FakeProcess) StatusCallCount() int { 621 fake.statusMutex.RLock() 622 defer fake.statusMutex.RUnlock() 623 return len(fake.statusArgsForCall) 624 } 625 626 func (fake *FakeProcess) StatusCalls(stub func(context.Context) (containerd.Status, error)) { 627 fake.statusMutex.Lock() 628 defer fake.statusMutex.Unlock() 629 fake.StatusStub = stub 630 } 631 632 func (fake *FakeProcess) StatusArgsForCall(i int) context.Context { 633 fake.statusMutex.RLock() 634 defer fake.statusMutex.RUnlock() 635 argsForCall := fake.statusArgsForCall[i] 636 return argsForCall.arg1 637 } 638 639 func (fake *FakeProcess) StatusReturns(result1 containerd.Status, result2 error) { 640 fake.statusMutex.Lock() 641 defer fake.statusMutex.Unlock() 642 fake.StatusStub = nil 643 fake.statusReturns = struct { 644 result1 containerd.Status 645 result2 error 646 }{result1, result2} 647 } 648 649 func (fake *FakeProcess) StatusReturnsOnCall(i int, result1 containerd.Status, result2 error) { 650 fake.statusMutex.Lock() 651 defer fake.statusMutex.Unlock() 652 fake.StatusStub = nil 653 if fake.statusReturnsOnCall == nil { 654 fake.statusReturnsOnCall = make(map[int]struct { 655 result1 containerd.Status 656 result2 error 657 }) 658 } 659 fake.statusReturnsOnCall[i] = struct { 660 result1 containerd.Status 661 result2 error 662 }{result1, result2} 663 } 664 665 func (fake *FakeProcess) Wait(arg1 context.Context) (<-chan containerd.ExitStatus, error) { 666 fake.waitMutex.Lock() 667 ret, specificReturn := fake.waitReturnsOnCall[len(fake.waitArgsForCall)] 668 fake.waitArgsForCall = append(fake.waitArgsForCall, struct { 669 arg1 context.Context 670 }{arg1}) 671 fake.recordInvocation("Wait", []interface{}{arg1}) 672 fake.waitMutex.Unlock() 673 if fake.WaitStub != nil { 674 return fake.WaitStub(arg1) 675 } 676 if specificReturn { 677 return ret.result1, ret.result2 678 } 679 fakeReturns := fake.waitReturns 680 return fakeReturns.result1, fakeReturns.result2 681 } 682 683 func (fake *FakeProcess) WaitCallCount() int { 684 fake.waitMutex.RLock() 685 defer fake.waitMutex.RUnlock() 686 return len(fake.waitArgsForCall) 687 } 688 689 func (fake *FakeProcess) WaitCalls(stub func(context.Context) (<-chan containerd.ExitStatus, error)) { 690 fake.waitMutex.Lock() 691 defer fake.waitMutex.Unlock() 692 fake.WaitStub = stub 693 } 694 695 func (fake *FakeProcess) WaitArgsForCall(i int) context.Context { 696 fake.waitMutex.RLock() 697 defer fake.waitMutex.RUnlock() 698 argsForCall := fake.waitArgsForCall[i] 699 return argsForCall.arg1 700 } 701 702 func (fake *FakeProcess) WaitReturns(result1 <-chan containerd.ExitStatus, result2 error) { 703 fake.waitMutex.Lock() 704 defer fake.waitMutex.Unlock() 705 fake.WaitStub = nil 706 fake.waitReturns = struct { 707 result1 <-chan containerd.ExitStatus 708 result2 error 709 }{result1, result2} 710 } 711 712 func (fake *FakeProcess) WaitReturnsOnCall(i int, result1 <-chan containerd.ExitStatus, result2 error) { 713 fake.waitMutex.Lock() 714 defer fake.waitMutex.Unlock() 715 fake.WaitStub = nil 716 if fake.waitReturnsOnCall == nil { 717 fake.waitReturnsOnCall = make(map[int]struct { 718 result1 <-chan containerd.ExitStatus 719 result2 error 720 }) 721 } 722 fake.waitReturnsOnCall[i] = struct { 723 result1 <-chan containerd.ExitStatus 724 result2 error 725 }{result1, result2} 726 } 727 728 func (fake *FakeProcess) Invocations() map[string][][]interface{} { 729 fake.invocationsMutex.RLock() 730 defer fake.invocationsMutex.RUnlock() 731 fake.closeIOMutex.RLock() 732 defer fake.closeIOMutex.RUnlock() 733 fake.deleteMutex.RLock() 734 defer fake.deleteMutex.RUnlock() 735 fake.iDMutex.RLock() 736 defer fake.iDMutex.RUnlock() 737 fake.iOMutex.RLock() 738 defer fake.iOMutex.RUnlock() 739 fake.killMutex.RLock() 740 defer fake.killMutex.RUnlock() 741 fake.pidMutex.RLock() 742 defer fake.pidMutex.RUnlock() 743 fake.resizeMutex.RLock() 744 defer fake.resizeMutex.RUnlock() 745 fake.startMutex.RLock() 746 defer fake.startMutex.RUnlock() 747 fake.statusMutex.RLock() 748 defer fake.statusMutex.RUnlock() 749 fake.waitMutex.RLock() 750 defer fake.waitMutex.RUnlock() 751 copiedInvocations := map[string][][]interface{}{} 752 for key, value := range fake.invocations { 753 copiedInvocations[key] = value 754 } 755 return copiedInvocations 756 } 757 758 func (fake *FakeProcess) recordInvocation(key string, args []interface{}) { 759 fake.invocationsMutex.Lock() 760 defer fake.invocationsMutex.Unlock() 761 if fake.invocations == nil { 762 fake.invocations = map[string][][]interface{}{} 763 } 764 if fake.invocations[key] == nil { 765 fake.invocations[key] = [][]interface{}{} 766 } 767 fake.invocations[key] = append(fake.invocations[key], args) 768 } 769 770 var _ containerd.Process = new(FakeProcess)