Jesse Keating 8e8dcf9360 Don't hard set keystone endpoint
Keystone client utilizes the auth_url provided to it in order to
discover the appropriate end point for the action. It will either use
the publicURL or the adminURL it gets in the service catalog for the
identity service. UNLESS caller to the keystone client hard sets the
endpoint key, in which case keystone will blindly use it instead of
looking in the catalog. Because rally was setting it, rally also had to
set it differently when doing admin level stuff, but rally doesn't have
to do that at all. Rally can rely on the service catalog and let
keystone sort it out.

This change removes manually setting endpoint and just passes along the
auth_url to keystone. This obviates the need to define an admin_port in
a deployment configuration, and reduces the number of tests that need to
be ran.

A warning will be issued if a deployment defines an admin_port, however
the admin_port itself will be ignored. This provides some backwards
compatibility with existing deployments.

Change-Id: I917412e954e57ca5f03df0bb739b7806d38a12a5
Related-Bug: 1398375
2015-01-07 10:55:56 -08:00
..
2014-12-17 17:27:36 +02:00
2015-01-06 13:01:30 +02:00
2015-01-07 10:55:56 -08:00
2014-11-29 22:36:51 -08:00

Testing

Please, don't hesitate to write tests ;)

Unit tests

Files: /tests/unit/*

The goal of unit tests is to ensure that internal parts of the code work properly. All internal methods should be fully covered by unit tests with a reasonable mocks usage.

About Rally unit tests:

  • All unit tests are located inside /tests/unit/*
  • Tests are written on top of: testtools, fixtures and mock libs
  • Tox is used to run unit tests

To run unit tests locally:

$ pip install tox
$ tox

To run py26, py27 or pep8 only:

$ tox -e <name>

#NOTE: <name> is one of py26, py27 or pep8

To get test coverage:

$ tox -e cover

#NOTE: Results will be in /cover/index.html

To generate docs:

$ tox -e docs

#NOTE: Documentation will be in doc/source/_build/html/index.html

Functional tests

Files: /tests/functional/*

The goal of functional tests is to check that everything works well together. Fuctional tests use Rally API only and check responses without touching internal parts.

To run functional tests locally:

$ source openrc
$ rally deployment create --fromenv --name testing
$ tox -e cli

#NOTE: openrc file with OpenStack admin credentials

Rally CI scripts

Files: /tests/ci/*

This directory contains scripts and files related to the Rally CI system.

Rally Style Commandments

File: /tests/hacking/checks.py

This module contains Rally specific hacking rules for checking commandments.