Replace rule/expected_error_code with non-deprecated versions
This patch set replaces deprecated occurrences of rule with
rules and expected_error_code with expected_error_codes in
rbac_rule_validation.action decorator.
Along with removing the parameters from the decorator, all the
API tests have been changed to use the non-deprecated parameters
instead. Unit tests have also been updated.
Change-Id: I6485b6c57795b5fe75e2b339d5c9720da30be564
diff --git a/doc/source/test_writing_guide.rst b/doc/source/test_writing_guide.rst
index d25f60a..61ab326 100644
--- a/doc/source/test_writing_guide.rst
+++ b/doc/source/test_writing_guide.rst
@@ -83,7 +83,7 @@
@rbac_rule_validation.action(
service="nova",
- rule="os_compute_api:os-aggregates:show")
+ rules=["os_compute_api:os-aggregates:show"])
def test_show_aggregate_rbac(self):
# Do test setup before the ``override_role`` call.
aggregate_id = self._create_aggregate()
@@ -106,7 +106,7 @@
@rbac_rule_validation.action(
service="nova",
- rule="os_compute_api:os-admin-password")
+ rules=["os_compute_api:os-admin-password"])
def test_change_server_password(self):
original_password = self.servers_client.show_password(
self.server['id'])
@@ -140,7 +140,7 @@
@rbac_rule_validation.action(
service="example-service",
- rule="example-rule")
+ rules=["example-rule"])
def test_change_server_password(self):
# Never call a helper function inside the contextmanager that calls a
# bunch of APIs. Only call the API that enforces the policy action