Merge "add more test cases to improve the test code coverage #3"
This commit is contained in:
commit
c535527048
@ -28,6 +28,7 @@ from stevedore.tests import manager as extension_tests
|
||||
|
||||
from ceilometer import sample
|
||||
from ceilometer import pipeline
|
||||
from ceilometer import agent
|
||||
from ceilometer.tests import base
|
||||
from ceilometer import transformer
|
||||
|
||||
@ -246,6 +247,13 @@ class BaseAgentManagerTestCase(base.TestCase):
|
||||
pub = self.mgr.pipeline_manager.pipelines[0].publishers[0]
|
||||
self.assertEqual(len(pub.samples), 0)
|
||||
|
||||
def test_agent_manager_initialize_service_hook(self):
|
||||
mgr = agent.AgentManager(self.mgr.pollster_manager)
|
||||
mgr.create_polling_task = mock.MagicMock()
|
||||
service = mock.MagicMock()
|
||||
mgr.initialize_service_hook(service)
|
||||
self.assertTrue(service.tg.add_timer.called)
|
||||
|
||||
def test_manager_exception_persistency(self):
|
||||
self.pipeline_cfg.append({
|
||||
'name': "test_pipeline",
|
||||
|
Loading…
Reference in New Issue
Block a user