Skip subnets test when version 2.51 is not supported
Change-Id: I0591d7d08e09a6a5d4b195f55fa22157207face3
Closes-Bug: #1845726
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 39ec08a..6163152 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 import utils
CONF = config.CONF
+LATEST_MICROVERSION = CONF.share.max_api_microversion
@base.skip_if_microversion_lt("2.49")
@@ -83,6 +84,12 @@
@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'])