Browse Source

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
Arx Cruz 1 month ago
parent
commit
a1c25b3b64

+ 0
- 13
octavia_tempest_plugin/config.py View File

@@ -31,19 +31,6 @@ ServiceAvailableGroup = [
31 31
                      "to be available."),
32 32
 ]
33 33
 
34
-# Pull in the service_available for barbican if it is not defined.
35
-# If the barbican tempest plugin isn't loaded, this won't load from
36
-# tempest.conf.
37
-try:
38
-    if cfg.CONF.service_available.barbican is not None:
39
-        LOG.info('Barbican service_available state: {}'.format(
40
-            cfg.CONF.service_available.barbican))
41
-except cfg.NoSuchOptError:
42
-    ServiceAvailableGroup.append(
43
-        cfg.BoolOpt('barbican', default=False,
44
-                    help="Whether or not the barbican service is expected to "
45
-                         "be available."))
46
-
47 34
 octavia_group = cfg.OptGroup(name='load_balancer',
48 35
                              title='load-balancer service options')
49 36
 

+ 1
- 1
octavia_tempest_plugin/tests/barbican_scenario/v2/test_tls_barbican.py View File

@@ -50,7 +50,7 @@ class TLSWithBarbicanTest(test_base.LoadBalancerBaseTestWithCompute):
50 50
         if not CONF.validation.run_validation:
51 51
             raise cls.skipException('Traffic tests will not work without '
52 52
                                     'run_validation enabled.')
53
-        if not CONF.service_available.barbican:
53
+        if not getattr(CONF.service_available, 'barbican', False):
54 54
             raise cls.skipException('TLS with Barbican tests require the '
55 55
                                     'barbican service.')
56 56
 

+ 3
- 0
zuul.d/jobs.yaml View File

@@ -369,12 +369,15 @@
369 369
       - openstack/barbican
370 370
       - openstack/diskimage-builder
371 371
       - openstack/python-barbicanclient
372
+      - openstack/barbican-tempest-plugin
372 373
     vars:
373 374
       tempest_test_regex: ^octavia_tempest_plugin.tests.barbican_scenario.v2
374 375
       devstack_services:
375 376
         barbican: true
376 377
       devstack_plugins:
377 378
         barbican: https://git.openstack.org/openstack/barbican.git
379
+      devstack_localrc:
380
+        TEMPEST_PLUGINS: '"/opt/stack/octavia-tempest-plugin /opt/stack/barbican-tempest-plugin"'
378 381
 
379 382
 # Temporary transitional aliases for gates used in other repos
380 383
 # Remove once octavia has transitioned job names

Loading…
Cancel
Save