summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-01-12 09:12:21 +0000
committerGerrit Code Review <review@openstack.org>2013-01-12 09:12:21 +0000
commit574fbf89da2ae9d0f6ff9e6bc98ecfcb45f5508c (patch)
tree38ccc17a51febeda77cb13b94b24f1fe48aaa11d /nova/tests
parent0d7c208abc4d55c2aabc2af4499cf65e978a6ca4 (diff)
parentfd78129b9fa76c008756f60412b1d066d1c21caf (diff)
Merge "Add service_create to conductor."
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/conductor/test_conductor.py3
-rw-r--r--nova/tests/test_service.py4
2 files changed, 6 insertions, 1 deletions
diff --git a/nova/tests/conductor/test_conductor.py b/nova/tests/conductor/test_conductor.py
index 909174fa9..885788187 100644
--- a/nova/tests/conductor/test_conductor.py
+++ b/nova/tests/conductor/test_conductor.py
@@ -650,6 +650,9 @@ class ConductorAPITestCase(_BaseTestCase, test.TestCase):
def test_service_get_all_compute_by_host(self):
self._test_stubbed('service_get_all_compute_by_host', 'host')
+ def test_service_create(self):
+ self._test_stubbed('service_create', {})
+
def test_ping(self):
timeouts = []
calls = dict(count=0)
diff --git a/nova/tests/test_service.py b/nova/tests/test_service.py
index 0bb57d542..8cc24cb1c 100644
--- a/nova/tests/test_service.py
+++ b/nova/tests/test_service.py
@@ -113,6 +113,8 @@ class ServiceTestCase(test.TestCase):
self.binary = 'nova-fake'
self.topic = 'fake'
self.mox.StubOutWithMock(service, 'db')
+ self.mox.StubOutWithMock(db, 'service_create')
+ self.flags(use_local=True, group='conductor')
def test_create(self):
@@ -136,7 +138,7 @@ class ServiceTestCase(test.TestCase):
service.db.service_get_by_args(mox.IgnoreArg(),
self.host, self.binary).AndRaise(exception.NotFound())
- service.db.service_create(mox.IgnoreArg(),
+ db.service_create(mox.IgnoreArg(),
service_create).AndReturn(service_ref)
return service_ref