mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
Patch up our credential migration tests to undo some automatic work that needs to be done in the migration
This commit is contained in:
parent
e94d441fb0
commit
73dc061716
@ -30,7 +30,10 @@ def test_credential_migration_team_member(credential, team, user, permissions):
|
||||
credential.team = team
|
||||
credential.save()
|
||||
|
||||
# No permissions pre-migration
|
||||
|
||||
# No permissions pre-migration (this happens automatically so we patch this)
|
||||
team.admin_role.children.remove(credential.owner_role)
|
||||
team.member_role.children.remove(credential.usage_role)
|
||||
assert not credential.accessible_by(u, permissions['admin'])
|
||||
|
||||
migrated = rbac.migrate_credential(apps, None)
|
||||
@ -47,6 +50,8 @@ def test_credential_migration_team_admin(credential, team, user, permissions):
|
||||
credential.save()
|
||||
|
||||
# No permissions pre-migration
|
||||
team.admin_role.children.remove(credential.owner_role)
|
||||
team.member_role.children.remove(credential.usage_role)
|
||||
assert not credential.accessible_by(u, permissions['usage'])
|
||||
|
||||
# Usage permissions post migration
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user