summaryrefslogtreecommitdiffstats
path: root/ipatests/pytest_plugins
Commit message (Collapse)AuthorAgeFilesLines
* Move remaining util functions to tasks moduleChristian Heimes2017-03-221-4/+33
| | | | | | https://pagure.io/freeipa/issue/6798 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Move function run_repeatedly to tasks moduleChristian Heimes2017-03-221-8/+47
| | | | | | https://pagure.io/freeipa/issue/6798 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Move hosts module to ipatests.pytest_plugins.integration.hostsChristian Heimes2017-03-223-2/+72
| | | | | | https://pagure.io/freeipa/issue/6798 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Move tasks module to ipatests.pytest_plugins.integration.tasksChristian Heimes2017-03-222-3/+1249
| | | | | | https://pagure.io/freeipa/issue/6798 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Move env_config module to ipatests.pytest_plugins.integration.env_configChristian Heimes2017-03-223-5/+369
| | | | | | https://pagure.io/freeipa/issue/6798 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Move config module to ipatests.pytest_plugins.integration.configChristian Heimes2017-03-222-1/+164
| | | | | | https://pagure.io/freeipa/issue/6798 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Move helper code for integration pluginChristian Heimes2017-03-221-0/+0
| | | | | | | | | | | | | | | The changes made to ipa-run-tests script in fd1b4f6 broke the ipa-test-config and ipa-test-task scripts which are not executed via pytest. To fix the issue, all helper code and dependencies of the integration plugin are moved out of ipatests.test_integration and into the integration plugin. As first step ipatests.pytest_plugins.integration is turned into a package. https://pagure.io/freeipa/issue/6798 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Add options to run only ipaclient unittestsChristian Heimes2017-03-171-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new option for ipa-run-tests makes the test runner ignore subdirectories or skips tests that depend on the ipaserver package or on a running framework for RPC integration tests. The new option enables testing of client-only builds. $ ipatests/ipa-run-tests --ipaclient-unittests ... platform linux2 -- Python 2.7.13, pytest-2.9.2, py-1.4.32, pluggy-0.3.1 rootdir: /home/heimes/redhat, inifile: tox.ini plugins: sourceorder-0.5, cov-2.3.0, betamax-0.7.1, multihost-1.1 collected 451 items test_util.py ........ util.py .. test_ipaclient/test_csrgen.py ..............ssss... test_ipalib/test_aci.py ................... test_ipalib/test_backend.py ........ test_ipalib/test_base.py ............... test_ipalib/test_capabilities.py . test_ipalib/test_cli.py ... test_ipalib/test_config.py ............... test_ipalib/test_crud.py ............... test_ipalib/test_errors.py ....... test_ipalib/test_frontend.py ........................................ test_ipalib/test_messages.py .... test_ipalib/test_output.py ... test_ipalib/test_parameters.py ............................................................. test_ipalib/test_plugable.py ........ test_ipalib/test_rpc.py ......ssssssss test_ipalib/test_text.py ............................. test_ipalib/test_x509.py ... test_ipapython/test_cookie.py ............ test_ipapython/test_dn.py ........................... test_ipapython/test_ipautil.py .................................................................. test_ipapython/test_ipavalidate.py .......... test_ipapython/test_kerberos.py .............. test_ipapython/test_keyring.py .......... test_ipapython/test_ssh.py ............................... test_pkcs10/test_pkcs10.py ..... https://fedorahosted.org/freeipa/ticket/6517 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Tests: Providing trust tests with tree root domainLenka Doudova2016-11-151-1/+1
| | | | | | https://fedorahosted.org/freeipa/ticket/6347 Reviewed-By: Ganna Kaihorodova <gkaihoro@redhat.com>
* Pylint: remove unused variables in testsMartin Basti2016-10-111-4/+2
| | | | Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
* Pretty-print structures in assert_deepequalStanislav Laznicka2016-09-301-0/+8
| | | | | | | | | | | By default, ipa-run-tests will now pretty-print structures compared in the assert_deepequal function. This behaviour can be turned off by the --no-pretty-print option. https://fedorahosted.org/freeipa/ticket/6212 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com>
* Pylint: enable check for unused-variablesMartin Basti2016-09-271-0/+1
| | | | | | | | | | | | | | | Unused variables may: * make code less readable * create dead code * potentialy hide issues/errors Enabled check should prevent to leave unused variable in code Check is locally disabled for modules that fix is not clear or easy or have too many occurences of unused variables Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Remove unused variables in testsMartin Basti2016-09-271-1/+0
| | | | | | | | This commit removes or marks unused variables as "expected to be unused" by using '_' prefix. Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* CI tests: fix SSSD log collectingMartin Basti2016-07-261-2/+3
| | | | | | | | | Wildcard '*' has not been working for log collecting. I just set the whole SSSD log directory to be collected. tar utility is able to archive whole directories. Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Reverted changes in mh fixture causing some tests to failOleg Fayans2016-03-231-0/+3
| | | | | | | | | | | Some integration tests expect the members of topology to have the testfolder. The testfolder however was created during master and client installations. In case the client is not intalled from the very beginning of the test execution, the test would complain about missing testfolder. https://fedorahosted.org/freeipa/ticket/5723 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Removed a constantly failing call to prepare_hostOleg Fayans2016-03-111-3/+0
| | | | | | | | | | | prepare_host is executed from within each of install_master, install_replica and install_client in tasks.py anyway, so no need to call it here also. Besindes this call kept failing when IntegrationTest wes initialized more than once during the test execution. https://fedorahosted.org/freeipa/ticket/5723 Reviewed-By: Martin Basti <mbasti@redhat.com>
* logger: Use warning instead of warnTomas Babej2016-01-181-1/+1
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* Use the print functionPetr Viktorin2015-09-011-1/+3
| | | | | | | | | In Python 3, `print` is no longer a statement. Call it as a function everywhere, and include the future import to remove the statement in Python 2 code as well. Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* ipatests: Make descriptions sorted according to the order of the testsTomas Babej2015-01-141-3/+3
| | | | Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* ipatests: Use pytest-sourceorderPetr Viktorin2014-12-171-88/+0
| | | | | | | | The plugin to run tests within a class in the order they're defined in the source was split into a separate project. Use this project instead of a FreeIPA-specific copy. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* ipatests: Use pytest-beakerlibPetr Viktorin2014-12-171-191/+14
| | | | | | | | | | The plugin for BeakerLib integration was split into a separate project. If BeakerLib integration is desired, python-pytest-beakerlib shoule be installed separately. The IPA-specific beakerlib integration only sets up logging to BeakerLib, if the plugin is active. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* ipatests: Refactor and fix docstrings in integration pytest pluginTomas Babej2014-12-161-12/+12
| | | | | | https://fedorahosted.org/freeipa/ticket/4809 Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* ipatests: Set the correct number of required clients for IntegrationTestTomas Babej2014-12-161-1/+1
| | | | | | | | Remove the copy-pate error that used number of required replicas instead. https://fedorahosted.org/freeipa/ticket/4809 Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* test_integration: Use python-pytest-multihostPetr Viktorin2014-12-111-52/+67
| | | | | | | | | | | | The core integration testing functionality was split into a separate project. Use this project, and configure it for FreeIPA. The "mh" (multihost) fixture is made available for integration tests. Configuration based on environment variables is moved into a separate module, to ease eventual deprecation. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Integration tests: Port the BeakerLib plugin and log collection to pytestPetr Viktorin2014-11-212-3/+368
| | | | | | | | | | Move the IPA-specific log collection out of the Beakerlib plugin. Add the --logfile-dir option to tests and ipa-test-task, so that logs can be collected even if BeakerLib is not used. https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Switch integration testing config to a fixturePetr Viktorin2014-11-211-0/+89
| | | | | | | | | The hack of storing the config on the class is left in; it would be too much work for too little gain at this time. https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Add local pytest plugin for --with-xunit and --logging-levelPetr Viktorin2014-11-211-0/+73
| | | | | | | | | | | The --with-xunit option ihas the same behavior as in nosetests: it's an alias for pytest's --junitxml=nosetests.py The --logging-level option enables direct IPA logging to stdout. https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Integration tests: Port the ordering plugin to pytestPetr Viktorin2014-11-211-0/+88
| | | | | | | | Ordered integration tests may now be run with pytest. https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Declarative tests: Switch to pytestPetr Viktorin2014-11-212-0/+47
Provide a local pytest plugin to generate tests. The Declarative tests can now only be run with pytest https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>