Appropriately skip the test_nic setup when in a basic zone

This commit is contained in:
Prasanna Santhanam 2013-08-23 16:41:38 +05:30
parent 4a96740681
commit 7d4a575631

View File

@ -152,9 +152,8 @@ class TestNic(cloudstackTestCase):
zone = get_zone(self.apiclient, self.services) zone = get_zone(self.apiclient, self.services)
self.services['mode'] = zone.networktype self.services['mode'] = zone.networktype
if self.services['mode'] != 'Advanced': if zone.networktype != 'Advanced':
self.debug("Cannot run this test with a basic zone, please use advanced!") self.skipTest("Cannot run this test with a basic zone, please use advanced!")
return
#if local storage is enabled, alter the offerings to use localstorage #if local storage is enabled, alter the offerings to use localstorage
#this step is needed for devcloud #this step is needed for devcloud
@ -224,13 +223,11 @@ class TestNic(cloudstackTestCase):
self.cleanup.insert(0, self.test_network2) self.cleanup.insert(0, self.test_network2)
except Exception as ex: except Exception as ex:
self.debug("Exception during NIC test SETUP!: " + str(ex)) self.debug("Exception during NIC test SETUP!: " + str(ex))
self.assertEqual(True, False, "Exception during NIC test SETUP!: " + str(ex))
@attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"]) @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"])
def test_01_nic(self): def test_01_nic(self):
if self.services['mode'] != 'Advanced': """Test to add and update added nic to a virtual machine"""
self.debug("Cannot run this test with a basic zone, please use advanced!")
return
try: try:
self.virtual_machine = VirtualMachine.create( self.virtual_machine = VirtualMachine.create(
self.apiclient, self.apiclient,