From 57f701d63ab6c8a68b767d497e521a1b1b276886 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Thu, 7 Dec 2017 15:16:55 -0500 Subject: [PATCH] Check snapshot flag for test_snapshot_create_volume_description_non_ascii_code Tempest config allows disabling running any tests for volume snapshots because of storage backends that don't support snapshot, so we need to not run any tests which create snapshots when Tempest has been configured otherwise. Change-Id: I325aa997c65472a0e9e0b3356f27d1732aab3b5f --- cinder/tests/tempest/api/volume/test_volume_unicode.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cinder/tests/tempest/api/volume/test_volume_unicode.py b/cinder/tests/tempest/api/volume/test_volume_unicode.py index a00502656fb..f83244053e7 100644 --- a/cinder/tests/tempest/api/volume/test_volume_unicode.py +++ b/cinder/tests/tempest/api/volume/test_volume_unicode.py @@ -18,6 +18,7 @@ from tempest.api.volume import base as volume_base from tempest.common import waiters from tempest import config from tempest.lib.common.utils import data_utils +import testtools CONF = config.CONF @@ -58,6 +59,8 @@ class CinderUnicodeTest(volume_base.BaseVolumeTest): self.assertEqual(fetched_volume['name'], self.volume_name) + @testtools.skipUnless(CONF.volume_feature_enabled.snapshot, + "Cinder volume snapshots are disabled") def test_snapshot_create_volume_description_non_ascii_code(self): # Create a volume with non-ascii description description = u'\u05e7\u05d9\u05d9\u05e4\u05e9'