Fixing tests, PEP8 failures
This commit is contained in:
@@ -783,7 +783,8 @@ class XenAPIMigrateInstance(test.TestCase):
|
|||||||
self.stubs.Set(stubs.FakeSessionForMigrationTests,
|
self.stubs.Set(stubs.FakeSessionForMigrationTests,
|
||||||
"VDI_resize_online", fake_vdi_resize)
|
"VDI_resize_online", fake_vdi_resize)
|
||||||
self.stubs.Set(vmops.VMOps, '_start', fake_vm_start)
|
self.stubs.Set(vmops.VMOps, '_start', fake_vm_start)
|
||||||
self.stubs.Set(vmops.VMOps, 'finish_revert_migration', fake_finish_revert_migration)
|
self.stubs.Set(vmops.VMOps, 'finish_revert_migration',
|
||||||
|
fake_finish_revert_migration)
|
||||||
|
|
||||||
stubs.stubout_session(self.stubs, stubs.FakeSessionForMigrationTests)
|
stubs.stubout_session(self.stubs, stubs.FakeSessionForMigrationTests)
|
||||||
stubs.stubout_loopingcall_start(self.stubs)
|
stubs.stubout_loopingcall_start(self.stubs)
|
||||||
@@ -852,7 +853,8 @@ class XenAPIMigrateInstance(test.TestCase):
|
|||||||
def test_finish_migrate_no_local_storage(self):
|
def test_finish_migrate_no_local_storage(self):
|
||||||
tiny_type_id = \
|
tiny_type_id = \
|
||||||
instance_types.get_instance_type_by_name('m1.tiny')['id']
|
instance_types.get_instance_type_by_name('m1.tiny')['id']
|
||||||
self.instance_values.update({'instance_type_id': tiny_type_id, 'local_gb': 0})
|
self.instance_values.update({'instance_type_id': tiny_type_id,
|
||||||
|
'local_gb': 0})
|
||||||
instance = db.instance_create(self.context, self.instance_values)
|
instance = db.instance_create(self.context, self.instance_values)
|
||||||
|
|
||||||
def fake_vdi_resize(*args, **kwargs):
|
def fake_vdi_resize(*args, **kwargs):
|
||||||
|
@@ -295,6 +295,9 @@ class FakeSessionForMigrationTests(fake.SessionBase):
|
|||||||
vm['is_control_domain'] = False
|
vm['is_control_domain'] = False
|
||||||
vm['domid'] = random.randrange(1, 1 << 16)
|
vm['domid'] = random.randrange(1, 1 << 16)
|
||||||
|
|
||||||
|
def VM_set_name_label(self, *args):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def stub_out_migration_methods(stubs):
|
def stub_out_migration_methods(stubs):
|
||||||
def fake_create_snapshot(self, instance):
|
def fake_create_snapshot(self, instance):
|
||||||
|
Reference in New Issue
Block a user