summaryrefslogtreecommitdiffstats
path: root/ipatests/test_integration/tasks.py
Commit message (Collapse)AuthorAgeFilesLines
* Configure HTTPD to work via Gss-ProxySimo Sorce2017-02-151-1/+1
| | | | | | | | https://fedorahosted.org/freeipa/ticket/4189 https://fedorahosted.org/freeipa/ticket/5959 Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Tests: fix wait_for_replication taskMartin Basti2017-02-081-2/+9
| | | | | | | | | | DS changed a format of replication status attribute. Now it is with prefix "Error (x)" where x is the error code. Both formats were kept to allow tests run on older and new versions of DS. Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Test: made kinit_admin a returning functionOleg Fayans2016-11-301-2/+2
| | | | | | | In some cases we need to check the result of kinit and print out the error message. Therefore we need it to return the result. Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Fix Python 3 bugs discovered by pylintChristian Heimes2016-11-251-1/+2
| | | | | | | | | | | | In Python 3 exception instances no longer have a message attribute. For most exceptions, str(e) or string formatting give the same result. Fix some renamed modules, module members and functions. https://fedorahosted.org/freeipa/ticket/4985 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* Added interface to certutilOleg Fayans2016-11-141-0/+7
| | | | | | Added generic method to run certutil with arbitrary set of paramenters Reviewed-By: Lenka Doudova <ldoudova@redhat.com>
* Tests: Provide AD cleanup for trust testsLenka Doudova2016-11-141-0/+11
| | | | | | | | Providing cleanup of trust information from AD machines for trusts tests. https://fedorahosted.org/freeipa/ticket/6396 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Refactor installer code requesting certificatesFlorence Blanc-Renaud2016-11-101-0/+1
| | | | | | | | | | | | | | | | | | | | - Temporary modify certmonger dogtag-ipa-ca-renew helper to request the IPA RA agent cert, using the temp cert created during pkispawn. The cert request is now processed through certmonger, and the helper arguments are restored once the agent cert is obtained. - Modify the installer code creating HTTP and LDAP certificates to use certmonger's IPA helper with temporary parameters (calling dogtag-submit instead of ipa-submit) - Clean-up for the integration tests: sometimes ipa renewal.lock is not released during ipa-server-uninstall. Make sure that the file is removed to allow future installations. https://fedorahosted.org/freeipa/ticket/6433 Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
* CI: use --setup-kra with replica installationMartin Basti2016-10-261-11/+3
| | | | | | | | | | Currently tests were not testing one-step installation of KRA together with replica. Adding --setup-kra to replica installation instead of calling ipa-kra-install after. https://fedorahosted.org/freeipa/ticket/6088 Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
* CI: extend replication layouts tests with KRAMartin Basti2016-10-261-3/+15
| | | | | | | | | KRA should be tested with warious replication topologies as well, mainly in domain level 0 https://fedorahosted.org/freeipa/ticket/6088 Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
* CI: workaround: wait for dogtag before replica-prepareMartin Basti2016-10-131-0/+3
| | | | | | | | | | | In domain level 0 ipa-replica-prepare fails because dogtag is not ready so soon after final restart during installation (tests are too fast). Wait 30 seconds before ipa-replica-prepare is executed, to make sure that dogtag is ready. Remove this workaround when ticket is fixed. https://fedorahosted.org/freeipa/ticket/6274 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Pylint: remove unused variables in testsMartin Basti2016-10-111-5/+1
| | | | Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
* Pylint: enable check for unused-variablesMartin Basti2016-09-271-0/+2
| | | | | | | | | | | | | | | 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>
* pylint: fix simplifiable-if-statement warningsJan Barta2016-09-221-10/+2
| | | | | | | fix inefficient if statements, enable pylint check Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* tests: Enabled negative testing for cleaning replication agreementsOleg Fayans2016-09-221-5/+6
| | | | Reviewed-By: David Kupka <dkupka@redhat.com>
* tests: Made unapply_fixes call optional at master uninstallationOleg Fayans2016-09-221-2/+3
| | | | | | | | | Unapply fixes removes the temporary testing folder at ~/ipatests, which contains some artifacts like root.pem that need to be persistent between tests in the test_caless testsuite. There has to be the way to skip the deletion of this testfolder Reviewed-By: David Kupka <dkupka@redhat.com>
* tests: Updated master and replica installation methods to enable negative ↵Oleg Fayans2016-09-221-40/+54
| | | | | | | | | | testing Negative testing was enabled by introducing an optional raiseonerr parameter with True by default to both master and replica installation methods Also the methods were updated to support intractive installation Reviewed-By: David Kupka <dkupka@redhat.com>
* tests: Fixed method failures during second call for the methodOleg Fayans2016-09-221-1/+2
| | | | | | | | | | | | | When the same host is used for numerous server/replica installations/uninstallations at some point the /etc/openldap/ldap.conf file gets corruped which results in ldapsearch unaware of the default ldap_uri to connect. The workaround would be to provide ldap hostname for each ldapsearch. Attention: please unapply this fix once the original issue is resolved. https://fedorahosted.org/freeipa/ticket/5880 Reviewed-By: David Kupka <dkupka@redhat.com>
* Tests: Add krb5kdc.service restart to integration trust testsLenka Doudova2016-09-211-0/+2
| | | | | | | | | krb5kdc.service restart is necessary for proper running of integration trust related tests. https://fedorahosted.org/freeipa/ticket/6322 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Tests: Remove SSSD restart from integration testsLenka Doudova2016-09-211-1/+0
| | | | | | | | | | | SSSD restart has been mistakenly added to integration tests (test_integration/tasks.py::uninstall_master). When system setup is correct, this restart has no significance, moreover it makes tests fail, hence its removal is necessary. https://fedorahosted.org/freeipa/ticket/6338 Reviewed-By: Oleg Fayans <ofayans@redhat.com>
* Removed incorrect check for returncodeOleg Fayans2016-09-141-1/+1
| | | | | | | | | | | The server installation in most cases returns response code 0 no matter what happens except for really severe errors. In this case when we try to uninstall the middle replica of a line topology, it fails, notifies us that we should use '--ignore-topology-disconnect', but returns 0 https://fedorahosted.org/freeipa/ticket/6300 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Tests: Add cleanup to integration trust testsLenka Doudova2016-09-131-0/+5
| | | | | | | | | | Trust tests fail if they are executed after external trust tests. This is caused my missing cleanup. Providing cleanup that would enable correct execution of the tests regardless of their order. https://fedorahosted.org/freeipa/ticket/6306 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Disabled raiseonerr in kinit call during topology level checkOleg Fayans2016-08-301-5/+12
| | | | | | | | | | | domainlevel method is called upon each master uninstallation. Sometimes the master uninstallation is called from within teardown method of some tests when the master was not in fact installed, in which case the kinit_admin would always raise an error. https://fedorahosted.org/freeipa/ticket/6254 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Fixed incorrect sequence of method calls in tasks.pyOleg Fayans2016-08-251-1/+1
| | | | | | https://fedorahosted.org/freeipa/ticket/6255 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Fixed incorrect domainlevel determination in testsOleg Fayans2016-08-051-0/+1
| | | | | | https://fedorahosted.org/freeipa/ticket/6167 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Tests: Removing manipulation with /etc/hosts file from integration testsLenka Doudova2016-08-011-19/+0
| | | | | Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Oleg Fayans <ofayans@redhat.com>
* CI tests: fix SSSD log collectingMartin Basti2016-07-261-1/+1
| | | | | | | | | 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>
* CI tests: improve log collectingMartin Basti2016-07-261-14/+45
| | | | | | | | We should collect as much as possible relevant logs to be able do better investigation from test automation Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Tests: External trustLenka Doudova2016-07-191-5/+6
| | | | | | | | | | | | | | | | | Provides basic coverage for external trust feature. Test cases: 1. verify an external trust with AD subdomain can be established - verify only one trustdomain is listed - verify subdomain users are resolvable - verify trust can be deleted 2. verify non-external trust with AD subdomain cannot be established 3. verify an external trust with AD forest root domain can be established - verify that even if AD subdomain is specified, it is not associated with the trust - verify trust can be deleted https://fedorahosted.org/freeipa/ticket/6093 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* CI: DNS locationsMartin Basti2016-07-181-0/+7
| | | | | | | | This test is testing default IPA system records in locations, if priority and weight were properly set per service, per server, per location. Reviewed-By: Petr Spacek <pspacek@redhat.com>
* Tests: Remove DNS configuration from trust testsLenka Doudova2016-06-301-40/+4
| | | | | | | Since DNS configuration is no longer needed for running trust tests, this method's contents are removed. Method is left empty as reference for others, should they have issues with DNS configuration. Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Oleg Fayans <ofayans@redhat.com>
* CI test suite for `server-del`Martin Babinsky2016-06-171-7/+35
| | | | | | | | | | | | | these tests cover various scenarios such as: * trying to remove master that would disconnect topology in one of the suffixes * forcing master removal regardless of topology state before/after removal * trying to remove last CA/DNS server/DNSSec key master * forcing removal of the last DNSSec key master https://fedorahosted.org/freeipa/ticket/5588 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Use root_logger for verify_host_resolvable()Petr Spacek2016-05-301-1/+1
| | | | | | | | | | After discussion with Martin Basti we decided to standardize on root_logger with hope that one day we will use root_logger.getLogger('module') to make logging prettier and tunable per module. https://fedorahosted.org/freeipa/ticket/5710 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Fixed a failure in legacy_client testsOleg Fayans2016-04-131-1/+1
| | | | | | https://fedorahosted.org/freeipa/ticket/5800 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Added a kdestroy call to clean ccache at master/client uninstallationOleg Fayans2016-04-061-0/+2
| | | | | | | https://fedorahosted.org/freeipa/ticket/5741 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* Fixed a bug with prepare_host failing upon existing ipatests folderOleg Fayans2016-03-231-1/+5
| | | | | | https://fedorahosted.org/freeipa/ticket/5748 Reviewed-By: Martin Basti <mbasti@redhat.com>
* rewrite a misprocessed teardown_method method as a custom decoratorOleg Fayans2016-03-231-0/+22
| | | | | | | | | | | | | teardown_method is a standard pytest method used to put any code to be executed after each test method is executed. While treated correctly by our integration tests, this method is misinterpreted by in-tree tests in the following way: in-tree tests try to execute it even if all the test methods are skipped due to test resources being not configured. This causes the tests, that otherwise would have been skipped, to fail https://fedorahosted.org/freeipa/ticket/5723 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Use platform path constant for SSSD log dirMartin Basti2016-03-161-1/+1
| | | | | | | The path to SSSD log directory is platform specific and should be in ipaplatform module. Reviewed-By: David Kupka <dkupka@redhat.com>
* Made apply_common_fixes call at replica installation independent on domain_levelOleg Fayans2016-03-111-2/+2
| | | | | | | | | Besides added obligatory domain/realm-specific commandline options to replica installation https://fedorahosted.org/freeipa/ticket/5723 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Enabled setting domain level explicitly in test classOleg Fayans2016-03-111-6/+11
| | | | | | | | Needed for replica promotion tests https://fedorahosted.org/freeipa/ticket/5723 Reviewed-By: Martin Basti <mbasti@redhat.com>
* CI: allow customized DS install test to work with domain levelsMartin Basti2016-03-031-2/+7
| | | | | | | | | Test will use tasks methods instead of custom commands to be able work with domain levels. https://fedorahosted.org/freeipa/ticket/5606 Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Removed messing around with resolv.confOleg Fayans2016-03-021-42/+2
| | | | Reviewed-By: Milan Kubik <mkubik@redhat.com>
* CI tests: use old schema when testing hostmask-based sudo rulesMartin Babinsky2016-02-251-0/+43
| | | | | | | | | | | | Newer versions of sssd use native IPA schema to process sudo rules. However, this schema currently has no support for hostmask-based rules and causes some sudo CI tests to fail. We have to temporarily set sssd.conf to use ou=sudoers,$SUFFIX as a sudo rule search base when executing them. https://fedorahosted.org/freeipa/ticket/5625 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* CI: Make double circle topology python3 compatibleDavid Kupka2016-02-241-1/+1
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* CI: Add double circle topology.David Kupka2016-02-231-0/+52
| | | | | | | Every site consist of at least two replicas and is connected to two other sites. Reviewed-By: Milan Kubik <mkubik@redhat.com>
* CI: Fix pep8 errors in 2-connected topology generatorDavid Kupka2016-02-231-5/+6
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* CI: Add '2-connected' topology generator.David Kupka2016-02-121-0/+57
| | | | | | | | | | | If number of servers (master+replicas) is equal to 4 + SUM(1, n, 2^n*5) for any n >= 0: * every server has replication agreement with 2 - 4 other servers. * at least two agreements must fail in order to disconnect the topology. Otherwise there can be server(s) with single agreement on the edge of the topology. Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Removed --ip-address option from replica installationOleg Fayans2016-02-041-7/+30
| | | | | | | | | | Explicitly specifying ip-address of the replica messes up with the current bind-dyndb-ldap logic, causing reverse zone not to be created. Enabled reverse-zone creation for the clients residing in different subnet from master Reviewed-By: Petr Spacek <pspacek@redhat.com>
* Updated connect/disconnect replica to work with both domainlevelsOleg Fayans2016-02-011-6/+23
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* Enabled recreation of test directory in apply_common_fixes functionOleg Fayans2016-01-291-1/+1
| | | | | | | | | | | Without it any test comprized of more than one cycle of installing-uninstalling of ipa would fail due to the fact that test folder on the remote machine gets deleted during ipa uninstallation. Also removed duplicate call of apply_common fixes and added unapply_fixes to uninstall_replica Reviewed-By: Martin Basti <mbasti@redhat.com>
* fixed an issue with master installation not creating reverse zoneOleg Fayans2016-01-191-3/+4
| | | | | | | | | When resolv.conf is set to point to the master's ip before installation, the ipa-server-install does not create a reverse zone for it's ip even despite --auto-reverse option provided. The fix is not to mess around with resolv.conf before master installation. Reviewed-By: Petr Spacek <pspacek@redhat.com>