Felipe Monteiro | 7bc35dc | 2017-04-19 21:11:46 +0100 | [diff] [blame] | 1 | .. |
| 2 | |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 3 | ======== |
| 4 | Usage |
| 5 | ======== |
| 6 | |
Felipe Monteiro | 7bc35dc | 2017-04-19 21:11:46 +0100 | [diff] [blame] | 7 | Running Patrole Tests in Tempest |
| 8 | ================================ |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 9 | |
Felipe Monteiro | 7bc35dc | 2017-04-19 21:11:46 +0100 | [diff] [blame] | 10 | If Patrole is installed correctly, then the API tests can be executed |
| 11 | from inside the tempest root directory as follows: :: |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 12 | |
Felipe Monteiro | 7bc35dc | 2017-04-19 21:11:46 +0100 | [diff] [blame] | 13 | tox -eall-plugin -- patrole_tempest_plugin.tests.api |
| 14 | |
| 15 | To execute patrole tests for a specific module, run: :: |
| 16 | |
| 17 | tox -eall-plugin -- patrole_tempest_plugin.tests.api.compute |
| 18 | |
| 19 | To change the role that the patrole tests are being run as, edit |
| 20 | ``rbac_test_role`` in the ``rbac`` section of tempest.conf: :: |
| 21 | |
| 22 | [rbac] |
| 23 | rbac_test_role = Member |
| 24 | ... |
| 25 | |
| 26 | .. note:: |
| 27 | |
| 28 | The ``rbac_test_role`` is service-specific. Member, for example, |
| 29 | is an arbitrary role, but by convention is used to designate the default |
| 30 | non-admin role in the system. Most patrole tests should be run with |
| 31 | **admin** and **Member** roles. However, some services, like Heat, take |
| 32 | advantage of a role called **heat_stack_user**, as it appears frequently |
| 33 | in Heat's policy.json. |
| 34 | |
| 35 | For more information about the Member role, |
| 36 | please see: `<https://ask.openstack.org/en/question/4759/member-vs-_member_/>`__. |