CLOUDSTACK-8214: test_netscaler_nw_off.py - Skip test if enough zones are not present instead of throwing exception

Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
This commit is contained in:
Gaurav Aradhye 2015-02-04 22:40:37 -08:00 committed by SrikanteswaraRao Talluri
parent d62d511f47
commit 8354d4a765
1 changed files with 3 additions and 5 deletions

View File

@ -424,11 +424,9 @@ class TestAddMultipleNSDiffZone(cloudstackTestCase):
for zone in zones:
if zone.networktype == 'Advanced':
zone_list.append(zone)
self.assertGreater(
len(zone_list),
1,
"Atleast 2 advanced mode zones should be present for this test"
)
if len(zone_list) < 2:
self.skipTest("Atleast 2 advanced mode zones should be present for this test")
zoneid=zone_list[0].id
physical_networks = PhysicalNetwork.list(
self.apiclient,