Skip tests for API versions less than is enabled in configuration
Related-Prod: PRODX-27744
Change-Id: Ie4c9b5a26f06e5599c04e8a85c0e437721ef2bd1
diff --git a/manila_tempest_tests/tests/api/test_microversions.py b/manila_tempest_tests/tests/api/test_microversions.py
index b314ff8..554e9b9 100644
--- a/manila_tempest_tests/tests/api/test_microversions.py
+++ b/manila_tempest_tests/tests/api/test_microversions.py
@@ -16,6 +16,7 @@
from tempest import config
from tempest.lib import decorators
+import testtools
from testtools import testcase as tc
from manila_tempest_tests.tests.api import base
@@ -36,6 +37,9 @@
@decorators.idempotent_id('1b20943e-a398-49dd-a69d-513ce6ea01b4')
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
+ @testtools.skipIf(
+ float(CONF.share.min_api_microversion) >= 2.0,
+ "API v1.0 is unsupported")
def test_microversions_root_version(self):
resp, resp_body = self.shares_v2_client.send_microversion_request()
@@ -59,6 +63,9 @@
@decorators.idempotent_id('6ccaae5f-2382-45a5-a844-6d31837beba8')
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
+ @testtools.skipIf(
+ float(CONF.share.min_api_microversion) >= 2.0,
+ "API v1.0 is unsupported")
def test_microversions_v1_no_version(self):
resp, resp_body = self.shares_v2_client.send_microversion_request(
@@ -78,6 +85,9 @@
@decorators.idempotent_id('7b7e4ddf-08bb-4764-a94f-5f377da3b2cb')
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
+ @testtools.skipIf(
+ float(CONF.share.min_api_microversion) >= 2.0,
+ "API v1.0 is unsupported")
def test_microversions_v1_with_version(self):
resp, resp_body = self.shares_v2_client.send_microversion_request(