Running Tempest on RDO OpenStack Newton

Tempest is a set of integration tests to run against an OpenStack cluster.

What does RDO provides for Tempest?

RDO provides three packages for running tempest against any OpenStack installation.

python-tempest : It can be used as a python library, consumed as a dependency for out of tree tempest plugins i.e. for horizon and designate tempest plugins.
openstack-tempest : It provides python tempest library and required executables for running tempest.
openstack-tempest-all : It will install openstack-tempest as well as all the tempest plugins on the system.

Deploy packstack using latest RDO Newton packages

Roll out a vm of CentOS 7, Follow these steps:

Install rdo-release-newton rpm

# yum -y install https://rdoproject.org/repos/openstack-newton/rdo-release-newton.rpm

Update your CentOS vm and perform reboot.

# yum -y update

Install openstack-packstack

# yum install -y openstack-packstack

Run packstack by enabling RDO GA testing repo:

# packstack –enable-rdo-testing=y –allinone

Once packstack installation is done, we are good to go ahead.

Install tempest and required tempest plugins

Install tempest

# yum install openstack-tempest

Install tempest plugins based on the openstack services installed and configured on deployment.

Packstack installs by default horizon, nova, neutron, keystone, cinder, swift, glance, ceilometer, aodh and gnocchi.
To find out what are the openstack components installed, just do a rpm query:

# rpm -qa | grep openstack-*

OR you can use openstack-status command for the same.
Just grab the tempest plugins of these services and install it.

# yum install python-glance-tests python-keystone-tests python-horizon-tests-tempest
python-neutron-tests python-cinder-tests python-nova-tests python-swift-tests
python-ceilometer-tests python-gnocchi-tests python-aodh-tests

To find what are tempest plugins installed:

# tempest list-plugins

Once done, you are ready to run tempest.

Configuring and Running tempest

source admin credentials and switch to normal user

# source /root/keystonerc_admin

# su <user>

Create a directory from where you want to run tempest

$ mkdir /home/$USER/tempest; cd /home/$USER/tempest

Configure the tempest directory

$ /usr/share/openstack-tempest-*/tools/configure-tempest-directory

Auto generate tempest configuration for your deployed openstack environment

$ python tools/config_tempest.py –debug identity.uri $OS_AUTH_URL
identity.admin_password $OS_PASSWORD –create

It will automatically create all the required configuration in etc/tempest.conf

To list all the tests

$ testr list-tests

OR

$ ostestr -l

To run tempest tests:

$ ostestr

For running api and scenario tests using ostestr and prints the slowest tests after test run

$ ostestr –regex ‘(?!.*[.*bslowb.*])(^tempest.(api|scenario))’

To run specific tests:

$ python -m testtools.run tempest.api.volume.v2.test_volumes_list.VolumesV2ListTestJSON

OR

$ ostestr –pdb tempest.api.volume.v2.test_volumes_list.VolumesV2ListTestJSON

ostestr –pdb will call python -m testtools.run under the hood.

Thanks to Luigi, Steve, Daniel,
Javier, Alfredo, Alan for the review.

Happy Hacking!
Quelle: RDO

Published by