From e5606387bebf53aba19365f1864c2d022b8b1bf4 Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Fri, 27 Sep 2019 14:32:35 -0700 Subject: [PATCH] Skip subnets test when version 2.51 is not supported Change-Id: I0591d7d08e09a6a5d4b195f55fa22157207face3 Closes-Bug: #1845726 --- .../tests/api/admin/test_share_servers_manage_negative.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/manila_tempest_tests/tests/api/admin/test_share_servers_manage_negative.py b/manila_tempest_tests/tests/api/admin/test_share_servers_manage_negative.py index 39ec08a3..61631524 100644 --- a/manila_tempest_tests/tests/api/admin/test_share_servers_manage_negative.py +++ b/manila_tempest_tests/tests/api/admin/test_share_servers_manage_negative.py @@ -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'])