Fix failing quota tests in stable branches
Some tests were being executed even if their microversion was not
supported. Fix this issue by skipping those tests if the
microversion is not supported.
Change-Id: I19e16465d82fe093ab861faf81d21ab821825e84
Closes-Bug: #1874242
diff --git a/manila_tempest_tests/tests/api/test_quotas.py b/manila_tempest_tests/tests/api/test_quotas.py
index d7137f5..32152e0 100644
--- a/manila_tempest_tests/tests/api/test_quotas.py
+++ b/manila_tempest_tests/tests/api/test_quotas.py
@@ -82,15 +82,13 @@
self.assertGreater(int(quotas["replica_gigabytes"]), -2)
@ddt.data(
- *itertools.product(set(("2.25", CONF.share.max_api_microversion)),
- (True, False)),
- *itertools.product(set(("2.53", CONF.share.max_api_microversion)),
- (True, False))
+ *itertools.product(set(
+ ["2.25", "2.53", CONF.share.max_api_microversion]), (True, False))
)
@ddt.unpack
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
- @base.skip_if_microversion_not_supported("2.25")
def test_show_quotas_detail(self, microversion, with_user):
+ self.skip_if_microversion_not_supported(microversion)
quota_args = {"tenant_id": self.tenant_id, "version": microversion, }
keys = ['gigabytes', 'snapshot_gigabytes', 'shares',
'snapshots', 'share_networks']