From e8ee8e9fbe758c2dcbb92cfb5bbd4d788a499bff Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Mon, 30 Nov 2020 11:51:46 +0100 Subject: [PATCH] fix failures with test_multiple_nic_support.py (#4495) --- test/integration/component/test_multiple_nic_support.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/integration/component/test_multiple_nic_support.py b/test/integration/component/test_multiple_nic_support.py index cf3a2336495..d38693c9cb1 100644 --- a/test/integration/component/test_multiple_nic_support.py +++ b/test/integration/component/test_multiple_nic_support.py @@ -64,8 +64,10 @@ class TestMulipleNicSupport(cloudstackTestCase): cls.zone = Zone(zone.__dict__) cls._cleanup = [] + cls.skip = False if str(cls.zone.securitygroupsenabled) != "True": - sys.exit(1) + cls.skip = True + return cls.logger = logging.getLogger("TestMulipleNicSupport") cls.stream_handler = logging.StreamHandler() @@ -78,7 +80,8 @@ class TestMulipleNicSupport(cloudstackTestCase): cls.template = get_template(cls.apiclient, cls.zone.id, hypervisor="KVM") if cls.template == FAILED: - sys.exit(1) + cls.skip = True + return # Create new domain, account, network and VM cls.user_domain = Domain.create( @@ -262,6 +265,8 @@ class TestMulipleNicSupport(cloudstackTestCase): return def setUp(self): + if self.skip: + self.skipTest("Test can be run only on advanced zone and KVM hypervisor") self.apiclient = self.testClient.getApiClient() self.cleanup = [] return