Add skip for tests
Skip shelve tests when
barbican_integration_enabled = True
Change-Id: I27884c6e3464aa9972b4f2240be9b385d6666e30
Related-PROD: PROD-26939
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index 7a9c09d..191b886 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -557,8 +557,9 @@
@decorators.idempotent_id('77eba8e0-036e-4635-944b-f7a8f3b78dc9')
@testtools.skipUnless(CONF.compute_feature_enabled.shelve,
'Shelve is not available.')
- @testtools.skipIf(getattr(CONF.service_available, 'barbican', False),
- 'Barbican service is enabled, unshelve will not work')
+ @testtools.skipIf(getattr(CONF.compute_feature_enabled,
+ 'barbican_integration_enabled', False),
+ 'Barbican integtation enabled, unshelve will not work')
@utils.services('image')
def test_shelve_unshelve_server(self):
if CONF.image_feature_enabled.api_v2:
diff --git a/tempest/api/compute/servers/test_servers_negative.py b/tempest/api/compute/servers/test_servers_negative.py
index d2c4392..92dd7cc 100644
--- a/tempest/api/compute/servers/test_servers_negative.py
+++ b/tempest/api/compute/servers/test_servers_negative.py
@@ -472,8 +472,9 @@
@decorators.idempotent_id('443e4f9b-e6bf-4389-b601-3a710f15fddd')
@testtools.skipUnless(CONF.compute_feature_enabled.shelve,
'Shelve is not available.')
- @testtools.skipIf(getattr(CONF.service_available, 'barbican', False),
- 'Barbican service is enabled, unshelve will not work')
+ @testtools.skipIf(getattr(CONF.compute_feature_enabled,
+ 'barbican_integration_enabled', False),
+ 'Barbican integtation enabled, unshelve will not work')
@decorators.attr(type=['negative'])
def test_shelve_shelved_server(self):
# shelve a shelved server.
diff --git a/tempest/api/compute/volumes/test_attach_volume.py b/tempest/api/compute/volumes/test_attach_volume.py
index ce73d8a..bfbc7cd 100644
--- a/tempest/api/compute/volumes/test_attach_volume.py
+++ b/tempest/api/compute/volumes/test_attach_volume.py
@@ -217,8 +217,9 @@
self.assertEqual(number_of_volumes, counted_volumes)
@decorators.idempotent_id('13a940b6-3474-4c3c-b03f-29b89112bfee')
- @testtools.skipIf(getattr(CONF.service_available, 'barbican', False),
- 'Barbican service is enabled, unshelve will not work')
+ @testtools.skipIf(getattr(CONF.compute_feature_enabled,
+ 'barbican_integration_enabled', False),
+ 'Barbican integtation enabled, unshelve will not work')
def test_attach_volume_shelved_or_offload_server(self):
# Create server, count number of volumes on it, shelve
# server and attach pre-created volume to shelved server
@@ -245,8 +246,9 @@
self.assertIsNotNone(volume_attachment['device'])
@decorators.idempotent_id('b54e86dd-a070-49c4-9c07-59ae6dae15aa')
- @testtools.skipIf(getattr(CONF.service_available, 'barbican', False),
- 'Barbican service is enabled, unshelve will not work')
+ @testtools.skipIf(getattr(CONF.compute_feature_enabled,
+ 'barbican_integration_enabled', False),
+ 'Barbican integtation enabled, unshelve will not work')
def test_detach_volume_shelved_or_offload_server(self):
# Count number of volumes on instance, shelve
# server and attach pre-created volume to shelved server
diff --git a/tempest/scenario/test_shelve_instance.py b/tempest/scenario/test_shelve_instance.py
index cbfc8c6..8252834 100644
--- a/tempest/scenario/test_shelve_instance.py
+++ b/tempest/scenario/test_shelve_instance.py
@@ -78,8 +78,9 @@
@decorators.idempotent_id('1164e700-0af0-4a4c-8792-35909a88743c')
@testtools.skipUnless(CONF.network.public_network_id,
'The public_network_id option must be specified.')
- @testtools.skipIf(getattr(CONF.service_available, 'barbican', False),
- 'Barbican service is enabled, unshelve will not work')
+ @testtools.skipIf(getattr(CONF.compute_feature_enabled,
+ 'barbican_integration_enabled', False),
+ 'Barbican integtation enabled, unshelve will not work')
@utils.services('compute', 'network', 'image')
def test_shelve_instance(self):
self._create_server_then_shelve_and_unshelve()
@@ -88,8 +89,9 @@
@decorators.idempotent_id('c1b6318c-b9da-490b-9c67-9339b627271f')
@testtools.skipUnless(CONF.network.public_network_id,
'The public_network_id option must be specified.')
- @testtools.skipIf(getattr(CONF.service_available, 'barbican', False),
- 'Barbican service is enabled, unshelve will not work')
+ @testtools.skipIf(getattr(CONF.compute_feature_enabled,
+ 'barbican_integration_enabled', False),
+ 'Barbican integtation enabled, unshelve will not work')
@utils.services('compute', 'volume', 'network', 'image')
def test_shelve_volume_backed_instance(self):
self._create_server_then_shelve_and_unshelve(boot_from_volume=True)