OpenStack Telemetry (Ceilometer)
Go to file
Chris Dent 552c63849e Declarative HTTP testing for the Ceilometer API
A 'gabbi' tox target is added which runs a declarative HTTP tests
described in YAML files in 'ceilometer/tests/gabbi/gabbits' and loaded by
'ceilometer/tests/gabbi/test_gabbi.py'. These are driven by the 'gabbi'
python package (available from PyPI).

tox and testr are configured to start and run the tests efficiently:

* a mongodb server, using multiple databases, is made available
* the API wsgi application is used directly via 'wsgi-intercept', no
  web server required
* each YAML file is run as a sequence and where number of processors
  allows, in a different test process
* individual tests can be requested in the usual way:

    tox -egabbi -- <test pattern>

  If this is done, all the tests prior to the one requested, from
  its YAML file, will be run as ordered prerequisites.
* tox targets that already run the tests in ceilometer/tests will
  also discover gabbi tests. If there is no mongodb, they will
  be skipped.

A ConfigFixture does the necessary work of adjusting the configuration
and pipeline to use the mongodb database and nothing else. An
internal InterceptFixture uses wsgi-intercept to access the
ceilometer API. Each yaml file has its own intercepted host.

Fixtures are implemented as nested context managers that are declared
per YAML file, see ceilometer/gabbi/fixtures.py and fixtures-samples.yaml
for an example of how they can be used. Every yaml file uses at
least ConfigFixture.

YAML files can use a variety of strategies for formatting requests
and evaluating the correctness of response. See:
http://gabbi.readthedocs.org/en/latest/format.html

The YAML files included here test simple API features for creating and
retrieving samples. Subsequent patches can (and should) create
additional YAML files to describe more complex scenarios that cover
the entire API (for example alarms are not touched at all by this
patch).

Change-Id: I52551f88bc3beac4bf8a92afa45ac70cd97ffcec
Implements: blueprint declarative-http-tests
2015-02-03 13:03:39 +00:00
ceilometer Declarative HTTP testing for the Ceilometer API 2015-02-03 13:03:39 +00:00
doc Declarative HTTP testing for the Ceilometer API 2015-02-03 13:03:39 +00:00
etc Declarative HTTP testing for the Ceilometer API 2015-02-03 13:03:39 +00:00
rally-jobs Add some rally scenarios 2014-12-03 06:39:17 +00:00
tools add event listener to collector 2015-02-02 11:00:47 -05:00
.coveragerc test code should be excluded from test coverage summary 2013-12-11 11:40:51 -05:00
.gitignore Adding build folders & sorting gitignore 2015-01-16 06:42:25 +00:00
.gitreview Update .gitreview for openstack. 2012-11-11 19:13:08 +00:00
.mailmap add mailmap to avoid dup of authors 2014-10-09 10:31:23 +03:00
.testr.conf Declarative HTTP testing for the Ceilometer API 2015-02-03 13:03:39 +00:00
CONTRIBUTING.rst Workflow documentation is now in infra-manual 2014-12-05 03:30:35 +00:00
LICENSE include a copy of the ASL 2.0 2013-03-15 14:25:48 +00:00
MAINTAINERS Fix some spelling mistakes and a incorrect url 2014-03-06 11:28:50 +08:00
README.rst Rename README.md to README.rst 2013-07-14 21:09:38 +02:00
ReleaseNotes Update documentation URL 2012-12-05 10:22:43 +01:00
babel.cfg Ground work for transifex-ify ceilometer. 2012-12-18 10:14:03 +08:00
functions.sh Run unit tests against MySQL 2014-10-01 10:26:27 +02:00
openstack-common.conf sync oslo and bring in versionutils 2015-01-30 15:25:17 -05:00
pylintrc Adds pylint check for critical error in new patches 2014-10-07 17:27:30 +03:00
requirements-py3.txt Remove argparse from requirements 2015-01-23 12:22:39 +01:00
requirements.txt Remove argparse from requirements 2015-01-23 12:22:39 +01:00
setup-test-env-mongodb.sh Run unit tests against MySQL 2014-10-01 10:26:27 +02:00
setup-test-env-mysql.sh Creates one database per sql test 2014-10-07 16:40:59 +02:00
setup-test-env-postgresql.sh Add mysql and postgresql in tox for debug env 2014-11-13 21:36:38 +08:00
setup.cfg Add disk latency metrics implementation in Hyper-V Inspector 2015-02-02 17:18:01 -08:00
setup.py Updated from global requirements 2014-05-20 12:59:42 -04:00
test-requirements-py3.txt Merge "Remove mox from requirements" 2015-01-29 15:25:18 +00:00
test-requirements.txt Declarative HTTP testing for the Ceilometer API 2015-02-03 13:03:39 +00:00
tox.ini Declarative HTTP testing for the Ceilometer API 2015-02-03 13:03:39 +00:00

README.rst

ceilometer

See the ReleaseNotes document and the project home for more info.

http://launchpad.net/ceilometer