Move switch roles in teardown to base rbac classes
There is no need to add switch_
The only edge case can be illustrated by the following example:
def tearDown(self):
# Guarantee that the server is active during each test run.
vm_state = self.client.
if vm_state != 'ACTIVE':
In this case, the call to rbac_utils.
Blueprint information
- Status:
- Complete
- Approver:
- Samantha Blanco
- Priority:
- Undefined
- Drafter:
- Felipe Monteiro
- Direction:
- Needs approval
- Assignee:
- Mh Raies
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- Felipe Monteiro
- Completed by
- Felipe Monteiro
Related branches
Related bugs
Sprints
Whiteboard
I have a one more idea on this.
Instead of using role switching in tearDown, we can move this completely feature to rule validation decorator. Thus completely removing tearDown method. And it is possible and I have verified it on my setup.
By doing this, we can remove tearDown method completely thus saving hundreds of lines of code.
During rule validation one every task is done, it will take the reference of testcase class and wiill switch the role back to admin. If this idea seems fine to you all, I can start working on this -- Mh Raies
Gerrit topic: https:/
Addressed by: https:/
Add role validation/run time efficiency to Patrole framework.
Gerrit topic: https:/
Addressed by: https:/
Move switch roles in tearDown to base rbac classes.
Addressed by: https:/
Make user to group test in test_groups_rbac atomic so it passes.
Addressed by: https:/
Removal of re-switching of rbac-role from tearDown
@Felipe, kindly mark is as completed.