diff options
| author | Ed Leafe <ed@leafe.com> | 2011-08-04 20:49:31 +0000 |
|---|---|---|
| committer | Ed Leafe <ed@leafe.com> | 2011-08-04 20:49:31 +0000 |
| commit | 2c63da94da4ef7f1848867eed4760bb70f9a8d82 (patch) | |
| tree | 0bc2a3cfa1a30659786b4b4bd04775e91f83f9d7 /nova/tests | |
| parent | 75b110aa451382cce94f10a392597b40df97839c (diff) | |
| parent | 6cb5d4d7fdf4731112cefbe6f13794b081a82c5f (diff) | |
Merged trunk
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_xenapi.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index 5f3aec700..b0b557907 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -764,12 +764,18 @@ class XenAPIMigrateInstance(test.TestCase): def test_finish_migrate(self): instance = db.instance_create(self.context, self.values) self.called = False + self.fake_vm_start_called = False + + def fake_vm_start(*args, **kwargs): + self.fake_vm_start_called = True def fake_vdi_resize(*args, **kwargs): self.called = True self.stubs.Set(stubs.FakeSessionForMigrationTests, "VDI_resize_online", fake_vdi_resize) + self.stubs.Set(vmops.VMOps, '_start', fake_vm_start) + stubs.stubout_session(self.stubs, stubs.FakeSessionForMigrationTests) stubs.stubout_loopingcall_start(self.stubs) conn = xenapi_conn.get_connection(False) @@ -791,6 +797,7 @@ class XenAPIMigrateInstance(test.TestCase): dict(base_copy='hurr', cow='durr'), network_info, resize_instance=True) self.assertEqual(self.called, True) + self.assertEqual(self.fake_vm_start_called, True) def test_finish_migrate_no_local_storage(self): tiny_type_id = \ |
