MCPcopy Create free account
hub / github.com/apache/mesos / setup

Method setup

src/tests/containerizer.cpp:387–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385
386
387void 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
432Future<Nothing> TestContainerizer::_recover(

Callers

nothing calls this directly

Calls 10

InvokeClass · 0.85
statusFunction · 0.85
attachFunction · 0.85
destroyFunction · 0.85
recoverFunction · 0.50
usageFunction · 0.50
updateFunction · 0.50
launchFunction · 0.50
waitFunction · 0.50
killFunction · 0.50

Tested by

no test coverage detected