diff --git a/manila_tempest_tests/tests/api/admin/test_share_manage.py b/manila_tempest_tests/tests/api/admin/test_share_manage.py index 09bbdb75..9905eebe 100644 --- a/manila_tempest_tests/tests/api/admin/test_share_manage.py +++ b/manila_tempest_tests/tests/api/admin/test_share_manage.py @@ -40,17 +40,14 @@ class ManageNFSShareTest(base.BaseSharesAdminTest): super(ManageNFSShareTest, cls).skip_checks() if not CONF.share.run_manage_unmanage_tests: raise cls.skipException('Manage/unmanage tests are disabled.') - - @classmethod - def resource_setup(cls): if cls.protocol not in CONF.share.enable_protocols: message = "%s tests are disabled" % cls.protocol raise cls.skipException(message) - utils.skip_if_manage_not_supported_for_version() + @classmethod + def resource_setup(cls): super(ManageNFSShareTest, cls).resource_setup() - # Create share type cls.st_name = data_utils.rand_name("manage-st-name") cls.extra_specs = { diff --git a/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py b/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py index cc97dd61..0aeb88f5 100644 --- a/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py +++ b/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py @@ -39,17 +39,15 @@ class ManageNFSShareNegativeTest(base.BaseSharesAdminTest): super(ManageNFSShareNegativeTest, cls).skip_checks() if not CONF.share.run_manage_unmanage_tests: raise cls.skipException('Manage/unmanage tests are disabled.') - - @classmethod - def resource_setup(cls): if cls.protocol not in CONF.share.enable_protocols: message = "%s tests are disabled" % cls.protocol raise cls.skipException(message) utils.skip_if_manage_not_supported_for_version() + @classmethod + def resource_setup(cls): super(ManageNFSShareNegativeTest, cls).resource_setup() - # Create share type cls.st_name = data_utils.rand_name("manage-st-name") cls.extra_specs = { diff --git a/manila_tempest_tests/tests/api/test_quotas.py b/manila_tempest_tests/tests/api/test_quotas.py index 958cb63a..64d734fc 100644 --- a/manila_tempest_tests/tests/api/test_quotas.py +++ b/manila_tempest_tests/tests/api/test_quotas.py @@ -33,10 +33,14 @@ SHARE_REPLICAS_MICROVERSION = "2.53" class SharesQuotasTest(base.BaseSharesTest): @classmethod - def resource_setup(cls): + def skip_checks(cls): + super(SharesQuotasTest, cls).skip_checks() if not CONF.share.run_quota_tests: msg = "Quota tests are disabled." raise cls.skipException(msg) + + @classmethod + def resource_setup(cls): super(SharesQuotasTest, cls).resource_setup() cls.user_id = cls.shares_v2_client.user_id cls.tenant_id = cls.shares_v2_client.tenant_id diff --git a/manila_tempest_tests/tests/api/test_quotas_negative.py b/manila_tempest_tests/tests/api/test_quotas_negative.py index 6b6f1b26..42c9ea7c 100644 --- a/manila_tempest_tests/tests/api/test_quotas_negative.py +++ b/manila_tempest_tests/tests/api/test_quotas_negative.py @@ -28,11 +28,11 @@ CONF = config.CONF class SharesQuotasNegativeTest(base.BaseSharesTest): @classmethod - def resource_setup(cls): + def skip_checks(cls): + super(SharesQuotasNegativeTest, cls).skip_checks() if not CONF.share.run_quota_tests: msg = "Quota tests are disabled." raise cls.skipException(msg) - super(SharesQuotasNegativeTest, cls).resource_setup() @decorators.idempotent_id('d0dfe81d-8e8c-4847-a55f-95ba8a3d922c') @tc.attr(base.TAG_NEGATIVE, base.TAG_API) diff --git a/manila_tempest_tests/tests/api/test_rules_negative.py b/manila_tempest_tests/tests/api/test_rules_negative.py index 63ffb911..574adbc1 100644 --- a/manila_tempest_tests/tests/api/test_rules_negative.py +++ b/manila_tempest_tests/tests/api/test_rules_negative.py @@ -467,8 +467,8 @@ class ShareRulesNegativeTest(base.BaseSharesMixedTest): # Tests independent from rule type and share protocol @classmethod - def resource_setup(cls): - super(ShareRulesNegativeTest, cls).resource_setup() + def skip_checks(cls): + super(ShareRulesNegativeTest, cls).skip_checks() if not (any(p in CONF.share.enable_ip_rules_for_protocols for p in cls.protocols) or any(p in CONF.share.enable_user_rules_for_protocols @@ -479,6 +479,10 @@ class ShareRulesNegativeTest(base.BaseSharesMixedTest): for p in cls.protocols)): cls.message = "Rule tests are disabled" raise cls.skipException(cls.message) + + @classmethod + def resource_setup(cls): + super(ShareRulesNegativeTest, cls).resource_setup() # create share type cls.share_type = cls._create_share_type() cls.share_type_id = cls.share_type['id'] diff --git a/manila_tempest_tests/tests/api/test_shares.py b/manila_tempest_tests/tests/api/test_shares.py index 48461b1d..76204dfc 100644 --- a/manila_tempest_tests/tests/api/test_shares.py +++ b/manila_tempest_tests/tests/api/test_shares.py @@ -30,11 +30,15 @@ class SharesNFSTest(base.BaseSharesMixedTest): protocol = "nfs" @classmethod - def resource_setup(cls): - super(SharesNFSTest, cls).resource_setup() + def skip_checks(cls): + super(SharesNFSTest, cls).skip_checks() if cls.protocol not in CONF.share.enable_protocols: message = "%s tests are disabled" % cls.protocol raise cls.skipException(message) + + @classmethod + def resource_setup(cls): + super(SharesNFSTest, cls).resource_setup() # create share_type cls.share_type = cls._create_share_type() cls.share_type_id = cls.share_type['id']