Add configuration support for skipping tests
This patch add configuration support in Octavia Tempest Plugin, in case a provider driver does not support Health Monitors. Change-Id: I25eb52e9f64a08560c9ea2f664edd9826be6e379
This commit is contained in:
parent
df240799c3
commit
f88cffc9b4
|
@ -144,3 +144,12 @@ OctaviaGroup = [
|
||||||
default=None,
|
default=None,
|
||||||
help='Availability zone to use for creating servers.'),
|
help='Availability zone to use for creating servers.'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
lb_feature_enabled_group = cfg.OptGroup(name='loadbalancer-feature-enabled',
|
||||||
|
title='Enabled/Disabled LB features')
|
||||||
|
LBFeatureEnabledGroup = [
|
||||||
|
cfg.BoolOpt('health_monitor_enabled',
|
||||||
|
default=True,
|
||||||
|
help="Whether Health Monitor is available with provider"
|
||||||
|
" driver or not."),
|
||||||
|
]
|
||||||
|
|
|
@ -35,6 +35,9 @@ class OctaviaTempestPlugin(plugins.TempestPlugin):
|
||||||
project_config.ServiceAvailableGroup)
|
project_config.ServiceAvailableGroup)
|
||||||
config.register_opt_group(conf, project_config.octavia_group,
|
config.register_opt_group(conf, project_config.octavia_group,
|
||||||
project_config.OctaviaGroup)
|
project_config.OctaviaGroup)
|
||||||
|
config.register_opt_group(conf,
|
||||||
|
project_config.lb_feature_enabled_group,
|
||||||
|
project_config.LBFeatureEnabledGroup)
|
||||||
|
|
||||||
def get_opt_lists(self):
|
def get_opt_lists(self):
|
||||||
return [
|
return [
|
||||||
|
@ -42,6 +45,8 @@ class OctaviaTempestPlugin(plugins.TempestPlugin):
|
||||||
project_config.ServiceAvailableGroup),
|
project_config.ServiceAvailableGroup),
|
||||||
(project_config.octavia_group.name,
|
(project_config.octavia_group.name,
|
||||||
project_config.OctaviaGroup),
|
project_config.OctaviaGroup),
|
||||||
|
(project_config.lb_feature_enabled_group.name,
|
||||||
|
project_config.LBFeatureEnabledGroup)
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_service_clients(self):
|
def get_service_clients(self):
|
||||||
|
|
|
@ -33,6 +33,12 @@ LOG = logging.getLogger(__name__)
|
||||||
class HealthMonitorAPITest(test_base.LoadBalancerBaseTest):
|
class HealthMonitorAPITest(test_base.LoadBalancerBaseTest):
|
||||||
"""Test the healthmonitor object API."""
|
"""Test the healthmonitor object API."""
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def skip_checks(cls):
|
||||||
|
super(HealthMonitorAPITest, cls).skip_checks()
|
||||||
|
if not CONF.loadbalancer_feature_enabled.health_monitor_enabled:
|
||||||
|
cls.skip('Health Monitors not supported')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def resource_setup(cls):
|
def resource_setup(cls):
|
||||||
"""Setup resources needed by the tests."""
|
"""Setup resources needed by the tests."""
|
||||||
|
|
|
@ -28,6 +28,12 @@ CONF = config.CONF
|
||||||
|
|
||||||
class HealthMonitorScenarioTest(test_base.LoadBalancerBaseTest):
|
class HealthMonitorScenarioTest(test_base.LoadBalancerBaseTest):
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def skip_checks(cls):
|
||||||
|
super(HealthMonitorScenarioTest, cls).skip_checks()
|
||||||
|
if not CONF.loadbalancer_feature_enabled.health_monitor_enabled:
|
||||||
|
cls.skip('Health Monitors not supported')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def resource_setup(cls):
|
def resource_setup(cls):
|
||||||
"""Setup resources needed by the tests."""
|
"""Setup resources needed by the tests."""
|
||||||
|
|
Loading…
Reference in New Issue