Skip subnets test when version 2.51 is not supported

Change-Id: I0591d7d08e09a6a5d4b195f55fa22157207face3
Closes-Bug: #1845726
This commit is contained in:
Goutham Pacha Ravi 2019-09-27 14:32:35 -07:00
parent 92925822a3
commit e5606387be

View File

@ -26,6 +26,7 @@ from manila_tempest_tests.tests.api import base
from manila_tempest_tests import utils
CONF = config.CONF
LATEST_MICROVERSION = CONF.share.max_api_microversion
@base.skip_if_microversion_lt("2.49")
@ -83,6 +84,12 @@ class ManageShareServersNegativeTest(base.BaseSharesAdminTest):
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
def test_manage_share_server_invalid_params(self, param, invalid_value):
sn_subnets_not_supported = utils.is_microversion_lt(
LATEST_MICROVERSION, utils.SHARE_NETWORK_SUBNETS_MICROVERSION)
if param == 'share_network_subnet_id' and sn_subnets_not_supported:
raise self.skipException("Share network subnets not supported by "
"microversion %s" % LATEST_MICROVERSION)
# create share
share = self._create_share_with_new_share_network()
el = self.shares_v2_client.list_share_export_locations(share['id'])