Fixed tests
This commit is contained in:
parent
717512f5ad
commit
2bca0e3dc4
@ -337,8 +337,10 @@ def execute_underload(config, state, host):
|
||||
|
||||
if log.isEnabledFor(logging.INFO):
|
||||
log.info('Underload: obtained a new placement %s', str(placement))
|
||||
for vm, host in placement.items():
|
||||
state['nova'].servers.live_migrate(vm, host, False, False)
|
||||
|
||||
for vm, host in placement.items():
|
||||
state['nova'].servers.live_migrate(vm, host, False, False)
|
||||
if log.isEnabledFor(logging.INFO):
|
||||
log.info('Started migration of VM %s to %s', vm, host)
|
||||
|
||||
# TODO: initiate VM migrations according to the obtained placement
|
||||
|
@ -150,9 +150,11 @@ class LocalManager(TestCase):
|
||||
uuid=str_(of='abc123-', min_length=36, max_length=36)
|
||||
):
|
||||
with MockTransaction:
|
||||
def raise_libvirt_error():
|
||||
raise libvirt.libvirtError(None)
|
||||
connection = libvirt.virConnect()
|
||||
expect(connection).lookupByUUIDString(uuid). \
|
||||
and_return(None).once()
|
||||
and_call(lambda _: raise_libvirt_error())
|
||||
assert manager.get_max_ram(connection, uuid) is None
|
||||
|
||||
def test_vm_mhz_to_percentage(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user