Refactor Tests to use Mixins

Registered by Ziad Sawalha

We've made some progress, but the testing in Keystone could still be cleaned up.

The changes we did (making ports dynamic, removing dependency on sample data, and separating out test types) resulted in mixing a bunch of http-ish abstractions with a bunch of python-ish abstractions (which depend on the http-ish stuff), and that needs to be fixed.

There's also a bunch of methods that follow restful terminology, e.g. post_user, which understand keystone urls, etc... and then there's a bunch of pythonish methods that use those, e.g. create_user, that build restful objects for you.

Thoughts:
class ClientTestCase(HttpTestCase, ApiTestCase)
class FunctionalTestCase(WsgiTestCase, ApiTestCase)
where HttpTestCase and WsgiTestCase implement whatever they need to make requests happen separately.

Fixture loading also needs improving. Maybe:
- class test.common.BootstrapMixin() -> calls new keystone-manage commands?

Not *every* test would need that mixin (client tests checking version response, for example)

Blueprint information

Status:
Complete
Approver:
Ziad Sawalha
Priority:
Low
Drafter:
Dolph Mathews
Direction:
Needs approval
Assignee:
None
Definition:
Obsolete
Series goal:
None
Implementation:
Not started
Milestone target:
None
Completed by
Joseph Heck

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:keystone-test-refactor,n,z

Addressed by: https://review.openstack.org/531014
    WIP - Add functional testing gate

Addressed by: https://review.openstack.org/534879
    Handle TODO for using new_user_ref

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.