Add RBAC test for communitize_image policy
This commit adds an RBAC test for communitize_image
policy, enforced via:
POST /v2/images with attribute visibility = community [0]
[0] b7c627ef68/doc/source/policies.rst
Change-Id: Icf2f14f8240389b17da4b92f6f0df168746d06b2
This commit is contained in:
parent
eeb271a21e
commit
dca00e8dd4
|
@ -184,6 +184,18 @@ class BasicOperationsImagesRbacTest(rbac_base.BaseV2ImageRbacTest):
|
|||
self.rbac_utils.switch_role(self, toggle_rbac_role=True)
|
||||
self._create_image(visibility='public')
|
||||
|
||||
@decorators.idempotent_id('0f2d8427-134a-4d3c-a102-5fcdf5443d09')
|
||||
@rbac_rule_validation.action(service="glance",
|
||||
rule="communitize_image")
|
||||
def test_communitize_image(self):
|
||||
|
||||
"""Communitize Image Test
|
||||
|
||||
RBAC test for the glance communitize_image policy
|
||||
"""
|
||||
self.rbac_utils.switch_role(self, toggle_rbac_role=True)
|
||||
self._create_image(visibility='community')
|
||||
|
||||
@rbac_rule_validation.action(service="glance",
|
||||
rule="deactivate")
|
||||
@decorators.idempotent_id('b488458c-65df-11e6-9947-080027824017')
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
Add RBAC test for communitizing image, providing coverage for the policy
|
||||
action "communitize_image".
|
Loading…
Reference in New Issue