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
diff --git a/manila_tempest_tests/tests/api/admin/test_snapshot_manage.py b/manila_tempest_tests/tests/api/admin/test_snapshot_manage.py
index a93f737..8798212 100644
--- a/manila_tempest_tests/tests/api/admin/test_snapshot_manage.py
+++ b/manila_tempest_tests/tests/api/admin/test_snapshot_manage.py
@@ -136,7 +136,7 @@
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")
diff --git a/manila_tempest_tests/tests/api/test_security_services.py b/manila_tempest_tests/tests/api/test_security_services.py
index 78350a0..a0e50dc 100644
--- a/manila_tempest_tests/tests/api/test_security_services.py
+++ b/manila_tempest_tests/tests/api/test_security_services.py
@@ -45,6 +45,7 @@
@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 @@
@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)
diff --git a/manila_tempest_tests/tests/api/test_shares_actions.py b/manila_tempest_tests/tests/api/test_shares_actions.py
index 7d28d83..ae83c85 100644
--- a/manila_tempest_tests/tests/api/test_shares_actions.py
+++ b/manila_tempest_tests/tests/api/test_shares_actions.py
@@ -440,7 +440,7 @@
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 @@
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)