diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-07-31 04:15:07 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-07-31 04:15:07 +0000 |
| commit | 2a8b3d8f430ffb5e839d7b3800426a4f75c5f22b (patch) | |
| tree | b3d952a442a50a0b0bd4b7382ac7be64e0f0348d /nova/tests | |
| parent | dc65ed42db79d242cbcdf4beb7a287be0fc707b6 (diff) | |
| parent | 697f2bddf0e21368c69f13d0ec4e43df17d7f330 (diff) | |
Merge "Send a full instance in rescue_instance."
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/compute/test_compute.py | 4 | ||||
| -rw-r--r-- | nova/tests/compute/test_rpcapi.py | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py index 27f0eb565..de02a9d85 100644 --- a/nova/tests/compute/test_compute.py +++ b/nova/tests/compute/test_compute.py @@ -441,10 +441,10 @@ class ComputeTestCase(BaseTestCase): self.stubs.Set(nova.virt.fake.FakeDriver, 'unrescue', fake_unrescue) - instance = self._create_fake_instance() + instance = jsonutils.to_primitive(self._create_fake_instance()) instance_uuid = instance['uuid'] self.compute.run_instance(self.context, instance_uuid) - self.compute.rescue_instance(self.context, instance_uuid) + self.compute.rescue_instance(self.context, instance=instance) self.assertTrue(called['rescued']) self.compute.unrescue_instance(self.context, instance_uuid) self.assertTrue(called['unrescued']) diff --git a/nova/tests/compute/test_rpcapi.py b/nova/tests/compute/test_rpcapi.py index edfbc309b..27d379eed 100644 --- a/nova/tests/compute/test_rpcapi.py +++ b/nova/tests/compute/test_rpcapi.py @@ -58,8 +58,8 @@ class ComputeRpcAPITestCase(test.TestCase): 'post_live_migration_at_destination', 'power_off_instance', 'power_on_instance', 'pre_live_migration', 'reboot_instance', 'rebuild_instance', 'remove_fixed_ip_from_instance', - 'remove_volume_connection', 'start_instance', 'stop_instance', - 'suspend_instance', 'unpause_instance' + 'remove_volume_connection', 'rescue_instance', 'start_instance', + 'stop_instance', 'suspend_instance', 'unpause_instance' ] if 'rpcapi_class' in kwargs: @@ -266,7 +266,8 @@ class ComputeRpcAPITestCase(test.TestCase): def test_rescue_instance(self): self._test_compute_api('rescue_instance', 'cast', - instance=self.fake_instance, rescue_password='pw') + instance=self.fake_instance, rescue_password='pw', + version='1.27') def test_reset_network(self): self._test_compute_api('reset_network', 'cast', |
