fix link
Change-Id: I85866c70611ea297f5742ae9bf199079800cf197
This commit is contained in:
parent
281951c54a
commit
f8fc0a3b82
@ -2,49 +2,49 @@
|
|||||||
Tempest Integration of valet
|
Tempest Integration of valet
|
||||||
===============================================
|
===============================================
|
||||||
|
|
||||||
Tempest has an external test plugin interface which enables anyone to integrate an
|
Tempest has an external test plugin interface which enables anyone to integrate an
|
||||||
external test suite as part of a tempest run. This will let any project leverage
|
external test suite as part of a tempest run. This will let any project leverage
|
||||||
being run with the rest of the tempest suite while not requiring the tests live in
|
being run with the rest of the tempest suite while not requiring the tests live in
|
||||||
the tempest tree.
|
the tempest tree.
|
||||||
http://docs.openstack.org/developer/tempest/plugin.html
|
https://docs.openstack.org/tempest/latest/
|
||||||
|
|
||||||
Dealing with configuration options
|
Dealing with configuration options
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
Historically Tempest didn't provide external guarantees on its configuration options.
|
Historically Tempest didn't provide external guarantees on its configuration options.
|
||||||
However, with the introduction of the plugin interface this is no longer the case. An
|
However, with the introduction of the plugin interface this is no longer the case. An
|
||||||
external plugin can rely on using any configuration option coming from Tempest, there
|
external plugin can rely on using any configuration option coming from Tempest, there
|
||||||
will be at least a full deprecation cycle for any option before it's removed. However,
|
will be at least a full deprecation cycle for any option before it's removed. However,
|
||||||
just the options provided by Tempest may not be sufficient for the plugin. If you need
|
just the options provided by Tempest may not be sufficient for the plugin. If you need
|
||||||
to add any plugin specific configuration options you should use the register_opts and
|
to add any plugin specific configuration options you should use the register_opts and
|
||||||
get_opt_lists methods to pass them to Tempest when the plugin is loaded. When adding
|
get_opt_lists methods to pass them to Tempest when the plugin is loaded. When adding
|
||||||
configuration options the register_opts method gets passed the CONF object from tempest.
|
configuration options the register_opts method gets passed the CONF object from tempest.
|
||||||
This enables the plugin to add options to both existing sections and also create new
|
This enables the plugin to add options to both existing sections and also create new
|
||||||
configuration sections for new options.
|
configuration sections for new options.
|
||||||
|
|
||||||
Using Plugins
|
Using Plugins
|
||||||
-------------
|
-------------
|
||||||
Tempest will automatically discover any installed plugins when it is run. So by just
|
Tempest will automatically discover any installed plugins when it is run. So by just
|
||||||
installing the python packages which contain your plugin you'll be using them with tempest,
|
installing the python packages which contain your plugin you'll be using them with tempest,
|
||||||
nothing else is really required.
|
nothing else is really required.
|
||||||
|
|
||||||
However, you should take care when installing plugins. By their very nature there are no
|
However, you should take care when installing plugins. By their very nature there are no
|
||||||
guarantees when running tempest with plugins enabled about the quality of the plugin.
|
guarantees when running tempest with plugins enabled about the quality of the plugin.
|
||||||
Additionally, while there is no limitation on running with multiple plugins it's worth
|
Additionally, while there is no limitation on running with multiple plugins it's worth
|
||||||
noting that poorly written plugins might not properly isolate their tests which could cause
|
noting that poorly written plugins might not properly isolate their tests which could cause
|
||||||
unexpected cross interactions between plugins.
|
unexpected cross interactions between plugins.
|
||||||
|
|
||||||
Notes for using plugins with virtualenvs
|
Notes for using plugins with virtualenvs
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
When using a tempest inside a virtualenv (like when running under tox) you have to ensure that
|
When using a tempest inside a virtualenv (like when running under tox) you have to ensure that
|
||||||
the package that contains your plugin is either installed in the venv too or that you have system
|
the package that contains your plugin is either installed in the venv too or that you have system
|
||||||
site-packages enabled. The virtualenv will isolate the tempest install from the rest of your system
|
site-packages enabled. The virtualenv will isolate the tempest install from the rest of your system
|
||||||
so just installing the plugin package on your system and then running tempest inside a venv will not
|
so just installing the plugin package on your system and then running tempest inside a venv will not
|
||||||
work.
|
work.
|
||||||
|
|
||||||
Tempest also exposes a tox job, all-plugin, which will setup a tox virtualenv with system site-packages
|
Tempest also exposes a tox job, all-plugin, which will setup a tox virtualenv with system site-packages
|
||||||
enabled. This will let you leverage tox without requiring to manually install plugins in the tox venv
|
enabled. This will let you leverage tox without requiring to manually install plugins in the tox venv
|
||||||
before running tests.
|
before running tests.
|
||||||
|
|
||||||
Commands to Run the plugin
|
Commands to Run the plugin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user