
* There was too much of information in the README.rst which was redundant. So, added some useful links in the file and removed redundant information. * Added the debug_guide which provides some brief information about the debugging of mistral. Change-Id: I9d3505864bec6b7ae4e4b2c386a98fd5a808564a Partial-Implements: blueprint mistral-doc Implements: blueprint mistral-docs-troubleshooting
1.7 KiB
Mistral Debugging Guide
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.
Running unit tests in PyCharm
In order to be able to conveniently run unit tests, you need to:
- Set unit tests as the default runner:
Settings -> Tools -> Python Integrated Tools -> Default test runner: Unittests
- Enable test detection for all classes:
Run/Debug Configurations -> Defaults -> Python tests -> Unittests -> uncheck Inspect only subclasses of unittest.TestCase
Running examples
To run the examples find them in mistral-extra repository (https://github.com/openstack/mistral-extra) and follow the instructions on each example.
Tests
You can run some of the functional tests in non-openstack mode locally. To do this:
set
auth_enable = False
in themistral.conf
and restart Mistralexecute:
$ ./run_functional_tests.sh
To run tests for only one version need to specify it:
$ bash run_functional_tests.sh v1
More information about automated tests for Mistral can be found on Mistral Wiki.