Skip tests for unsupported micro-versions

Add/Fix the use of the skipping logic for
tests that are meant to make requests and
seek responses off a micro-version greater
than the configured maximum microversion.

Change-Id: Ib847af1ca88f5c3a2d2d9f4f48bfe40dfd50b1c9
This commit is contained in:
Goutham Pacha Ravi 2018-07-15 03:30:33 -07:00
parent de786503f7
commit fee64c297b
3 changed files with 5 additions and 3 deletions

View File

@ -136,7 +136,7 @@ class ManageNFSSnapshotTest(base.BaseSharesAdminTest):
2.16.
"""
# Skip in case specified version is not supported
utils.skip_if_microversion_not_supported(version)
self.skip_if_microversion_not_supported(version)
snap_name = data_utils.rand_name("tempest-snapshot-name")
snap_desc = data_utils.rand_name("tempest-snapshot-description")

View File

@ -45,6 +45,7 @@ class SecurityServiceListMixin(object):
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
@ddt.data(*set(['1.0', '2.42', '2.44', LATEST_MICROVERSION]))
def test_list_security_services_with_detail(self, version):
self.skip_if_microversion_not_supported(version)
with_ou = True if utils.is_microversion_ge(version, '2.44') else False
if utils.is_microversion_ge(version, '2.0'):
listed = self.shares_v2_client.list_security_services(
@ -154,6 +155,7 @@ class SecurityServicesTest(base.BaseSharesTest,
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
@ddt.data(*set(['1.0', '2.43', '2.44', LATEST_MICROVERSION]))
def test_get_security_service(self, version):
self.skip_if_microversion_not_supported(version)
with_ou = True if utils.is_microversion_ge(version, '2.44') else False
data = self.generate_security_service_data(set_ou=with_ou)

View File

@ -440,7 +440,7 @@ class SharesActionsTest(base.BaseSharesTest):
if version is None:
snapshot = self.shares_client.get_snapshot(self.snap["id"])
else:
utils.skip_if_microversion_not_supported(version)
self.skip_if_microversion_not_supported(version)
snapshot = self.shares_v2_client.get_snapshot(
self.snap["id"], version=version)
@ -515,7 +515,7 @@ class SharesActionsTest(base.BaseSharesTest):
if version is None:
snaps = self.shares_client.list_snapshots_with_detail()
else:
utils.skip_if_microversion_not_supported(version)
self.skip_if_microversion_not_supported(version)
snaps = self.shares_v2_client.list_snapshots_with_detail(
version=version, params=params)