Code in keystone.credential.backends has no test coverage

Bug #1353487 reported by Alexey Miroshkin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Invalid
Undecided
Alexey Miroshkin

Bug Description

There are no tests for Credential backend class. Such tests should be implemented in keystone.tests.test_backend. It will allow a proper testing of an implementation of a blueprint 'Enable filtering of credentials by user_id ' https://blueprints.launchpad.net/keystone/+spec/filter-credentials-by-user

Changed in keystone:
assignee: nobody → Alexey Miroshkin (amirosh)
Revision history for this message
Dolph Mathews (dolph) wrote :

The functional tests here exercise the SQL backend, which is the only backend we have:

  https://github.com/openstack/keystone/blob/master/keystone/tests/test_v3_credential.py

Changed in keystone:
status: New → Invalid
Revision history for this message
Henry Nash (henry-nash) wrote :

Dolphm - don't you think that this makes sense as a wish-list item? Surely we do want as much coverage of our backend unit tests, independently of however we chose to present this data via HTTP?

Revision history for this message
Dolph Mathews (dolph) wrote :

Sort of.

The assertion that the backend "has no test coverage" is invalid, so there's nothing to track.

Adding test coverage doesn't have any end-user impact and therefore would be a priority other than Wishlist, if we were to track it. (Wishlist should be reserved for user-visible changes.)

Finally, if we're adding a feature exposed by the API, I certainly hope to see functional API-level tests for that feature (test_v3_credential).

Revision history for this message
Henry Nash (henry-nash) wrote :

So, the credential filter work requires that we change the credential backend interface (since today the list_credentials() is overloaded with a private filter that is only used by the ec2 contrib credentials). This private filter is being moves to a separate backend api list_credentials_for_user() since this isn't an optional hint. Then then list_credentials() will be given the regular hints() parameter.

So given the changes to the backend API - and they use by both a contrib and the regular v3 controller - it seems a better idea to have some proper backend tests. I think it's fine if we don't track it here, if that's the best way.

Revision history for this message
Alexey Miroshkin (amirosh) wrote :

In this case I think it's better to introduce couple of backend tests as part of bug 1353511 (https://bugs.launchpad.net/keystone/+bug/1353511) fix.

Revision history for this message
Henry Nash (henry-nash) wrote :

Ok, yep, agreed.

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.