diff options
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.""" |
