diff options
author | John Dickinson <me@not.mn> | 2014-12-02 14:55:32 -0800 |
---|---|---|
committer | Thiago da Silva <thiago@redhat.com> | 2014-12-04 10:41:11 -0500 |
commit | c8ef11d677ef2403f8cc084f6893815f96985c68 (patch) | |
tree | f1e7df2654fb8bdd3ac2edf1dfb28b45b86739ca | |
parent | 07f16dc8ee1e9b0ce58c469440252bd489fd9994 (diff) | |
download | swift-c8ef11d677ef2403f8cc084f6893815f96985c68.tar.gz |
added testing notes to the contributing doc
Change-Id: Ifb83469dabbca435bd3df2c05089dc1a113c4460
-rw-r--r-- | CONTRIBUTING.md | 34 | ||||
-rw-r--r-- | README.md | 3 |
2 files changed, 36 insertions, 1 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c31931aad..507e32ac9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 |