Allow skipping manila tempest tests.

This commit allows to skip manila tempest tests when manila is set to
false in tempest.CONF service_available. This would allow to disable
manila testing in an environment where all the plugins are installed
(i.e. a package-based installation).

Change-Id: I75dd2fd86df7500ad0bc4f633ed39f7595e9dc8c
(cherry picked from commit 5dc5ecf392)
This commit is contained in:
Daniel Mellado 2017-01-12 12:17:58 +00:00 committed by Dirk Mueller
parent 8e1db56a43
commit 6694506a86
2 changed files with 12 additions and 0 deletions

View File

@ -220,6 +220,12 @@ class BaseSharesTest(test.BaseTestCase):
cls.method_resources.insert(0, resource)
return client
@classmethod
def skip_checks(cls):
super(BaseSharesTest, cls).skip_checks()
if not CONF.service_available.manila:
raise cls.skipException("Manila support is required")
@classmethod
def verify_nonempty(cls, *args):
if not all(args):

View File

@ -50,6 +50,12 @@ class ShareScenarioTest(manager.NetworkScenarioTest):
cls.shares_admin_v2_client = shares_v2_client.SharesV2Client(
cls.os_admin.auth_provider)
@classmethod
def skip_checks(cls):
super(ShareScenarioTest, cls).skip_checks()
if not CONF.service_available.manila:
raise cls.skipException("Manila support is required")
def _create_share(self, share_protocol=None, size=1, name=None,
snapshot_id=None, description=None, metadata=None,
share_network_id=None, share_type_id=None,