Skip unsupported cryptoproviders tests in tempest
Related-Prod: PRODX-26237
Change-Id: Ia7dcce95c4b500adad07ea21005e4503a58893cc
(cherry picked from commit 3f437f883c517ffbbabf5f3c7f3e3f94de3e09db)
diff --git a/tempest/config.py b/tempest/config.py
index 0a793db..801c190 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -869,7 +869,10 @@
'which is currently attached to a server instance? This '
'depends on the 3.42 volume API microversion and the '
'2.51 compute API microversion. Also, not all volume or '
- 'compute backends support this operation.')
+ 'compute backends support this operation.'),
+ cfg.ListOpt('supported_crypto_providers',
+ default=['luks'],
+ help='A list of enabled cryptoproviders for volumes')
]
diff --git a/tempest/scenario/test_encrypted_cinder_volumes.py b/tempest/scenario/test_encrypted_cinder_volumes.py
index e1a1d70..2f54cd6 100644
--- a/tempest/scenario/test_encrypted_cinder_volumes.py
+++ b/tempest/scenario/test_encrypted_cinder_volumes.py
@@ -58,6 +58,9 @@
@decorators.attr(type='slow')
@testtools.skipIf(getattr(CONF.service_available, 'barbican', False),
'Image Signature Verification enabled')
+ @testtools.skipUnless(
+ 'luks' in CONF.volume_feature_enabled.supported_crypto_providers,
+ 'Cryptoprovider is not supported.')
@utils.services('compute', 'volume', 'image')
def test_encrypted_cinder_volumes_luks(self):
server = self.launch_instance()
@@ -70,6 +73,9 @@
@decorators.attr(type='slow')
@testtools.skipIf(getattr(CONF.service_available, 'barbican', False),
'Image Signature Verification enabled')
+ @testtools.skipUnless(
+ 'plain' in CONF.volume_feature_enabled.supported_crypto_providers,
+ 'Cryptoprovider is not supported.')
@utils.services('compute', 'volume', 'image')
def test_encrypted_cinder_volumes_cryptsetup(self):
server = self.launch_instance()