summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2021-02-12 13:20:43 +0000
committerGerrit Code Review <review@openstack.org>2021-02-12 13:20:43 +0000
commit497f349275fc0103a3ff873d087dbb946f5913b5 (patch)
tree56435bb4fa33d14605683b6c64fd2dec9a8d8244
parentb22429fa8bd823f10b555dc9b07c712101c80c60 (diff)
parentd4ddc213e9b146de19392421efacaaa44f370bc5 (diff)
downloadironic-497f349275fc0103a3ff873d087dbb946f5913b5.tar.gz
Merge "Duplicate testing for system scoped ACL testing"
-rw-r--r--ironic/tests/unit/api/test_acl.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/ironic/tests/unit/api/test_acl.py b/ironic/tests/unit/api/test_acl.py
index adea1fe4e..e349da4cd 100644
--- a/ironic/tests/unit/api/test_acl.py
+++ b/ironic/tests/unit/api/test_acl.py
@@ -246,3 +246,19 @@ class TestRBACModelBeforeScopes(TestACLBase):
def test_rbac_legacy(self, **kwargs):
self._check_skip(**kwargs)
self._test_request(**kwargs)
+
+
+@ddt.ddt
+class TestRBACScoped(TestRBACModelBeforeScopes):
+ """Test Scoped ACL access using our existing access policy."""
+
+ def setUp(self):
+ super(TestRBACScoped, self).setUp()
+
+ cfg.CONF.set_override('enforce_scope', True, group='oslo_policy')
+ cfg.CONF.set_override('enforce_new_defaults', True,
+ group='oslo_policy')
+ # NOTE(TheJulia): The purpose of this class is to execute the legacy
+ # RBAC tests with the new configuration, which forces us to
+ # explicity mark each test as a deprecated test later on. That
+ # funcationality will be added in a later patch when needed,