Skip unsupported cryptoproviders tests in tempest
Related-Prod: PRODX-26237
Change-Id: Ia7dcce95c4b500adad07ea21005e4503a58893cc
diff --git a/tempest/config.py b/tempest/config.py
index 23b9aef..b32ec7b 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -981,7 +981,10 @@
cfg.BoolOpt('cluster_active_active',
default=False,
help='The boolean flag to indicate if active-active mode '
- 'is used by volume backend.')
+ 'is used by volume backend.'),
+ 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 008d1ae..8571506 100644
--- a/tempest/scenario/test_encrypted_cinder_volumes.py
+++ b/tempest/scenario/test_encrypted_cinder_volumes.py
@@ -18,6 +18,8 @@
from tempest.lib import decorators
from tempest.scenario import manager
+import testtools
+
CONF = config.CONF
@@ -55,6 +57,9 @@
@decorators.idempotent_id('79165fb4-5534-4b9d-8429-97ccffb8f86e')
@decorators.attr(type='slow')
+ @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()
@@ -64,6 +69,9 @@
@decorators.idempotent_id('cbc752ed-b716-4717-910f-956cce965722')
@decorators.attr(type='slow')
+ @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()