diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-04-14 04:03:12 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-04-14 04:03:12 +0000 |
| commit | 497b42372d820bb9bf2c9dfd482e5abf9ef1f940 (patch) | |
| tree | 503ee6c8e368e6b4bf3dcbd84132ffbabe2481be /nova/tests | |
| parent | 059a05d6cc241ad38a0204d8782b7debf4e823d2 (diff) | |
| parent | 188f306aa88a6a5b73959c74f1642720d7627789 (diff) | |
| download | nova-497b42372d820bb9bf2c9dfd482e5abf9ef1f940.tar.gz nova-497b42372d820bb9bf2c9dfd482e5abf9ef1f940.tar.xz nova-497b42372d820bb9bf2c9dfd482e5abf9ef1f940.zip | |
Merge "Make compute/manager use conductor for unrescue()"
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/compute/test_compute.py | 5 | ||||
| -rw-r--r-- | nova/tests/conductor/test_conductor.py | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py index 11c4da4a6..88434078d 100644 --- a/nova/tests/compute/test_compute.py +++ b/nova/tests/compute/test_compute.py @@ -3766,12 +3766,13 @@ class ComputeTestCase(BaseTestCase): self.assertEqual(columns_to_join, []) return instances - def fake_unrescue(self, context, instance): + def fake_unrescue(context, instance): unrescued_instances[instance['uuid']] = True self.stubs.Set(self.compute.conductor_api, 'instance_get_all_by_host', fake_instance_get_all_by_host) - self.stubs.Set(compute_api.API, 'unrescue', fake_unrescue) + self.stubs.Set(self.compute.conductor_api, 'compute_unrescue', + fake_unrescue) self.flags(rescue_timeout=60) ctxt = context.get_admin_context() diff --git a/nova/tests/conductor/test_conductor.py b/nova/tests/conductor/test_conductor.py index e339ecf44..fee919a33 100644 --- a/nova/tests/conductor/test_conductor.py +++ b/nova/tests/conductor/test_conductor.py @@ -612,6 +612,13 @@ class _BaseTestCase(object): self.conductor.compute_confirm_resize(self.context, 'instance', 'migration') + def test_compute_unrescue(self): + self.mox.StubOutWithMock(self.conductor_manager.compute_api, + 'unrescue') + self.conductor_manager.compute_api.unrescue(self.context, 'instance') + self.mox.ReplayAll() + self.conductor.compute_unrescue(self.context, 'instance') + class ConductorTestCase(_BaseTestCase, test.TestCase): """Conductor Manager Tests.""" |
