Fix orhestrator.api test
Change-Id: Iea876acead01ca0163aa77176a219bba93727cee
This commit is contained in:
parent
297d02bada
commit
94bb3506a4
@ -25,22 +25,14 @@ from rally import test
|
|||||||
|
|
||||||
class OrchestratorTestCase(test.NoDBTestCase):
|
class OrchestratorTestCase(test.NoDBTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(OrchestratorTestCase, self).setUp()
|
|
||||||
self.de = mock.patch('rally.deploy.EngineFactory')
|
|
||||||
self.te = mock.patch('rally.benchmark.engine.TestEngine')
|
|
||||||
self.de.start()
|
|
||||||
self.te.start()
|
|
||||||
|
|
||||||
def tearDonw(self):
|
|
||||||
self.de.stop()
|
|
||||||
self.te.stop()
|
|
||||||
super(OrchestratorTestCase, self).tearDonw()
|
|
||||||
|
|
||||||
def test_start_task(self):
|
def test_start_task(self):
|
||||||
# TODO(boris-42): Improve these tests, to check that requried mehtods
|
config = {'deploy': {'name': 'test'}, 'tests': {}}
|
||||||
# are called.
|
|
||||||
api.start_task({'deploy': {'name': 'test'}, 'tests': {}})
|
with mock.patch("rally.orchestrator.api.task"):
|
||||||
|
with mock.patch("rally.orchestrator.api.deploy"):
|
||||||
|
with mock.patch("rally.orchestrator.api.engine"):
|
||||||
|
# NOTE(boris-42) Improve this test case.
|
||||||
|
api.start_task(config)
|
||||||
|
|
||||||
def test_abort_task(self):
|
def test_abort_task(self):
|
||||||
self.assertRaises(NotImplementedError, api.abort_task, 'uuid')
|
self.assertRaises(NotImplementedError, api.abort_task, 'uuid')
|
||||||
|
Loading…
Reference in New Issue
Block a user