From 57eb68753336275ddba2ff91c256458ab8d80101 Mon Sep 17 00:00:00 2001 From: Deklan Dieterly Date: Mon, 6 Jun 2016 16:22:32 -0600 Subject: [PATCH] Fix RST syntax in tempest tests README Fix the RST syntax and make the README more clear. Change-Id: Ibf964e9c8158efe32538ffa6d2da728b6e2bbcd6 --- .../freezer_api_tempest_plugin/README.rst | 131 ++++++++++-------- 1 file changed, 71 insertions(+), 60 deletions(-) diff --git a/freezer_api/tests/freezer_api_tempest_plugin/README.rst b/freezer_api/tests/freezer_api_tempest_plugin/README.rst index 8f360665..33357bd4 100644 --- a/freezer_api/tests/freezer_api_tempest_plugin/README.rst +++ b/freezer_api/tests/freezer_api_tempest_plugin/README.rst @@ -1,94 +1,105 @@ -=============================================== +================================== Tempest Integration of Freezer API -=============================================== +================================== This directory contains Tempest tests to cover the freezer-api project. - - Instructions for Running/Developing Tempest Tests with Freezer API Project -1. Need Devstack or other Environment for running Keystone +#. Make sure there is Devstack or other environment for running Keystone and Elasticsearch. -2. Clone the Tempest Repo +#. Clone the Tempest Repo:: -3. Create virtual env for Tempest + run 'git clone https://github.com/openstack/tempest.git' -4. Activate the Tempest virtual env - run 'source ~/virtualenvs/tempest-freezer-api/bin/activate' +#. Create a virtual environment for Tempest. In these instructions, the Tempest virtual environment is ``~/virtualenvs/tempest-freezer-api``. -5. Make sure you have latest pip installed - run 'pip install --upgrade pip' +#. Activate the Tempest virtual environment:: -6. install Tempest requirements.txt and test-requirements.txt in the Tempest -virtual env - run 'pip install -r requirements.txt -r test-requirements.txt' + run 'source ~/virtualenvs/tempest-freezer-api/bin/activate' -7. Install Tempest project into virtual env - run ‘python setup.py develop’ +#. Make sure you have the latest pip installed in the virtual environment:: -8. Create logging.conf in Tempest Repo home dir/etc + run 'pip install --upgrade pip' - Make a copy of logging.conf.sample as logging.conf +#. Install Tempest requirements.txt and test-requirements.txt in the Tempest virtual environment:: - In logging configuration + run 'pip install -r requirements.txt -r test-requirements.txt' - You will see this error on Mac OS X +#. Install Tempest project into the virtual environment in develop mode:: - socket.error: [Errno 2] No such file or directory - Edit logging.conf + run ‘python setup.py develop’ - Change ‘/dev/log/ to '/var/run/syslog’ in logging.conf +#. Create logging.conf in Tempest Repo home dir/etc - see: https://github.com/baremetal/python-backoff/issues/1 + Make a copy of logging.conf.sample as logging.conf -9. Create tempest.conf in Tempest Repo home dir/etc + In logging configuration - run 'oslo-config-generator --config-file etc/config-generator.tempest.conf --output-file etc/tempest.conf' + You will see this error on Mac OS X - Add the following sections to tempest.conf + socket.error: [Errno 2] No such file or directory - [identity] + To fix this, edit logging.conf - username = freezer - password = secretservice - tenant_name = service - domain_name = default - admin_username = admin - admin_password = secretadmin - admin_domain_name = default - admin_tenant_name = admin - alt_username = admin - alt_password = secretadmin - alt_tenant_name = admin - use_ssl = False - auth_version = v3 - uri = http://10.10.10.6:5000/v2.0/ - uri_v3 = http://10.10.10.6:35357/v3/ + Change ‘/dev/log/ to '/var/run/syslog’ in logging.conf - [auth] + see: https://github.com/baremetal/python-backoff/issues/1 for details - allow_tenant_isolation = true - tempest_roles = admin +#. Create tempest.conf in Tempest Repo home dir/etc:: - Modify the uri and the uri_v3 to point to the host where Keystone is - running + run 'oslo-config-generator --config-file etc/config-generator.tempest.conf --output-file etc/tempest.conf' -10. Clone freezer-api Repo + Add the following sections to tempest.conf and modify uri and uri_v3 to point to the host where Keystone is running:: -11. Set virtualenv to the Tempest virtual env - run 'source ~/virtualenvs/tempest-freezer-api/bin/activate' + [identity] -12. pip install freezer-api requirements.txt and test-requirements.txt in -Tempest virtualenv - run 'pip install -r requirements.txt -r test-requirements.txt' + username = freezer + password = secretservice + tenant_name = service + domain_name = default + admin_username = admin + admin_password = secretadmin + admin_domain_name = default + admin_tenant_name = admin + alt_username = admin + alt_password = secretadmin + alt_tenant_name = admin + use_ssl = False + auth_version = v3 + uri = http://10.10.10.6:5000/v2.0/ + uri_v3 = http://10.10.10.6:35357/v3/ -13. Install nose in virtual env - run 'pip install nose' + [auth] -14. Install freezer-api project into virtual env - run ‘python setup.py develop’ in Tempest virtual env + allow_tenant_isolation = true + tempest_roles = admin -15. Set project interpreter (pycharm) to Tempest virtual env -16. Create test config using Tempest virtual env as python interpreter +#. Clone freezer-api Repo:: + + run 'git clone https://github.com/openstack/freezer-api.git' + +#. Set the virtual environment for the freezer-api to the Tempest virtual environment:: + + run 'source ~/virtualenvs/tempest-freezer-api/bin/activate' + +#. pip install freezer-api requirements.txt and test-requirements.txt in the Tempest virtual environment:: + + run 'pip install -r requirements.txt -r test-requirements.txt' + +#. Install nose in the Tempest virtual environment:: + + run 'pip install nose' + +#. Install the freezer-api project into the Tempest virtual environment in develop mode:: + + run ‘python setup.py develop’ + +#. Setup the freezer-api.conf and freezer-paste.ini files according to the main freezer-api README.rst + +#. Set the freezer-api project interpreter (pycharm) to the Tempest virtual environment. + +#. Create a test config (pycharm) using the Tempest virtual environment as python interpreter. + +#. Run the tests in the api directory in the freezer_api_tempest_plugin directory.