[RBAC] Add skip condition for share manage

In case a backend doesn't support this feature
the tests will fail.

Change-Id: I69fd7a3747986ce287c3a59cdc0f374fdd5b0099
This commit is contained in:
lkuchlan 2023-02-08 10:25:10 +02:00
parent a93fc98451
commit 72c3228a39
1 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,8 @@ class ShareRbacManageShareTests(rbac_base.ShareRbacBaseTests,
@classmethod
def skip_checks(cls):
super(ShareRbacManageShareTests, cls).skip_checks()
if not CONF.share.run_manage_unmanage_tests:
raise cls.skipException('Manage/unmanage tests are disabled.')
if cls.protocol not in CONF.share.enable_protocols:
message = "%s tests are disabled" % cls.protocol
raise cls.skipException(message)