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
diff --git a/octavia_tempest_plugin/tests/api/v2/test_healthmonitor.py b/octavia_tempest_plugin/tests/api/v2/test_healthmonitor.py
index 4887995..5f560c4 100644
--- a/octavia_tempest_plugin/tests/api/v2/test_healthmonitor.py
+++ b/octavia_tempest_plugin/tests/api/v2/test_healthmonitor.py
@@ -37,7 +37,7 @@
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):
diff --git a/octavia_tempest_plugin/tests/api/v2/test_l7policy.py b/octavia_tempest_plugin/tests/api/v2/test_l7policy.py
index eeb22bf..ee559af 100644
--- a/octavia_tempest_plugin/tests/api/v2/test_l7policy.py
+++ b/octavia_tempest_plugin/tests/api/v2/test_l7policy.py
@@ -35,10 +35,10 @@
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):
diff --git a/octavia_tempest_plugin/tests/api/v2/test_l7rule.py b/octavia_tempest_plugin/tests/api/v2/test_l7rule.py
index a75b157..7fed40c 100644
--- a/octavia_tempest_plugin/tests/api/v2/test_l7rule.py
+++ b/octavia_tempest_plugin/tests/api/v2/test_l7rule.py
@@ -34,10 +34,10 @@
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):
diff --git a/octavia_tempest_plugin/tests/scenario/v2/test_healthmonitor.py b/octavia_tempest_plugin/tests/scenario/v2/test_healthmonitor.py
index b2b1d18..e3b4036 100644
--- a/octavia_tempest_plugin/tests/scenario/v2/test_healthmonitor.py
+++ b/octavia_tempest_plugin/tests/scenario/v2/test_healthmonitor.py
@@ -32,7 +32,7 @@
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):
diff --git a/octavia_tempest_plugin/tests/scenario/v2/test_l7policy.py b/octavia_tempest_plugin/tests/scenario/v2/test_l7policy.py
index c39a6c6..a38066c 100644
--- a/octavia_tempest_plugin/tests/scenario/v2/test_l7policy.py
+++ b/octavia_tempest_plugin/tests/scenario/v2/test_l7policy.py
@@ -32,10 +32,10 @@
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):
diff --git a/octavia_tempest_plugin/tests/scenario/v2/test_l7rule.py b/octavia_tempest_plugin/tests/scenario/v2/test_l7rule.py
index 5c322ab..1c147db 100644
--- a/octavia_tempest_plugin/tests/scenario/v2/test_l7rule.py
+++ b/octavia_tempest_plugin/tests/scenario/v2/test_l7rule.py
@@ -32,10 +32,10 @@
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):