RoleNotFound exception not tested for grant APIs

Bug #1406721 reported by Henry Nash
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Wishlist
Henry Nash

Bug Description

In general, our unit testing of granting assignments does not test that we throw a RoleNotFound exception if the role_id supplied does not exit. While it might argued that the assignment APIs shouldn't validate this (like we don't validate user/grouo ids), currently the spec (and the code) says that we do. So we should test for this case. This test will be important to ensure functionality does;t change as we split role management into its own backend (and hence the checking of valid role_id is lifted up into the manager)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/144658

Changed in keystone:
status: New → In Progress
tags: added: test-improvement
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/144658
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=71d8c6e4d4692c5515b0642e1dfb72e0a83e53fa
Submitter: Jenkins
Branch: master

commit 71d8c6e4d4692c5515b0642e1dfb72e0a83e53fa
Author: Henry Nash <email address hidden>
Date: Wed Dec 31 20:11:25 2014 +0000

    Ensure manager grant methods throw exception if role_id is invalid.

    We currently don't test whether the assignment manager/driver
    grant methods correctly throw a RoleNotFound exception if the role
    is invalid. This patch adds a test for this.

    Such a test will be useful to ensure this functionality is
    maintained as we migrate roles to their own backend.

    Change-Id: I51e87129fb3efcc1abae9c59915eaca38eb91227
    Closes-bug: 1406721

Changed in keystone:
status: In Progress → Fix Committed
Changed in keystone:
milestone: none → kilo-2
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.