added testing notes to the contributing doc
Change-Id: Ifb83469dabbca435bd3df2c05089dc1a113c4460
This commit is contained in:
parent
07f16dc8ee
commit
c8ef11d677
@ -15,7 +15,7 @@ not in GitHub's issue tracker.
|
||||
Recommended workflow
|
||||
====================
|
||||
|
||||
* Set up a [Swift All-In-One VM](http://docs.openstack.org/developer/swift/development_saio.html).
|
||||
* Set up a [Swift All-In-One VM](http://docs.openstack.org/developer/swift/development_saio.html)(SAIO).
|
||||
|
||||
* Make your changes. Docs and tests for your patch must land before
|
||||
or with your patch.
|
||||
@ -29,6 +29,38 @@ Recommended workflow
|
||||
|
||||
* ``git review``
|
||||
|
||||
Notes on Testing
|
||||
================
|
||||
|
||||
Running the tests above against Swift in your development environment (ie
|
||||
your SAIO) will catch most issues. Any patch you propose is expected to be
|
||||
both tested and documented and all tests should pass.
|
||||
|
||||
If you want to run just a subset of the tests while you are developing, you
|
||||
can use nosetests::
|
||||
|
||||
cd test/unit/common/middleware/ && nosetests test_healthcheck.py
|
||||
|
||||
To check which parts of your code are being exercised by a test, you can run
|
||||
tox and then point your browser to swift/cover/index.html::
|
||||
|
||||
tox -e py27 -- test.unit.common.middleware.test_healthcheck:TestHealthCheck.test_healthcheck
|
||||
|
||||
Swift's unit tests are designed to test small parts of the code in isolation.
|
||||
The functional tests validate that the entire system is working from an
|
||||
external perspective (they are "black-box" tests). You can even run functional
|
||||
tests against public Swift endpoints. The probetests are designed to test much
|
||||
of Swift's internal processes. For example, a test may write data,
|
||||
intentionally corrupt it, and then ensure that the correct processes detect
|
||||
and repair it.
|
||||
|
||||
When your patch is submitted for code review, it will automatically be tested
|
||||
on the OpenStack CI infrastructure. In addition to many of the tests above, it
|
||||
will also be tested by several other OpenStack test jobs.
|
||||
|
||||
Once your patch has been reviewed and approved by two core reviewers and has
|
||||
passed all automated tests, it will be merged into the Swift source tree.
|
||||
|
||||
Specs
|
||||
=====
|
||||
|
||||
|
@ -31,6 +31,9 @@ swift and trying out new features and bug fixes.
|
||||
You can run unit tests with `.unittests` and functional tests with
|
||||
`.functests`.
|
||||
|
||||
If you would like to start contributing, check out these [notes](CONTRIBUTING.md)
|
||||
to help you get started.
|
||||
|
||||
### Code Organization
|
||||
|
||||
* bin/: Executable scripts that are the processes run by the deployer
|
||||
|
Loading…
Reference in New Issue
Block a user