Use cls.skipException and raise it

skip() has been deprecated from Tempest and the skipException
exception has been introduced. The same changes are reflected here,
along with raising the exceptions which were missed in the previous
patches.

Change-Id: I994eead1bd4e41b50b8180840074f09eb6d6bb55
This commit is contained in:
Reedip 2019-01-11 07:47:53 +00:00
parent ebbe4ef969
commit c4ccd81154
6 changed files with 18 additions and 18 deletions

View File

@ -37,7 +37,7 @@ class HealthMonitorAPITest(test_base.LoadBalancerBaseTest):
def skip_checks(cls):
super(HealthMonitorAPITest, cls).skip_checks()
if not CONF.loadbalancer_feature_enabled.health_monitor_enabled:
cls.skip('Health Monitors not supported')
raise cls.skipException('Health Monitors not supported')
@classmethod
def resource_setup(cls):

View File

@ -35,10 +35,10 @@ class L7PolicyAPITest(test_base.LoadBalancerBaseTest):
def skip_checks(cls):
super(L7PolicyAPITest, cls).skip_checks()
if not CONF.loadbalancer_feature_enabled.l7_protocol_enabled:
cls.skipException('[loadbalancer-feature-enabled] '
'"l7_protocol_enabled" is set to False in the '
'Tempest configuration. L7 Scenario tests will '
'be skipped.')
raise cls.skipException(
'[loadbalancer-feature-enabled] '
'"l7_protocol_enabled" is set to False in the Tempest '
'configuration. L7 API tests will be skipped.')
@classmethod
def resource_setup(cls):

View File

@ -34,10 +34,10 @@ class L7RuleAPITest(test_base.LoadBalancerBaseTest):
def skip_checks(cls):
super(L7RuleAPITest, cls).skip_checks()
if not CONF.loadbalancer_feature_enabled.l7_protocol_enabled:
cls.skipException('[loadbalancer-feature-enabled]'
' "l7_protocol_enabled" is set to False in the'
' Tempest configuration.L7 Scenario tests would'
' be skipped.')
raise cls.skipException(
'[loadbalancer-feature-enabled] '
'"l7_protocol_enabled" is set to False in the Tempest '
'configuration. L7 API tests will be skipped.')
@classmethod
def resource_setup(cls):

View File

@ -32,7 +32,7 @@ class HealthMonitorScenarioTest(test_base.LoadBalancerBaseTest):
def skip_checks(cls):
super(HealthMonitorScenarioTest, cls).skip_checks()
if not CONF.loadbalancer_feature_enabled.health_monitor_enabled:
cls.skip('Health Monitors not supported')
raise cls.skipException('Health Monitors not supported')
@classmethod
def resource_setup(cls):

View File

@ -32,10 +32,10 @@ class L7PolicyScenarioTest(test_base.LoadBalancerBaseTest):
def skip_checks(cls):
super(L7PolicyScenarioTest, cls).skip_checks()
if not CONF.loadbalancer_feature_enabled.l7_protocol_enabled:
cls.skipException('[loadbalancer-feature-enabled] '
'"l7_protocol_enabled" is set to False in the '
'Tempest configuration. L7 Scenario tests will '
'be skipped.')
raise cls.skipException(
'[loadbalancer-feature-enabled] '
'"l7_protocol_enabled" is set to False in the Tempest '
'configuration. L7 Scenario tests will be skipped.')
@classmethod
def resource_setup(cls):

View File

@ -32,10 +32,10 @@ class L7RuleScenarioTest(test_base.LoadBalancerBaseTest):
def skip_checks(cls):
super(L7RuleScenarioTest, cls).skip_checks()
if not CONF.loadbalancer_feature_enabled.l7_protocol_enabled:
cls.skipException('[loadbalancer-feature-enabled] '
'"l7_protocol_enabled" is set to False in the '
'Tempest configuration. L7 Scenario tests will '
'be skipped.')
raise cls.skipException(
'[loadbalancer-feature-enabled] '
'"l7_protocol_enabled" is set to False in the Tempest '
'configuration. L7 Scenario tests will be skipped.')
@classmethod
def resource_setup(cls):