deb-ceilometer/ceilometer/tests
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 disk latency metrics implementation in Hyper-V Inspector 2015-02-02 17:18:01 -08:00
alarm Merge "Expose alarm severity in Alarm Model" 2015-01-29 21:48:46 +00:00
api add event listener to collector 2015-02-02 11:00:47 -05:00
collector Remove the collector submodule 2013-11-26 16:03:30 +01: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 enable event pipeline 2015-02-02 10:03:47 -05:00
gabbi Declarative HTTP testing for the Ceilometer API 2015-02-03 13:03:39 +00:00
hardware Use oslo_utils instead of deprecated oslo.utils 2015-01-10 21:04:23 +08:00
identity Add role assignment notifications for identity 2014-10-09 11:24:11 -04:00
image Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
ipmi Merge "Fix IPMI unit test to cover different platforms" 2015-02-02 18:45:09 +00:00
key_value_storage Added metering for magnetodb 2015-01-06 22:17:18 +05:30
network Merge "Upgrade to hacking 0.10" 2015-01-28 11:01:09 +00:00
objectstore Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
orchestration Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
profiler Switch to oslotest 2014-08-21 11:42:15 +02:00
publisher add event listener to collector 2015-02-02 11:00:47 -05:00
storage add event listener to collector 2015-02-02 11:00:47 -05:00
volume Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
__init__.py Skeleton for API server 2012-07-27 10:34:36 -04:00
base.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
constants.py Correct alarm timestamp field in unittest code 2014-11-07 11:02:39 +08:00
db.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
mocks.py [HBase] Improves speed of unit tests on real HBase backend 2014-09-24 15:08:36 +04:00
pipeline_base.py add event pipeline 2015-01-26 10:49:13 -05:00
test_bin.py Merge "Disable proxy in unit test case of test_bin" 2015-01-29 21:49:58 +00:00
test_collector.py add event listener to collector 2015-02-02 11:00:47 -05:00
test_coordination.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
test_decoupled_pipeline.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
test_deprecated_pipeline.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
test_event_pipeline.py add event pipeline 2015-01-26 10:49:13 -05:00
test_messaging.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
test_middleware.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
test_neutronclient.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
test_notification.py enable event pipeline 2015-02-02 10:03:47 -05:00
test_notifier.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
test_novaclient.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00
test_sample.py Add __repr__ method for sample.Sample 2014-10-30 00:07:53 +08:00
test_utils.py Upgrade to hacking 0.10 2015-01-23 17:43:04 +01:00