deb-ceilometer/ceilometer
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
..
agent add event listener to collector 2015-02-02 11:00:47 -05:00
alarm Merge "Expose alarm severity in Alarm Model" 2015-01-29 21:48:46 +00:00
api Merge "Expose alarm severity in Alarm Model" 2015-01-29 21:48:46 +00:00
cmd Refactor ipmi agent manager 2015-01-16 09:09:05 +08:00
compute Add disk latency metrics implementation in Hyper-V Inspector 2015-02-02 17:18:01 -08:00
data_processing Use oslo_config instead of deprecated oslo.config 2015-01-15 12:51:18 +04:00
dispatcher add event listener to collector 2015-02-02 11:00:47 -05:00
energy Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
event add event listener to collector 2015-02-02 11:00:47 -05:00
hardware Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
identity Use oslo_config instead of deprecated oslo.config 2015-01-15 12:51:18 +04:00
image Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
ipmi Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
key_value_storage Use oslo_config instead of deprecated oslo.config 2015-01-15 12:51:18 +04:00
locale Imported Translations from Transifex 2015-02-02 06:08:29 +00:00
network Merge "Upgrade to hacking 0.10" 2015-01-28 11:01:09 +00:00
objectstore deprecate swift middleware 2015-01-30 15:31:13 -05:00
openstack sync oslo and bring in versionutils 2015-01-30 15:25:17 -05:00
orchestration Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
profiler Use oslo_config instead of deprecated oslo.config 2015-01-15 12:51:18 +04:00
publisher add event listener to collector 2015-02-02 11:00:47 -05:00
storage Merge "Expose alarm severity in Alarm Model" 2015-01-29 21:48:46 +00:00
tests Declarative HTTP testing for the Ceilometer API 2015-02-03 13:03:39 +00:00
transformer Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
volume Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
__init__.py Disable eventlet monkey-patching of DNS 2015-01-19 12:45:23 +00:00
cli.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
collector.py add event listener to collector 2015-02-02 11:00:47 -05:00
coordination.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
i18n.py Port to graduated library oslo.i18n 2014-12-09 01:11:24 +08:00
messaging.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
middleware.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
neutron_client.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
notification.py add event listener to collector 2015-02-02 11:00:47 -05:00
notifier.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
nova_client.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
opts.py Correct name of "ipmi" options group 2015-01-21 12:19:54 +00:00
pipeline.py enable event pipeline 2015-02-02 10:03:47 -05:00
sample.py Use oslo_config instead of deprecated oslo.config 2015-01-15 12:51:18 +04:00
service.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
utils.py add event listener to collector 2015-02-02 11:00:47 -05:00