Manila stores tempest tests as plugin under manila_tempest_tests
directory.
It contains functional and scenario tests.
Tempest plugin installation is common for all its plugins and detailed information can be found in its docs. In simple words: if you have installed manila project on the same machine as tempest, then tempest will find it.
To run tests, it is required to install pip, tox and virtualenv packages on host machine. Then run following command from tempest root directory:
$ tox -e all-plugin -- manila_tempest_tests.tests.api
or to run only scenario tests:
$ tox -e all-plugin -- manila_tempest_tests.tests.scenario
Instead of running all tests, you can specify an individual directory, file, class, or method that contains test code.
To run the tests in the manila_tempest_tests/tests/api/admin
directory:
$ tox -e all-plugin -- manila_tempest_tests.tests.api.admin
To run the tests in the
manila_tempest_tests/tests/api/admin/test_admin_actions.py
module:
$ tox -e all-plugin -- manila_tempest_tests.tests.api.admin.test_admin_actions
To run the tests in the AdminActionsTest class in
manila_tempest_tests/tests/api/admin/test_admin_actions.py
module:
$ tox -e all-plugin -- manila_tempest_tests.tests.api.admin.test_admin_actions.AdminActionsTest
To run the AdminActionsTest.test_reset_share_state test method in
manila_tempest_tests/tests/api/admin/test_admin_actions.py
module:
$ tox -e all-plugin -- manila_tempest_tests.tests.api.admin.test_admin_actions.AdminActionsTest.test_reset_share_state
To run the tests that require only manila-api service running:
$ tox -e all-plugin -- \
\(\?\=\.\*\\\[\.\*\\bapi\\b\.\*\\\]\) \
\(\^manila_tempest_tests.tests.api\)
To run the tests that require all manila services running, but intended to test API behaviour:
$ tox -e all-plugin -- \
\(\?\=\.\*\\\[\.\*\\b\(api\|api_with_backend\)\\b\.\*\\\]\) \
\(\^manila_tempest_tests.tests.api\)
To run the tests that require all manila services running, but intended to test back-end (manila-share) behaviour:
$ tox -e all-plugin -- \
\(\?\=\.\*\\\[\.\*\\bbackend\\b\.\*\\\]\) \
\(\^manila_tempest_tests.tests.api\)
To run only positive tests, use following command:
$ tox -e all-plugin -- \
\(\?\=\.\*\\\[\.\*\\bpositive\\b\.\*\\\]\) \
\(\^manila_tempest_tests.tests.api\)
To run only negative tests, use following command:
$ tox -e all-plugin -- \
\(\?\=\.\*\\\[\.\*\\bnegative\\b\.\*\\\]\) \
\(\^manila_tempest_tests.tests.api\)
To run only positive API tests, use following command:
$ tox -e all-plugin -- \
\(\?\=\.\*\\\[\.\*\\bpositive\\b\.\*\\\]\) \
\(\?\=\.\*\\\[\.\*\\bapi\\b\.\*\\\]\) \
\(\^manila_tempest_tests.tests.api\)
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.