diff options
| author | Jenkins <jenkins@review.openstack.org> | 2017-07-27 14:16:52 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2017-07-27 14:16:52 +0000 |
| commit | 99bb6f3ecb1f3c883c50bf715618e64b145257b2 (patch) | |
| tree | adb2535f18f2790ff0bfdc831d6979d4729fd7ae /doc/source/contributor/functional_tests.rst | |
| parent | f5bedfc5bab5bc73f791c0cf2c2c033472b700e1 (diff) | |
| parent | a3f9f4f16d0bf64a6b5467c5b6ee25a9214706c6 (diff) | |
| download | python-cinderclient-3.1.0.tar.gz | |
Merge "Rearrange existing documentation to fit the new standard layout"3.1.0
Diffstat (limited to 'doc/source/contributor/functional_tests.rst')
| -rw-r--r-- | doc/source/contributor/functional_tests.rst | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/doc/source/contributor/functional_tests.rst b/doc/source/contributor/functional_tests.rst new file mode 100644 index 0000000..6af85ba --- /dev/null +++ b/doc/source/contributor/functional_tests.rst @@ -0,0 +1,49 @@ +================== +CINDERCLIENT Tests +================== + +Functional Tests +================ + +Cinderclient contains a suite of functional tests, in the cinderclient/ +tests/functional directory. + +These are currently non-voting, meaning that Jenkins will not reject a +patched based on failure of the functional tests. It is highly recommended, +however, that these tests are investigated in the case of a failure. + +Running the tests +----------------- +Run the tests using tox, which calls ostestr via the tox.ini file. To run all +tests simply run:: + + tox -e functional + +This will create a virtual environment, load all the packages from +test-requirements.txt and run all unit tests as well as run flake8 and hacking +checks against the code. + +Note that you can inspect the tox.ini file to get more details on the available +options and what the test run does by default. + +Running a subset of tests using tox +----------------------------------- +One common activity is to just run a single test, you can do this with tox +simply by specifying to just run py27 or py34 tests against a single test:: + + tox -e functional -- -n cinderclient.tests.functional.test_readonly_cli.CinderClientReadOnlyTests.test_list + +Or all tests in the test_readonly_clitest_readonly_cli.py file:: + + tox -e functional -- -n cinderclient.tests.functional.test_readonly_cli + +For more information on these options and how to run tests, please see the +`ostestr documentation <https://docs.openstack.org/os-testr/latest/>`_. + +Gotchas +------- + +The cinderclient.tests.functional.test_cli.CinderBackupTests.test_backup_create_and_delete +test will fail in Devstack without c-bak service running, which requires Swift. +Make sure Swift is enabled when you stack.sh by putting this in local.conf : +enable_service s-proxy s-object s-container s-account |
