Skip volume snapshot tests if feature is not enabled
Not all cinder volume backends support volume snapshot. For instance,
the default NFS backend doesn't. This patch adds a new entry to
CONF.volume_feature_enabled to add the possibility to skip volume
snapshot tests.
Change-Id: I40ce17924bbe4eb6f1c941df974bfa832ec2a999
diff --git a/tempest/scenario/test_volume_boot_pattern.py b/tempest/scenario/test_volume_boot_pattern.py
index e89ea70..faca31f 100644
--- a/tempest/scenario/test_volume_boot_pattern.py
+++ b/tempest/scenario/test_volume_boot_pattern.py
@@ -35,6 +35,12 @@
* Boot an additional instance from the new snapshot based volume
* Check written content in the instance booted from snapshot
"""
+ @classmethod
+ def setUpClass(cls):
+ super(TestVolumeBootPattern, cls).setUpClass()
+
+ if not CONF.volume_feature_enabled.snapshot:
+ raise cls.skipException("Cinder volume snapshots are disabled")
def _create_volume_from_image(self):
img_uuid = CONF.compute.image_ref