yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #46668
[Bug 1406640] Re: Refactor role assignment assertions and creation of expected entities
Lance, I'm marking this as released. Both patches that were targeted as
partial fixes have been merged, and I do not see any new ones. Also it's
a test refactoring, no bug needed.
** Changed in: keystone
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1406640
Title:
Refactor role assignment assertions and creation of expected entities
Status in OpenStack Identity (keystone):
Fix Released
Bug description:
On test_v3_assignment, the method assertValidRoleAssignment(..) [1] can be refactored in order to do a clearer comparison between the provided 'entity' and expected 'ref'.
In addition, assignment link comparison could allow regular expressions, enabling tests to verify the right link in the cases where the whole assignment information is not known. For example, if I call /v3/role_assignments?user_id=ni298n90, we could provide a 'ref' containing:
{
'user': {'id': 'ni298n90'},
'links': {'assignment': '.+/(domains|users)/.+/users/ni298n90/roles/.+'}
}
to the assertRoleAssignmentInListResponse(..) method.
To create entities with regular expressions inside the assignment
link, the creation of expected role assignments also needs to be
changed on test_v3_assignment [2].
[1] https://github.com/openstack/keystone/blob/f5c06d619c762d5d39e8ec3bc752215ec02b2756/keystone/tests/test_v3.py#L1034-L1074
[2] https://github.com/openstack/keystone/blob/f5c06d619c762d5d39e8ec3bc752215ec02b2756/keystone/tests/test_v3_assignment.py#L26-L71
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1406640/+subscriptions
References