From c4ccd81154959ca0dba6b7796a866fb82f8ba36b Mon Sep 17 00:00:00 2001 From: Reedip Date: Fri, 11 Jan 2019 07:47:53 +0000 Subject: [PATCH] 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 --- octavia_tempest_plugin/tests/api/v2/test_healthmonitor.py | 2 +- octavia_tempest_plugin/tests/api/v2/test_l7policy.py | 8 ++++---- octavia_tempest_plugin/tests/api/v2/test_l7rule.py | 8 ++++---- .../tests/scenario/v2/test_healthmonitor.py | 2 +- octavia_tempest_plugin/tests/scenario/v2/test_l7policy.py | 8 ++++---- octavia_tempest_plugin/tests/scenario/v2/test_l7rule.py | 8 ++++---- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/octavia_tempest_plugin/tests/api/v2/test_healthmonitor.py b/octavia_tempest_plugin/tests/api/v2/test_healthmonitor.py index 48879952..5f560c41 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 @@ 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): diff --git a/octavia_tempest_plugin/tests/api/v2/test_l7policy.py b/octavia_tempest_plugin/tests/api/v2/test_l7policy.py index eeb22bf6..ee559afa 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 @@ 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): diff --git a/octavia_tempest_plugin/tests/api/v2/test_l7rule.py b/octavia_tempest_plugin/tests/api/v2/test_l7rule.py index a75b1573..7fed40c3 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 @@ 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): diff --git a/octavia_tempest_plugin/tests/scenario/v2/test_healthmonitor.py b/octavia_tempest_plugin/tests/scenario/v2/test_healthmonitor.py index b2b1d18c..e3b40367 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 @@ 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): diff --git a/octavia_tempest_plugin/tests/scenario/v2/test_l7policy.py b/octavia_tempest_plugin/tests/scenario/v2/test_l7policy.py index c39a6c68..a38066c2 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 @@ 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): diff --git a/octavia_tempest_plugin/tests/scenario/v2/test_l7rule.py b/octavia_tempest_plugin/tests/scenario/v2/test_l7rule.py index 5c322ab9..1c147db3 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 @@ 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):