summaryrefslogtreecommitdiffstats
path: root/ipatests
Commit message (Collapse)AuthorAgeFilesLines
* Hidden Replica: Add a test for Automatic CRL configurationndehadra2019-09-131-0/+25
| | | | | | | | | | | Added test to check whether hidden replica can be configurred as CRL generation master. Related Tickets: https://pagure.io/freeipa/issue/7307 Signed-off-by: ndehadra <ndehadra@redhat.com> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* prci: increase gating tasks priorityFrancisco Trivino2019-09-121-20/+20
| | | | | | | | | | | | Sometimes the gating tasks (build and jobs) are blocked because of nightly regression remaining tasks are in progress. The reason is because nightly regressions are not finished or they are re-triggered during day-time. Gating tasks are blocked because they have same priority than nightly tasks. This commit increases gating tasks priority so the testing of pull requests will not be blocked anymore. Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* WebUI: Make 'Unlock' option is available only on locked user pageSerhii Tsymbaliuk2019-09-111-1/+2
| | | | | | | | | | The implementation includes checking password policy for selected user. 'Unlock' option is available only in case user reached a limit of login failures. Ticket: https://pagure.io/freeipa/issue/5062 Signed-off-by: Serhii Tsymbaliuk <stsymbal@redhat.com> Reviewed-By: Petr Vobornik <pvoborni@redhat.com> Reviewed-By: Armando Neto <abiagion@redhat.com>
* prci: fix typo on nightly test definitionsArmando Neto2019-09-112-2/+2
| | | | | | | PR-CI breaks if the class to execute the tests doesn't exist. Signed-off-by: Armando Neto <abiagion@redhat.com> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* Extend the list of supported pre-auth mechanisms in IPA server APIChangmin Teng2019-09-102-6/+11
| | | | | | | | | | | | | As new authentication indicators implemented, we also modified server API to support those new values. Also, "krbprincipalauthind" attribute is modified to use a pre-defined set of values instead of arbitrary strings. Resolves: https://pagure.io/freeipa/issue/8001 Signed-off-by: Changmin Teng <cteng@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Simo Sorce <ssorce@redhat.com> Reviewed-By: Robbie Harwood <rharwood@redhat.com>
* ipatests: add tests for ipa host-add with non-default maxhostnamelengthMichal Polovka2019-09-091-24/+118
| | | | | | | | | | | | | Implement test for ticket 2018: Change hostname length limit to 64. The fix provides a new configuration parameter (maxhostname) that can be modified through ipa config-mod, and governs the max hostname len allowed through ipa host-add. Add new tests: - check that maxhostname cannot be changed to a value < 64 - check that ipa host-add is refused if the hostname length is > maxhostname - check that ipa host-add is OK if the hostname length is <= maxhostname Related: https://pagure.io/freeipa/issue/2018 Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* ipatests: refactor and extend tests for IPA-Samba integrationSergey Orlov2019-09-066-131/+325
| | | | | | | | | | | | | | Add tests for following scenarios: * running `ipa-client-samba --uninstall` without prior installation * mount and access Samba share by IPA user * mount and access Samba share by AD user * mount samba share by one IPA user and access it by another one * try mount samba share without kerberos authentication * uninstall and reinstall ipa-client-samba Relates: https://pagure.io/freeipa/issue/3999 Reviewed-By: Michal Polovka <mpolovka@redhat.com> Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
* ipatests: modify run_command to allow specify successful return codesSergey Orlov2019-09-061-3/+11
| | | | | Reviewed-By: Michal Polovka <mpolovka@redhat.com> Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
* ipatests: add utility functions related to using and managing user accountsSergey Orlov2019-09-061-2/+42
| | | | | Reviewed-By: Michal Polovka <mpolovka@redhat.com> Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
* ipatests: allow to pass additional options for clients installationSergey Orlov2019-09-061-4/+4
| | | | | Reviewed-By: Michal Polovka <mpolovka@redhat.com> Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
* ipatests: add nightly definition for DS integration testsFlorence Blanc-Renaud2019-09-061-291/+99
| | | | | | | | | | | | | | | | | This commit is a first step in order to run nightly integration tests with the 389-ds Directory Server. It is updating the tests that should be run against a nightly build of 389-ds. The vagrant box freeipa/389ds-master-f30 version 0.0.1 has already been created, available in vagrant cloud. freeipa-pr-ci workspace also already contains the nightly scheduler definition for this job (saturdays 00:10, using nightly_master_389ds.yaml) but the cron job is not scheduled yet. Signed-off-by: Florence Blanc-Renaud <flo@redhat.com> Reviewed-By: Francois Cami <fcami@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* Fix wrong use of identity operationChristian Heimes2019-09-045-7/+7
| | | | | | | | | Strings should not be compared with the identity operation 'is' or 'is not'. Fixes: https://pagure.io/freeipa/issue/8057 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* ipatests: fix topology for TestIpaNotConfigured in PR-CI nightly definitionsMichal Polovka2019-08-303-3/+3
| | | | | | | | | Topology for TestIpaNotConfigured is changed from ipaserver to master_1repl in order to prevent aforementioned test suite runner from configuring ipa-server, which is required by the test itself. Resolves: https://pagure.io/freeipa/issue/8055 Related: https://pagure.io/freeipa/issue/6843
* ipatests: fix wrong xfail in test_domain_resolution_orderFlorence Blanc-Renaud2019-08-301-4/+0
| | | | | | | | | | | | | | | | The test is written for a SSSD fix delivered in 2.2.0, but has a xfail based on fedora version < 30. SSSD 2.2.0 was originally available only on fedora 30 but is now also available on fedora 29, and recent runs on f29 started to succeed (because the fix is now present) but with a strict xfail. The fix completely removes the xfail as the current branch is supported on fedora 29 and 30. Fixes: https://pagure.io/freeipa/issue/8052 Signed-off-by: Florence Blanc-Renaud <flo@redhat.com> Reviewed-By: Sergey Orlov <sorlov@redhat.com> Reviewed-By: Francois Cami <fcami@redhat.com>
* WebUI tests: Fix login screen loading issueSerhii Tsymbaliuk2019-08-291-0/+1
| | | | | | | | | | test_webui/test_loginscreen fails because login screen is rendered with delays. To solve the issue small pause added after login. Ticket: https://pagure.io/freeipa/issue/8053 Signed-off-by: Serhii Tsymbaliuk <stsymbal@redhat.com> Reviewed-By: Francois Cami <fcami@redhat.com>
* ipatests: remove xfail in TestIpaClientAutomountFileRestoreFrançois Cami2019-08-291-2/+0
| | | | | | | | | Remove xfail in TestIpaClientAutomountFileRestore to check the associated bugfix. Related-to: https://pagure.io/freeipa/issue/8054 Signed-off-by: François Cami <fcami@redhat.com> Reviewed-By: Thomas Woerner <twoerner@redhat.com>
* Added testcase to check capitalization fix while running ipa user-modsumenon2019-08-291-0/+36
| | | | | | | | | | | | | | | 1. This testcase checks that when ipa user-mod command is run with capital letters there is no error shown in the console, instead the modifications for first and last name of the user is applied. 2. Adding tasks.kinit_admin since the test was being executed as different user leading to permission issue. ipa: ERROR: Insufficient access: Could not read UPG Definition originfilter. Check your permissions Issue: https://pagure.io/freeipa/issue/5879 Reviewed-By: Florence Blanc-Renaud <flo@redhat.com> Reviewed-By: Mohammad Rizwan Yusuf <myusuf@redhat.com> Reviewed-By: Francois Cami <fcami@redhat.com>
* Move ipachangeconf from ipaclient.install to ipapythonRob Critenden2019-08-281-1/+1
| | | | | | | | | This will let us call it from ipaplatform. Mark the original location as deprecated. Reviewed-By: Francois Cami <fcami@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* ipatests: check that ipa-client-automount restores nsswitch.conf at ↵François Cami2019-08-284-0/+108
| | | | | | | | | | | | uninstall time Check that using ipa-client-install, ipa-client-automount --no-ssd, then uninstalling both properly restores nsswitch.conf sequentially. Related-to:: https://pagure.io/freeipa/issue/8038 Signed-off-by: François Cami <fcami@redhat.com> Reviewed-By: Francois Cami <fcami@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* ipatests: Test for ipa-backup with ipa not configuredMichal Polovka2019-08-274-0/+60
| | | | | | | | | | | | | | | Added test class for executing tests without ipa server being configured. This is achieved by not providing topology attribute in the test class. Subsequently implemented test for PG6843 - ipa-backup does not create log file at /var/log/ - by invoking ipa-backup command with ipa server not configured and checking for expected error code presence of /var/log in the error message. https://pagure.io/freeipa/issue/6843 Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com> Reviewed-By: Tibor Dudlák <tdudlak@redhat.com> Reviewed-By: François Cami <fcami@redhat.com>
* Mark failing test as xfail for use of python-dns make_ds methodAlexander Bokovoy2019-08-221-0/+3
| | | | | | | | | | https://github.com/rthalley/dnspython/issues/343 documents broken use of hashes in dns.dnssec.make_ds() and other python-dns methods. This is a regression introduced with python-dns 1.16. Mark the test as expecting to fail until python-dns is fixed in Fedora. Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* prci: update test definitionsArmando Neto2019-08-228-1478/+1690
| | | | | | | | | Update boxes used in nightlies runs and add new ones. Based on the changes made in freeipa/freeipa-pr-ci#304. Signed-off-by: Armando Neto <abiagion@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* Nightly test definition: add missing testsFlorence Blanc-Renaud2019-08-144-0/+72
| | | | | | | | | | | | | | | | The following test was missing from all nightlies: - test_integration/test_crlgen_manage.py The following tests was missing from nightly_f29: - test_integration/test_smb.py The following test was missing from nightly_rawhide: - test_integration/test_smb.py Note: nightly_f28 not updated as we stopped testing on f28. Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* Test external CA with DNS name constraintsChristian Heimes2019-08-068-8/+44
| | | | | | | | | Verify that FreeIPA can be installed with an external CA that has a name constraints extension. Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Fraser Tweedale <ftweedal@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* azure-pipelines.yml: switch to Python 3.7François Cami2019-08-021-4/+4
| | | | | | | | | * switch to Python 3.7 (UsePythonVersion@0 task) * use "pip install --user" Fixes: https://pagure.io/freeipa/issue/8030 Signed-off-by: François Cami <fcami@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* Increase ntp_options test timeoutTibor Dudlák2019-07-314-4/+4
| | | | | Reviewed-By: Michal Polovka <mpolovka@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* ipatests: refactor TestNTPoptionsTibor Dudlák2019-07-311-41/+39
| | | | | | | Move common and error messages to class scope to be reused again. Reviewed-By: Michal Polovka <mpolovka@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* ipatests: Add tests for interactive chronyd configTibor Dudlák2019-07-312-2/+161
| | | | | | | | | | | | Add interactive configuration tests for ipa-server-install and ipa-client-install FreeIPA server as it is now is unable to configure NTP interactively for replica installations. Resolves: https://pagure.io/freeipa/issue/7908 Reviewed-By: Michal Polovka <mpolovka@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* ipatests: Update test tasks for client to be interactiveTibor Dudlák2019-07-311-6/+11
| | | | | | Related: https://pagure.io/freeipa/issue/7908 Reviewed-By: Michal Polovka <mpolovka@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* xmlrpc test: add test for preserved > stage userFlorence Blanc-Renaud2019-07-312-2/+67
| | | | | | | | | | | | | | | | When moving a preserved user to the stage area, check that the custom attributes are not lost ( = the attr for which there is no specific user_stage option). Test scenario: - add a stage user with --setattr "businesscategory=value" - activate the user, check that businesscategory is still present - delete (preserve) the user, check that attr is still present - stage the user, check that attr is still present Related: https://pagure.io/freeipa/issue/7597 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* test_nfs.py: switch to master_3replFrançois Cami2019-07-304-27/+9
| | | | | | | | | | | test_nfs.py historically used master_2repl_1client. Now that master_3client exists, switch to that as it allows removal of custom install/cleanup steps. Fixes: https://pagure.io/freeipa/issue/8027 Signed-off-by: François Cami <fcami@redhat.com> Reviewed-By: Sergey Orlov <sorlov@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* ipatests: rename config_replica_resolvconf_with_master_data()François Cami2019-07-303-10/+10
| | | | | | | | | | config_replica_resolvconf_with_master_data() is not replica specific. Rename to config_host_resolvconf_with_master_data() as it is not tied to any role (master, replica, client). Signed-off-by: François Cami <fcami@redhat.com> Reviewed-By: Sergey Orlov <sorlov@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* test_nfs.py: switch to tasks.config_replica_resolvconf_with_master_data()François Cami2019-07-301-34/+9
| | | | | | | | | | | | Previously test_nfs.py would implement its own method to configure resolv.conf leading to cleanup failures in some cases. Use tasks.config_replica_resolvconf_with_master_data() instead. Also simplify and fix client uninstall. Fixes: https://pagure.io/freeipa/issue/7949 Signed-off-by: François Cami <fcami@redhat.com> Reviewed-By: Sergey Orlov <sorlov@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* prci_definitions: add master_3client topologyFrançois Cami2019-07-304-0/+16
| | | | | | | | | Some tests would benefit from using a multi-client topology. As PR-CI now supports master_3client, use it. Fixes: https://pagure.io/freeipa/issue/8026 Signed-off-by: François Cami <fcami@redhat.com> Reviewed-By: Armando Neto <abiagion@redhat.com>
* test_xmlrpc: fix TestAutomemberFindOrphans.test_find_orphan_automember_rulesFlorence Blanc-Renaud2019-07-301-3/+21
| | | | | | | | | | | | | | | | | | | | | | Test scenario: - create a hostgroup - create a host - create an automember rule for the hostgroup with a condition fulfilled by the host - delete the hostgroup - call automember-rebuild (1) - call automember-find-orphans to remove the orphan automember group - call automember-rebuild(2) The test was expecting the first rebuild command to fail but this assumption is not true if the DS version is >= 1.4.0.22 because of the fix for https://pagure.io/389-ds-base/issue/50077 Modify the test so that it expects failure only when DS is older. Fixes: https://pagure.io/freeipa/issue/7902 Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* WebUI tests: Fix request timeout for test_trustSerhii Tsymbaliuk2019-07-291-1/+2
| | | | | | | | | | Because of intergration with AD server response can take time more then 1 minute. So request_timeout is increased to 120s. Ticket: https://pagure.io/freeipa/issue/8024 Signed-off-by: Serhii Tsymbaliuk <stsymbal@redhat.com> Reviewed-By: Tibor Dudlak <tdudlak@redhat.com>
* Test: Test to check whether ssh from ipa client to ipa master is successful ↵Sumedh Sidhaye2019-07-261-0/+66
| | | | | | | | | | | | | | | | after adding ldap_deref_threshold=0 in sssd.conf Problem: After adding ldap_deref_threshold=0 setting for sssd on master for performance enhancement ssh from ipa client was failing Test Procedure: 1. setup a master 2. add ldap_deref_threshold=0 to sssd.conf on master 3. add an ipa user 4. ssh from controller to master using the user created in step 3 Signed-off-by: Sumedh Sidhaye <ssidhaye@redhat.com> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* ipatests: test ipa-client-samba after --uninstallFrançois Cami2019-07-261-0/+5
| | | | | | | Related-to: https://pagure.io/freeipa/issue/8021 Signed-off-by: François Cami <fcami@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Sergey Orlov <sorlov@redhat.com>
* ipatests: test multiple invocations of ipa-client-samba --uninstallFrançois Cami2019-07-261-0/+3
| | | | | | | Related-to: https://pagure.io/freeipa/issue/8019 Signed-off-by: François Cami <fcami@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Sergey Orlov <sorlov@redhat.com>
* Azure pipeline: report failure in prepare-build stepFlorence Blanc-Renaud2019-07-261-2/+2
| | | | | | | | | | | | | | | | The azure pipeline defines a "prepare build" step that installs the FreeIPA development dependencies but the step does not report failures of the dnf builddep command. As a consequence, subsequent steps may fail (for instance because of components not installed such as tox) but are hard to diagnose. The fix reports the command failure. Fixes: https://pagure.io/freeipa/issue/8022 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* Test: To check ipa replica-manage del <FQDN> does not failSumedh Sidhaye2019-07-254-4/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If a replica installation fails before all the services have been enabled then it could leave things in a bad state. ipa-replica-manage del <replica> --cleanup --force invalid 'PKINIT enabled server': all masters must have IPA master role enabled Test Steps: 1. Setup server 2. Setup replica 3. modify the replica entry on Master: dn: cn=KDC,cn=<replica hostname>,cn=masters,cn=ipa,cn=etc,dc=<test>,dc=<realm> changetype: modify delete: ipaconfigstring ipaconfigstring: enabledService dn: cn=KDC,cn=<replica hostname>,cn=masters,cn=ipa,cn=etc,dc=<test>,dc=<realm> add: ipaconfigstring ipaconfigstring: configuredService 4. On master, run ipa-replica-manage del <replicaFQDN> --cleanup --force Related Ticket: https://pagure.io/freeipa/issue/7929 Signed-off-by: Sumedh Sidhaye <ssidhaye@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* WebUI tests: Fix timeout issues for reset password testsSerhii Tsymbaliuk2019-07-221-1/+2
| | | | | | | | | | - Increase wait timeout after password reset - Wait for server response after login in TestLoginScreen.test_reset_password_and_login_view Ticket: https://pagure.io/freeipa/issue/8012 Signed-off-by: Serhii Tsymbaliuk <stsymbal@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
* ipatests: test ipa-server-upgrade in CA-less deploymentFraser Tweedale2019-07-222-0/+11
| | | | | | Part of: https://pagure.io/freeipa/issue/7991 Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* ci: add --external-ca-profile tests to gatingFraser Tweedale2019-07-171-0/+12
| | | | | | Part of: https://pagure.io/freeipa/issue/7548 Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* ci: add --external-ca-profile tests to nightlyFraser Tweedale2019-07-175-0/+60
| | | | | | Part of: https://pagure.io/freeipa/issue/7548 Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* Collapse --external-ca-profile tests into single classFraser Tweedale2019-07-171-8/+26
| | | | | | | | | | | | | | To avoid having to spawn new CI hosts for each kind of --external-ca-profile argument we are testing, collapse the three separate test classes into one. Uninstall the half-installed IPA after each section of tests. This change is in response to review comment https://github.com/freeipa/freeipa/pull/2852#pullrequestreview-220442170. Part of: https://pagure.io/freeipa/issue/7548 Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* Add more tests for --external-ca-profile handlingFraser Tweedale2019-07-171-2/+95
| | | | | | | | | | Add tests for remaining untested scenarios of --external-ca-profile handling in ipa-server-install. ipa-ca-install and ipa-cacert-manage remain untested at present. Fixes: https://pagure.io/freeipa/issue/7548 Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* move MSCSTemplate classes to ipalibFraser Tweedale2019-07-173-130/+119
| | | | | | | | | | | | | As we expand the integration tests for external CA functionality, it is helpful (and avoids duplication) to use the MSCSTemplate* classes. These currently live in ipaserver.install.cainstance, but ipatests is no longer permitted to import from ipaserver (see commit 81714976e5e13131654c78eb734746a20237c933). So move these classes to ipalib. Part of: https://pagure.io/freeipa/issue/7548 Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* certmaprule: add negative test for altSecurityIdentitiesAlexander Bokovoy2019-07-171-0/+29
| | | | | | | | | Try to create a certmap rule that mentiones altSecurityIdentities in its mapping rule but uses IPA domain to apply to. It should fail with ValidationError. Related: https://pagure.io/freeipa/issue/7932 Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* Use stage and phase attempt counters when saving test artifactsAlexander Bokovoy2019-07-171-1/+1
| | | | | | | | | | | | | Azure Pipelines provide counters for running test jobs, these split into System.StageAttempt and System.PhaseAttempt. Use them to make test artifacts unique. For XML test results we don't need to name them differently as they aren't uploaded as artifacts but rather presented in a separate test pane. Reviewed-By: Florence Blanc-Renaud <flo@redhat.com> Reviewed-By: Stanislav Levin <slev@altlinux.org>