diff options
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/compute/test_compute.py | 3 | ||||
| -rw-r--r-- | nova/tests/compute/test_rpcapi.py | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py index e218fe60b..70d9cdd08 100644 --- a/nova/tests/compute/test_compute.py +++ b/nova/tests/compute/test_compute.py @@ -1528,7 +1528,8 @@ class ComputeTestCase(BaseTestCase): self.mox.StubOutWithMock(rpc, 'call') rpc.call(c, rpc.queue_get_for(c, FLAGS.compute_topic, dest), {"method": "post_live_migration_at_destination", - "args": {'instance_id': i_ref['id'], 'block_migration': False}}) + "args": {'instance_id': i_ref['id'], 'block_migration': False}, + "version": compute_rpcapi.ComputeAPI.RPC_API_VERSION}, None) self.mox.StubOutWithMock(self.compute.driver, 'unplug_vifs') self.compute.driver.unplug_vifs(i_ref, []) rpc.call(c, 'network', {'method': 'setup_networks_on_host', diff --git a/nova/tests/compute/test_rpcapi.py b/nova/tests/compute/test_rpcapi.py index b817d04af..3f5e63d35 100644 --- a/nova/tests/compute/test_rpcapi.py +++ b/nova/tests/compute/test_rpcapi.py @@ -58,7 +58,8 @@ class ComputeRpcAPITestCase(test.TestCase): instance = expected_msg['args']['instance'] del expected_msg['args']['instance'] if method in ['rollback_live_migration_at_destination', - 'pre_live_migration']: + 'pre_live_migration', + 'post_live_migration_at_destination']: expected_msg['args']['instance_id'] = instance['id'] else: expected_msg['args']['instance_uuid'] = instance['uuid'] @@ -161,6 +162,11 @@ class ComputeRpcAPITestCase(test.TestCase): self._test_compute_api('lock_instance', 'cast', instance=self.fake_instance) + def test_post_live_migration_at_destination(self): + self._test_compute_api('post_live_migration_at_destination', 'call', + instance=self.fake_instance, block_migration='block_migration', + host='host') + def test_pause_instance(self): self._test_compute_api('pause_instance', 'cast', instance=self.fake_instance) |
