To debug using a local engine and executor without dependencies such as
RabbitMQ, make sure your /etc/mistral/mistral.conf
has the following
settings:
[DEFAULT]
rpc_backend = fake
[pecan]
auth_enable = False
and run the following command in pdb, PyDev or PyCharm:
mistral/cmd/launch.py --server all --config-file /etc/mistral/mistral.conf --use-debugger
Note
In PyCharm, you also need to enable the Gevent compatibility flag in Settings -> Build, Execution, Deployment -> Python Debugger -> Gevent compatible. Without this setting, PyCharm will not show variable values and become unstable during debugging.
In order to be able to conveniently run unit tests, you need to:
Settings -> Tools -> Python Integrated Tools -> Default test runner: Unittests
Run/Debug Configurations -> Defaults -> Python tests -> Unittests -> uncheck Inspect only subclasses of unittest.TestCase
To run the examples find them in mistral-extra repository (https://github.com/openstack/mistral-extra) and follow the instructions on each example.
On Mistral project we have two separate test suites:
mistral:
python-mistralclient:
Almost all existing automated tests can be executed manually on the developer’s desktop (except those which check OpenStack actions). To do this, you should clone “mistral” repository (or “python-mistralclient”) and run the corresponding commands.
Cloning a repository:
$ git clone https://git.opendev.org/openstack/mistral.git
$ cd mistral
To run all unit tests:
$ tox
To run unit tests against a specific python version:
$ tox -e py35
To run tests from a specific test class (using a specific python version):
tox -e py35 -- 'DataFlowEngineTest'
There are several suites of integration tests the mentioned repositories:
mistral-tempest-plugin:
python-mistralclient:
To run integration tests:
$ pip install git+http://git.opendev.org/openstack/tempest.git
$ nosetests mistral-tempest-plugin/mistral_tempest_tests/tests/api/v2
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.