Add skip_checks classmethod
The conditions skip snippet should reside on skip_checks
method rather than resource_setup method.
Change-Id: I289d1fdb763a7381bda87ea04872f67e7420b800
diff --git a/manila_tempest_tests/tests/api/test_rules_negative.py b/manila_tempest_tests/tests/api/test_rules_negative.py
index 6dfc8da..764533c 100644
--- a/manila_tempest_tests/tests/api/test_rules_negative.py
+++ b/manila_tempest_tests/tests/api/test_rules_negative.py
@@ -32,13 +32,18 @@
protocol = "nfs"
@classmethod
- def resource_setup(cls):
- super(ShareIpRulesForNFSNegativeTest, cls).resource_setup()
- cls.admin_client = cls.admin_shares_v2_client
+ def skip_checks(cls):
+ super(ShareIpRulesForNFSNegativeTest, cls).skip_checks()
if not (cls.protocol in CONF.share.enable_protocols and
cls.protocol in CONF.share.enable_ip_rules_for_protocols):
msg = "IP rule tests for %s protocol are disabled" % cls.protocol
raise cls.skipException(msg)
+
+ @classmethod
+ def resource_setup(cls):
+ super(ShareIpRulesForNFSNegativeTest, cls).resource_setup()
+ cls.admin_client = cls.admin_shares_v2_client
+
# create share_type
cls.share_type = cls._create_share_type()
cls.share_type_id = cls.share_type['id']