summaryrefslogtreecommitdiffstats
path: root/ipatests/ipa-run-tests
Commit message (Collapse)AuthorAgeFilesLines
* Have all the scripts run in python 3 by defaultStanislav Laznicka2018-02-151-1/+1
| | | | | | | | | The Python 3 refactoring effort is finishing, it should be safe to turn all scripts to run in Python 3 by default. https://pagure.io/freeipa/issue/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com>
* ipa-run-tests: make --ignore absolute, tooChristian Heimes2018-01-121-0/+9
| | | | | | | | | | ipa-run-tests now applies the same logic to --ignore then to included paths. https://pagure.io/freeipa/issue/7355 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Michal Reznik <mreznik@redhat.com>
* ipa-run-tests: replace chdir with pluginChristian Heimes2018-01-041-5/+36
| | | | | | | | | | | | | | | | | | | The ipa-run-tests command used os.chdir() to change into the ipatests/ directory. The approach works for simple cases but breaks some pytest features. For example it makes it impossible to selects tests by their fully qualified test name. Further more, coverage statistics break because path and module names get messed up by chdir. A name plugin takes care of adjusting paths relative to ipatests and to add ipatests as base. It's now possible to run tests with qualified test names, e.g. ipa-run-tests ipatests/test_ipalib/test_base.py::test_ReadOnly::test_lock Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Felipe Volpone <fbarreto@redhat.com>
* Enable additional warnings (BytesWarning, DeprecationWarning)Christian Heimes2017-02-101-0/+1
| | | | | | | Closes: https://fedorahosted.org/freeipa/ticket/6631 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* Use pytest conftest.py and drop pytest.iniChristian Heimes2017-01-051-5/+8
| | | | | | | | | | | | | | Let's replace some ugly hacks with proper pytest conftest.py hooks. Test initialization of ipalib.api is now handled in pytest_cmdline_main(). Pytest plugins, markers and ignores are also moved into conftest.py. Additional guards make it possible to run tests without ipaserver installed. I added confcutdir to ensure that pytest does not leave our project space. Pytest used pytest.ini or setup.py before but pytest.ini is gone. Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Switch ipa-run-tests to pytestPetr Viktorin2014-11-211-46/+10
| | | | | | https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Use /usr/bin/python2Xiao-Long Chen2014-01-031-1/+1
| | | | | | | | | | | | Part of the effort to port FreeIPA to Arch Linux, where Python 3 is the default. FreeIPA hasn't been ported to Python 3, so the code must be modified to run /usr/bin/python2 https://fedorahosted.org/freeipa/ticket/3438 Updated by pviktori@redhat.com
* Make BeakerLib logging less verbosePetr Viktorin2013-07-151-2/+2
| | | | | | | | | | | | | Logs from Beaker jobs are normally very brief, with the standard output/error containing detailed information. Make ipa-run-tests with BeakerLib plugin follow this convention. Only include INFO and higher level messages in the Beaker logs. Downgrade several message levels to DEBUG. Log to console using Python logging instead of showing the Beaker logs. Since ipa-run-tests sets up its own logging, Nose's own log handling just causes duplicate messages. Disable it with --nologcapture.
* Show logs in failed testsPetr Viktorin2013-07-151-0/+27
| | | | | | | | | | | Output from IPA's log manager is not captured by Nose's logcapture plugin. Forward IPA logs to a regular Python logger so that they are shown on failures. IPA log messages are also shown on standard error. Filter out Paramiko logs by default; these are too verbose. Part of the work for: https://fedorahosted.org/freeipa/ticket/3621
* Add a plugin for test orderingPetr Viktorin2013-07-151-1/+3
| | | | | | | | | | Tests in test classes decorated by @ipatests.order_plugin.ordered are sorted by the source line number instead of alphabetically, if the plugin is enabled. The ipa-run-tests helper now loads and enables the plugin. This should make writing integration tests easier.
* Add Nose plugin for BeakerLib integrationPetr Viktorin2013-06-171-10/+25
| | | | | | | | | | | The plugin hooks into the Nose runner and IPA's logging infrastructure and calls the appropriate BeakerLib functions (rl*). IPA's log_manager is extended to accept custom Handler classes. The ipa-run-tests helper now loads the plugin. Patr of the work for: https://fedorahosted.org/freeipa/ticket/3621
* Add ipa-run-tests commandPetr Viktorin2013-06-171-0/+37
Part of the work for: https://fedorahosted.org/freeipa/ticket/3654