Add skip check for volume revert feature

Volume revert is a new feature added in microversion 3.40, and now not all
storage backend drivers have supported this feature. So it is necessary to
add a skip check for it in Tempest tests.

Change-Id: Icbd108f62f5b308e419843b03af20c8fe1278b24
This commit is contained in:
jeremy.zhang 2017-12-17 15:16:06 +08:00
parent 3d3f57f5c8
commit a9c66f83c8
2 changed files with 9 additions and 0 deletions

View File

@ -26,6 +26,12 @@ CONF = config.CONF
class VolumeRevertTests(volume_base.BaseVolumeTest):
min_microversion = '3.40'
@classmethod
def skip_checks(cls):
super(VolumeRevertTests, cls).skip_checks()
if not CONF.volume_feature_enabled.volume_revert:
raise cls.skipException("Cinder volume revert feature disabled")
@classmethod
def setup_clients(cls):
cls._api_version = 3

View File

@ -19,4 +19,7 @@ cinder_option = [
cfg.BoolOpt('consistency_group',
default=False,
help='Enable to run Cinder volume consistency group tests'),
cfg.BoolOpt('volume_revert',
default=False,
help='Enable to run Cinder volume revert tests'),
]