Alexander Chadin 8d62995cf4 Add hostname field to support HA
Change-Id: Ic099070f93edbea738e58f7686d10f354df69532
2018-07-17 18:01:39 +03:00
..
2018-07-17 18:01:39 +03:00
2015-06-04 14:59:34 +02:00

Testing

Functional tests

The following procedure gets you started with Tempest testing but you can also refer to the Tempest documentation for more details.

Tempest installation

You need to install virtualenv, create a virtual environment and activate it:

$ pip install virtualenv
$ virtualenv watcher-env
$ . watcher-env/bin/activate

Then, to install Tempest you can issue the following commands:

$ git clone https://github.com/openstack/tempest/
$ pip install tempest/

There should be set environment variables using the OpenStack RC file. If you don't have RC file yet, create admin-openrc file and fill it using the following example:

export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=admin
export OS_AUTH_URL=http://controller:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2

Then, save file and execute source admin-openrc to set environment variables.

To run functional tests you need to go to python-watcherclient folder, install all requirements and execute tempest run command:

$ pip install -r requirements.txt -r test-requirements.txt
$ pip install .
$ tempest run --regex watcherclient.tests.functional

You can run specified test(s) by using regular expression:

$ tempest run --regex watcherclient.tests.functional.v1.test_action.ActionTests.test_action_list