Network and storage fixes

This commit is contained in:
Wojtek Porczyk 2016-06-29 11:40:07 +02:00
parent b5681c2278
commit d28ab908cc
2 changed files with 8 additions and 5 deletions

View File

@ -69,16 +69,19 @@ class TC_00_AdminVM(qubes.tests.QubesTestCase):
self.assertGreater(self.vm.get_mem_static_max(), 0)
def test_304_get_disk_utilization(self):
self.assertRaises(self.vm.storage.get_disk_utilization(), 0)
self.assertEqual(self.vm.storage.get_disk_utilization(), 0)
def test_305_has_no_private_volume(self):
self.assertEqual(KeyError, self.vm.volumes['private'])
with self.assertRaises(KeyError):
self.vm.volumes['private']
def test_306_has_no_root_volume(self):
self.assertEqual(KeyError, self.vm.volumes['root'])
with self.assertRaises(KeyError):
self.vm.volumes['root']
def test_307_has_no_volatile_volume(self):
self.assertEqual(KeyError, self.vm.volumes['volatile'])
with self.assertRaises(KeyError):
self.vm.volumes['volatile']
def test_310_start(self):
with self.assertRaises(qubes.exc.QubesException):

View File

@ -284,7 +284,7 @@ class NetVMMixin(qubes.events.Emitter):
or new_netvm in self.app.domains.get_vms_connected_to(self):
raise qubes.exc.QubesValueError('Loops in network are unsupported')
if not self.app.vmm.offline_mod and self.is_running() \
if not self.app.vmm.offline_mode and self.is_running() \
and not new_netvm.is_running():
raise qubes.exc.QubesVMNotStartedError(new_netvm,