Files
deb-nova/nova/tests/functional/api_sample_tests
Sean Dague d359196c32 parametrize max_api_version in tests
There is a chunk of what turns out to be largely busy work in trying
to land a microversion by adjusting a set of tests to always have the
new max microversion. Many of these can be parametrized so that is not
needed (and reduces some nearly irrelevant changes to every
microversion patch).

This doesn't reduce any test coverage. The api_samples static docs
still need to get updated, so docs won't be missed. The intentionally
created merge conflicts on rest_api_version_history.rst will ensure
bumps are required.

Change-Id: I0765b4a6b33fed77b210f72dcd281eb6aad8f564
2016-02-05 18:54:58 -05:00
..
2015-08-15 12:30:20 +10:00
2015-12-03 22:43:26 +00:00

Api Samples

This part of the tree contains templates for API samples. The documentation in doc/api_samples is completely autogenerated from the tests in this directory.

To add a new api sample, add tests for the common passing and failing cases in this directory for your extension, and modify test_samples.py for your tests.

Then run the following command:

tox -e api-samples

Which will create the files on doc/api_samples.

If new tests are added or the .tpl files are changed due to bug fixes, the samples must be regenerated so they are in sync with the templates, as there is an additional test which reloads the documentation and ensures that it's in sync.

Debugging sample generation

If a .tpl is changed, its matching .json must be removed else the samples won't be generated. If an entirely new extension is added, a directory for it must be created before its samples will be generated.