Fix barbican service_available check
Tempest plugins should not explicitly set option from other plugins. The change I7013888f94261d94e1cd4c3167dc84da7125d1da set service_available.barbican to false if the barbican plugin doesn't exist, but cause duplicate error if both are installed. The right way to check if a service is available or not is checking if the attribute exists and set the default to false. This patch fix the duplicate error. Depends-On: https://review.openstack.org/#/c/639153/ Change-Id: I1ba353328e759391cc6a46d95b74c85c4cea6d92 Closes-Bug: 1817154
This commit is contained in:
parent
2d570d243b
commit
a1c25b3b64
|
@ -31,19 +31,6 @@ ServiceAvailableGroup = [
|
|||
"to be available."),
|
||||
]
|
||||
|
||||
# Pull in the service_available for barbican if it is not defined.
|
||||
# If the barbican tempest plugin isn't loaded, this won't load from
|
||||
# tempest.conf.
|
||||
try:
|
||||
if cfg.CONF.service_available.barbican is not None:
|
||||
LOG.info('Barbican service_available state: {}'.format(
|
||||
cfg.CONF.service_available.barbican))
|
||||
except cfg.NoSuchOptError:
|
||||
ServiceAvailableGroup.append(
|
||||
cfg.BoolOpt('barbican', default=False,
|
||||
help="Whether or not the barbican service is expected to "
|
||||
"be available."))
|
||||
|
||||
octavia_group = cfg.OptGroup(name='load_balancer',
|
||||
title='load-balancer service options')
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class TLSWithBarbicanTest(test_base.LoadBalancerBaseTestWithCompute):
|
|||
if not CONF.validation.run_validation:
|
||||
raise cls.skipException('Traffic tests will not work without '
|
||||
'run_validation enabled.')
|
||||
if not CONF.service_available.barbican:
|
||||
if not getattr(CONF.service_available, 'barbican', False):
|
||||
raise cls.skipException('TLS with Barbican tests require the '
|
||||
'barbican service.')
|
||||
|
||||
|
|
|
@ -369,12 +369,15 @@
|
|||
- openstack/barbican
|
||||
- openstack/diskimage-builder
|
||||
- openstack/python-barbicanclient
|
||||
- openstack/barbican-tempest-plugin
|
||||
vars:
|
||||
tempest_test_regex: ^octavia_tempest_plugin.tests.barbican_scenario.v2
|
||||
devstack_services:
|
||||
barbican: true
|
||||
devstack_plugins:
|
||||
barbican: https://git.openstack.org/openstack/barbican.git
|
||||
devstack_localrc:
|
||||
TEMPEST_PLUGINS: '"/opt/stack/octavia-tempest-plugin /opt/stack/barbican-tempest-plugin"'
|
||||
|
||||
# Temporary transitional aliases for gates used in other repos
|
||||
# Remove once octavia has transitioned job names
|
||||
|
|
Loading…
Reference in New Issue