override_role cleanup: Remove superfluous call in rbac_rule_validation
This PS cleans up rbac_rule_validation (addressing a TODO) by removing
_override_role call in rbac_utils which is no longer necessary as all
tests have migrated over to override_role.
The call in rbac_rule_validation to _override_role was only needed
to do a role switch to admin role after test execution to compensate
for the limitation in switch_role which did not automatically switch
role via a contextmanager (which is what override_role) does.
Partially Implements: blueprint rbac-utils-contextmanager
Change-Id: I5628886349b22b10b53a3c325fd38bdbaaafafae
diff --git a/patrole_tempest_plugin/rbac_rule_validation.py b/patrole_tempest_plugin/rbac_rule_validation.py
index 75d1baa..daf03e4 100644
--- a/patrole_tempest_plugin/rbac_rule_validation.py
+++ b/patrole_tempest_plugin/rbac_rule_validation.py
@@ -175,10 +175,6 @@
"OverPermission: Role %s was allowed to perform %s" %
(role, rule))
finally:
- # TODO(felipemonteiro): Remove the call below once all the
- # tests have migrated over to `override_role` public method.
- test_obj.rbac_utils._override_role(test_obj,
- toggle_rbac_role=False)
if CONF.patrole_log.enable_reporting:
RBACLOG.info(
"[Service]: %s, [Test]: %s, [Rule]: %s, "