Merged trunk
This commit is contained in:
@@ -397,7 +397,7 @@ class XenAPIVMTestCase(test.TestCase):
|
|||||||
instance_type_id="3", os_type="linux",
|
instance_type_id="3", os_type="linux",
|
||||||
architecture="x86-64", instance_id=1,
|
architecture="x86-64", instance_id=1,
|
||||||
check_injection=False,
|
check_injection=False,
|
||||||
create_record=True):
|
create_record=True, empty_dns=False):
|
||||||
stubs.stubout_loopingcall_start(self.stubs)
|
stubs.stubout_loopingcall_start(self.stubs)
|
||||||
if create_record:
|
if create_record:
|
||||||
values = {'id': instance_id,
|
values = {'id': instance_id,
|
||||||
@@ -426,12 +426,22 @@ class XenAPIVMTestCase(test.TestCase):
|
|||||||
'label': 'fake',
|
'label': 'fake',
|
||||||
'mac': 'DE:AD:BE:EF:00:00',
|
'mac': 'DE:AD:BE:EF:00:00',
|
||||||
'rxtx_cap': 3})]
|
'rxtx_cap': 3})]
|
||||||
|
if empty_dns:
|
||||||
|
network_info[0][1]['dns'] = []
|
||||||
|
|
||||||
self.conn.spawn(self.context, instance, network_info)
|
self.conn.spawn(self.context, instance, network_info)
|
||||||
self.create_vm_record(self.conn, os_type, instance_id)
|
self.create_vm_record(self.conn, os_type, instance_id)
|
||||||
self.check_vm_record(self.conn, check_injection)
|
self.check_vm_record(self.conn, check_injection)
|
||||||
self.assertTrue(instance.os_type)
|
self.assertTrue(instance.os_type)
|
||||||
self.assertTrue(instance.architecture)
|
self.assertTrue(instance.architecture)
|
||||||
|
|
||||||
|
def test_spawn_empty_dns(self):
|
||||||
|
""""Test spawning with an empty dns list"""
|
||||||
|
self._test_spawn(glance_stubs.FakeGlance.IMAGE_VHD, None, None,
|
||||||
|
os_type="linux", architecture="x86-64",
|
||||||
|
empty_dns=True)
|
||||||
|
self.check_vm_params_for_linux()
|
||||||
|
|
||||||
def test_spawn_not_enough_memory(self):
|
def test_spawn_not_enough_memory(self):
|
||||||
self.assertRaises(Exception,
|
self.assertRaises(Exception,
|
||||||
self._test_spawn,
|
self._test_spawn,
|
||||||
|
|||||||
Reference in New Issue
Block a user