Browse Source

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
Reedip 3 months ago
parent
commit
c4ccd81154

+ 1
- 1
octavia_tempest_plugin/tests/api/v2/test_healthmonitor.py View File

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

+ 4
- 4
octavia_tempest_plugin/tests/api/v2/test_l7policy.py View File

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

+ 4
- 4
octavia_tempest_plugin/tests/api/v2/test_l7rule.py View File

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

+ 1
- 1
octavia_tempest_plugin/tests/scenario/v2/test_healthmonitor.py View File

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

+ 4
- 4
octavia_tempest_plugin/tests/scenario/v2/test_l7policy.py View File

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

+ 4
- 4
octavia_tempest_plugin/tests/scenario/v2/test_l7rule.py View File

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

Loading…
Cancel
Save