summaryrefslogtreecommitdiffstats
path: root/ipatests
Commit message (Collapse)AuthorAgeFilesLines
...
* ipatests: Add coverage for referential integrity plugin applied on ↵Tomas Babej2015-01-261-1/+86
| | | | | | | | | | | | ipaAssignedIDView This adds a test case which makes sure that referential integrity plugin does not leave any trailing references for ipaAssignedIDView attribute on hosts, if the ID view being referenced has been deleted. https://fedorahosted.org/freeipa/ticket/4839 Reviewed-By: David Kupka <dkupka@redhat.com>
* DNS tests: warning if forward zone is inactiveMartin Basti2015-01-151-0/+468
| | | | | Ticket: https://fedorahosted.org/freeipa/ticket/4721 Reviewed-By: Petr Spacek <pspacek@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>
* test_host_plugin: Use HostTracker fixturesPetr Viktorin2015-01-143-1222/+803
| | | | | | | | | | | | The racker object "remembers" expected state across several tests, so only changes (rather than all expected state) need to be specified in each test. Also, the tracker fixture will make it easy to use hosts in other test modules. This change makes the tests independent; any permutation of any subset of these tests should now pass. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* test_host_plugin: Split tests into independent classesPetr Viktorin2015-01-141-158/+220
| | | | | | | | Any of the classes may be run alone. In classes not marked @ordered, individual tests are independent. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* test_host_plugin: Convert tests to imperative stylePetr Viktorin2015-01-143-1587/+1262
| | | | | | | | | | | This has several advantages: - Tests other than run-command/check-response can be added easily - Tracebacks are meaningful (which means we'll be able to remove a lot of test name/description/location tracking code) - Individual tests can be selected/deselected using normal pytest mechanisms (but for isolated tests, more changes will be needed) Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Run pylint on testsPetr Viktorin2015-01-1414-39/+55
| | | | | | | | | | | | | | | Drop support for pylint < 1.0 Enable ignoring unknown attributes on modules (both nose and pytest use advanced techniques, support for which only made it to pylint recently) Fix some bugs revealed by pylint Do minor refactoring or add pylint:disable directives where the linter complains. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* New test cases for Forward_zonesMartin Basti2015-01-131-54/+803
| | | | | | https://fedorahosted.org/freeipa/ticket/4750 Reviewed-By: Martin Kosek <mkosek@redhat.com>
* DNS tests: separate current forward zone testsMartin Basti2015-01-131-326/+438
| | | | | Ticket: https://fedorahosted.org/freeipa/ticket/4750 Reviewed-By: Martin Kosek <mkosek@redhat.com>
* ipatests: Use pytest-sourceorderPetr Viktorin2014-12-174-91/+2
| | | | | | | | 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-172-194/+24
| | | | | | | | | | 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>
* ipatests: Invoke class install methods properly with respect to pytest-multihostTomas Babej2014-12-165-13/+13
| | | | | | | | | | Multihost object was is not passed to the install method in the super construction. This fixes setup errors in AD Trust, Forced client reenrollment, CALess and Sudo tests. https://fedorahosted.org/freeipa/ticket/4809 Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* test_integration: Parametrize test instead of using a generatorPetr Viktorin2014-12-111-12/+11
| | | | Reviewed-By: Tomas Babej <tbabej@redhat.com>
* test_integration: Use collect_log from the host, not the testing classPetr Viktorin2014-12-111-8/+8
| | | | | | The testing class no longer has this method. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* test_integration: Use python-pytest-multihostPetr Viktorin2014-12-1114-1131/+526
| | | | | | | | | | | | 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>
* add --hosts and --hostgroup options to allow/retrieve keytab methodsPetr Vobornik2014-12-032-14/+187
| | | | | | | | | | | | | | | | | | `--hosts` and `--hostgroup` options added to: * service-allow-create-keytab * service-allow-retrieve-keytab * service-disallow-create-keytab * service-disallow-retrieve-keytab * host-allow-create-keytab * host-allow-retrieve-keytab * host-disallow-create-keytab * host-disallow-retrieve-keytab in order to allow hosts to retrieve keytab of their services or related hosts as described on http://www.freeipa.org/page/V4/Keytab_Retrieval design page https://fedorahosted.org/freeipa/ticket/4777 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Ignore ipap11helper/setup.py in doctestsPetr Viktorin2014-11-261-0/+1
| | | | | | | | | Pytest imports all modules when running doctests. The setup.py runs code on import, and raises an exception, depending on globa connand-line arguments, so it needs to be ignored. Also, pytest dislikes multiple top-level modules with the same name ("setup" in this case). Again ignoring is the way to go.
* Re-initialize NSS database after otptoken plugin testsTomas Babej2014-11-261-0/+5
| | | | | | | | | | | OTP token tests do not properly reinitialize the NSS db, thus making subsequent xmlrpc tests fail on SSL cert validation. Make sure NSS db is re-initalized in the teardown method. https://fedorahosted.org/freeipa/ticket/4748 Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* Fix error message for nonexistent members and add tests.David Kupka2014-11-241-0/+35
| | | | | | https://fedorahosted.org/freeipa/ticket/4643 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* webui: use domain name instead of domain SID in idrange adder dialogPetr Vobornik2014-11-242-12/+12
| | | | | | | | It's more user friendly. Almost nobody remembers SIDs. https://fedorahosted.org/freeipa/ticket/4661 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* test_integration: Adjust tests for pytestPetr Viktorin2014-11-213-40/+30
| | | | | | | - Customize install() instead of setup_class() - Use pytest parametrization instead of test generators Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Integration tests: Port the BeakerLib plugin and log collection to pytestPetr Viktorin2014-11-216-295/+378
| | | | | | | | | | 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-213-60/+94
| | | | | | | | | 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>
* Switch ipa-run-tests to pytestPetr Viktorin2014-11-211-46/+10
| | | | | | 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-212-0/+75
| | | | | | | | | | | 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-216-108/+145
| | | | | | | | 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-214-19/+55
| | | | | | | | | | 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>
* Declarative tests: Move cleanup to setup_class/teardown_classPetr Viktorin2014-11-211-19/+16
| | | | | | https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Configure pytest to run doctestsPetr Viktorin2014-11-212-0/+19
| | | | | | | | | | | | | | | | | | | The pytest.ini file needs to be in or above the directory py.test is called in. When in IPA project root, this invocation will find ./ipatests/pytest.ini: py.test ipatests/ but these will not (they're equivalent): py.test . py.test So pytest.ini must be in the project root. However, setupttols can't include files outside package directories, so we also need this file to be under ipatests/ Solve the problem by symlinking ./pytest.ini to ipatests/pytest.ini. https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* test_ipapython: Use functions instead of classes in test generatorsPetr Viktorin2014-11-212-11/+11
| | | | | | | | | pytest's support for Nose-style test generators is not bulletproof; use a real function to please it. https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* test_webui: Don't use __init__ for test classesPetr Viktorin2014-11-218-28/+24
| | | | | | https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Use setup_class/teardown_class in Declarative testsPetr Viktorin2014-11-214-22/+9
| | | | | | | | | | Pytest will consider each Declarative test individually, running setup/teardown for each one. Move the setup and teardown to the class level. https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* test_automount_plugin: Fix test orderingPetr Viktorin2014-11-211-2/+2
| | | | | | | | | Nose ran the `test_a_*` and `test_a2_*` tests in opposite order than the source suggested. Fix this. https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* ipatests.util.ClassChecker: Raise AttributeError in get_subclsPetr Viktorin2014-11-211-1/+1
| | | | | | | | Pytest considers NotImplementedError on attribute access an error. https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* tests: Add configuration for pytestPetr Viktorin2014-11-211-0/+2
| | | | | | | | | | By default, pytest considers test classes only if they're named 'Test*'; Nose also allows 'test_*'. Configure pytest to allow the non-pep8 names as well. https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* tests: Use PEP8-compliant setup/teardown method namesPetr Viktorin2014-11-2121-62/+56
| | | | | | | | | | | | The setUp/dearDown names are used in the unittest module, but there is no reason to use them in non-`unittest` test cases. Nose supports both styles (but mixing them can cause trouble when calling super()'s methods). Pytest only supports the new ones. https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Add additional backup & restore checksPetr Viktorin2014-11-201-6/+35
| | | | | | https://fedorahosted.org/freeipa/ticket/3893 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Fix warning message should not contain CLI commandsMartin Basti2014-11-191-3/+6
| | | | | | | Message is now universal for both CLI and WebUI Ticket: https://fedorahosted.org/freeipa/ticket/4647 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
* idrange: include raw range type in outputPetr Vobornik2014-11-111-0/+7
| | | | | | | | iparangetype output is a localized human-readable value which is not suitable for machine-based API consumers Solved by new iparangetyperaw output attribute which contains iparangetype's raw value Reviewed-By: Tomas Babej <tbabej@redhat.com>
* unittests: baserid for ipa-ad-trust-posix idrangesPetr Vobornik2014-11-111-28/+132
| | | | | | https://fedorahosted.org/freeipa/ticket/4221 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Fix CI tests: install_adtrustMartin Basti2014-11-041-1/+9
| | | | | | | IPA uses both named and named-pkcs11 service. If named is masked use named-pkcs11, instead of raising exception Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* fix forwarder validation errorsMartin Basti2014-10-211-0/+6
| | | | | | Fix tests, validation in dnsconfig mod, wuser warning Reviewed-By: Petr Spacek <pspacek@redhat.com>
* tests: management of keytab permissionsPetr Vobornik2014-10-172-0/+730
| | | | | | https://fedorahosted.org/freeipa/ticket/4419 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* DNS missing testsMartin Basti2014-10-091-0/+20
| | | | | | | * try to remove non-existent permission * try to remove idnssoamname using dnszone-mod --name-server= Reviewed-By: David Kupka <dkupka@redhat.com>
* sudo integration test: Remove the local user testPetr Viktorin2014-10-031-23/+0
| | | | | | | | | SSSD does not support sudo rules for local users; these should be added in a local sudoers file. https://fedorahosted.org/freeipa/ticket/4608 Reviewed-By: Martin Kosek <mkosek@redhat.com>
* webui-ci: adjust dnszone-add test to recent DNS changesPetr Vobornik2014-10-031-3/+0
| | | | | | | | 'idnssoamname', 'ip_address' and 'force' fields were removed from DNS zone adder dialog in #4149 https://fedorahosted.org/freeipa/ticket/4604 Reviewed-By: Martin Kosek <mkosek@redhat.com>
* test_forced_client_reenrollment: Don't check for host certificatesPetr Viktorin2014-10-021-1/+1
| | | | | | | Since ticket 4449 we no longer generate host certificates by defailt. Checdk that they are not present. https://fedorahosted.org/freeipa/ticket/4601
* test_service_plugin: Do not lowercase memberof_rolePetr Viktorin2014-10-011-1/+1
| | | | | | This adjusts the test for the change in commit 792c3f9c8c65e24953241247a242490c8fb32492 Related ticket: https://fedorahosted.org/freeipa/ticket/4192