Artom Lifshitz 3abbb3345a tox: enable unit tests and fix flake8
This patch enables a tox unit tests job, with a few associated
changes:
* In tox.ini, fix broken py27 env by removing pretty_tox.sh and just
  using stestr directly (also remove some cruft).
* De-empty-fy requirements.txt based on imports in the code
* Clean up test-requirements.txt
* Move tempest tests up a level, since the tests subdirectory is for
  unit tests for this project, not tempest tests to run against an
  OpenStack deployment

Change-Id: I2b258c99bb8d624f8f1aac1fd253d91180856a32
2018-01-09 11:16:47 -05:00
2017-12-11 16:33:19 +00:00
2017-12-12 17:55:56 +01:00
2017-12-12 17:55:00 +01:00
2018-01-09 11:16:47 -05:00

RHOS Test plugin

This repo is a Tempest plugin that contains scenario tests ran against RHOS internals. It's still a work in progress for now.

Install, configure and and run

These steps should be executed after Tempest has been installed and configured. It's assumed that the Unix user running the tests has SSH access to all the nova nodes. In most cases the plugin is executed as the stack user on the undercloud node.

  1. Install from source
WORKSPACE=/some/directory
cd $WORKSPACE
git clone https://github.com/RHOS-QE/RHOS-Tempest-Plugin
cd RHOS-Tempest-Plugin
sudo python setup.py install
  1. Add these lines at the end of your tempest.conf file
[compute_private_config]
target_controller = <address of the nova controller>
target_ssh_user = heat-admin
target_private_key_path = /home/stack/.ssh/id_rsa
containers = <true/false>
  1. Execute the tests
tempest run --regex rhostests.

How to add a new test

New tests should be added to the rhos_tempest_plugin/tests directory. The file rhos_tempest_plugin/tests/api/test_sample.py should serve as an example of how to write a test.

According to the plugin interface doc, you should mainly import "stable" APIs which usually are:

  • tempest.lib.*
  • tempest.config
  • tempest.test_discover.plugins

Importing classes from tempest.api.* could be dangerous since future version of Tempest could break.

Description
Tempest plugin for whitebox testing. For testing things not exposed through the REST APIs.
Readme 24 MiB
Languages
Python 98.3%
Shell 1%
Jinja 0.7%