From 102e761d8fc9791d80b733a5b39b51d840052d52 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Mon, 14 Jan 2013 18:31:31 -0500 Subject: Add service_update to conductor. Add a service_update method to the conductor API. This will be necessary for removing direct db access from the servicegroup db driver. Part of bp no-db-compute. Change-Id: Ic9a205ed4e810ee3511378742f764b2b311174a7 --- nova/tests/conductor/test_conductor.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'nova/tests') diff --git a/nova/tests/conductor/test_conductor.py b/nova/tests/conductor/test_conductor.py index b29db92e7..d010b454f 100644 --- a/nova/tests/conductor/test_conductor.py +++ b/nova/tests/conductor/test_conductor.py @@ -747,6 +747,14 @@ class ConductorAPITestCase(_BaseTestCase, test.TestCase): def test_service_destroy(self): self._test_stubbed('service_destroy', '', returns=False) + def test_service_update(self): + ctxt = self.context + self.mox.StubOutWithMock(db, 'service_update') + db.service_update(ctxt, '', {}).AndReturn('fake-result') + self.mox.ReplayAll() + result = self.conductor.service_update(self.context, {'id': ''}, {}) + self.assertEqual(result, 'fake-result') + def test_instance_get_all_by_host(self): self._test_stubbed('instance_get_all_by_host', self.context.elevated(), 'host') -- cgit