| 385 | |
| 386 | |
| 387 | void TestContainerizer::setup() |
| 388 | { |
| 389 | // NOTE: We use 'EXPECT_CALL' and 'WillRepeatedly' here instead of |
| 390 | // 'ON_CALL' and 'WillByDefault' because the latter gives the gmock |
| 391 | // warning "Uninteresting mock function call" unless each tests puts |
| 392 | // the expectations in place which would make the tests much more |
| 393 | // verbose. |
| 394 | // |
| 395 | // TODO(bmahler): Update this to use the same style as the |
| 396 | // TestAllocator, which allows us to have default actions |
| 397 | // 'DoDefault', without requiring each test to put expectations in |
| 398 | // place. |
| 399 | |
| 400 | EXPECT_CALL(*this, recover(_)) |
| 401 | .WillRepeatedly(Invoke(this, &TestContainerizer::_recover)); |
| 402 | |
| 403 | EXPECT_CALL(*this, usage(_)) |
| 404 | .WillRepeatedly(Invoke(this, &TestContainerizer::_usage)); |
| 405 | |
| 406 | EXPECT_CALL(*this, status(_)) |
| 407 | .WillRepeatedly(Invoke(this, &TestContainerizer::_status)); |
| 408 | |
| 409 | EXPECT_CALL(*this, update(_, _, _)) |
| 410 | .WillRepeatedly(Invoke(this, &TestContainerizer::_update)); |
| 411 | |
| 412 | EXPECT_CALL(*this, launch(_, _, _, _)) |
| 413 | .WillRepeatedly(Invoke(this, &TestContainerizer::_launch)); |
| 414 | |
| 415 | EXPECT_CALL(*this, attach(_)) |
| 416 | .WillRepeatedly(Invoke(this, &TestContainerizer::_attach)); |
| 417 | |
| 418 | EXPECT_CALL(*this, wait(_)) |
| 419 | .WillRepeatedly(Invoke(this, &TestContainerizer::_wait)); |
| 420 | |
| 421 | EXPECT_CALL(*this, destroy(_)) |
| 422 | .WillRepeatedly(Invoke(this, &TestContainerizer::_destroy)); |
| 423 | |
| 424 | EXPECT_CALL(*this, kill(_, _)) |
| 425 | .WillRepeatedly(Invoke(this, &TestContainerizer::_kill)); |
| 426 | |
| 427 | EXPECT_CALL(*this, pruneImages(_)) |
| 428 | .WillRepeatedly(Invoke(this, &TestContainerizer::_pruneImages)); |
| 429 | } |
| 430 | |
| 431 | |
| 432 | Future<Nothing> TestContainerizer::_recover( |