Improve functional tests
Functional tests in glance run the glance api and registry servers in separate processes. This causes a number of problems:
- race conditions around port selection
- other unknown sources of indeterminacy
- slowness
- process logs are hidden away or lost, so there are difficulties when debugging
- dead processes are left around in certain failure scenarios
Each of these items can be addressed individually. But under the aegis of this blueprint, I propose that we simply stop functionally testing at the process level, and instead test some slightly smaller but almost equivalent abstraction that can be managed in the same process as the test runner (say, at the wsgi app level).
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
- Nikhil Komawar
Related branches
Related bugs
Sprints
Whiteboard
One thing that might be nice would be to have the scripts under ./bin as proper python modules. We could then use the setup directive 'entry_points' to create scripts for them. One we have that we could import them as modules and make direct calls to their main() functions. This will only be part of the solution but it will greatly help for testing things like glance-manage.
<markwash>
Cleaning up to use entrypoints sounds great even just on its own. And I think it makes a lot of sense to test using main() for some of our tests. Whether or not that is the right approach for all of our functional test adjustments remains to be seen, but I like this idea.
</markwash>
<jbresnah>
In order to run everything in the same process we are going to have to make the global CONF object localized to each process. On my initial run through this I found this effort non-trivial.
</jbresnah>
<flaper87>
Hey, I wanted to propose this blueprint as a task for Gnome's Outreach program for Women. What do you think?
https:/
</flaper87>
Gerrit topic: https:/
Addressed by: https:/
Convert scripts to entry points
Gerrit topic: https:/
Addressed by: https:/
Functional tests use a clean cached db that is only created once.
Gerrit topic: https:/
Addressed by: https:/
Remove glance-control from the test suite
Addressed by: https:/
Remove glance-control from the test suite
Addressed by: https:/
WIP: Faster more stable V1 functional tests
Gerrit topic: https:/
Addressed by: https:/
Unit tests for scrubber.
markwash abandoned 2014-02-15