summaryrefslogtreecommitdiffstats
path: root/ipatests
Commit message (Collapse)AuthorAgeFilesLines
* CI tests: ignore disconnected domain level 1 topology on IPA master teardownMartin Babinsky2015-12-091-5/+10
| | | | Reviewed-By: Oleg Fayans <ofayans@redhat.com>
* CI: fix function that prepare the hosts file before CI runMartin Basti2015-12-081-2/+4
| | | | | | Without this fix function removed 2 lines from hosts file. Reviewed-By: Oleg Fayans <ofayans@redhat.com>
* CI: installation testsMartin Basti2015-12-082-0/+232
| | | | Reviewed-By: Oleg Fayans <ofayans@redhat.com>
* CI: test various topologies with multiple replicasMartin Basti2015-12-071-0/+87
| | | | | | | | | Test tests topologies listed bellow with and without CA on replicas: star topology: 3 replicas line topology: 3 replicas complete topology: 3 replicas Reviewed-By: Oleg Fayans <ofayans@redhat.com>
* tests: Fix incorrect uninstall method invocationTomas Babej2015-12-071-1/+1
| | | | | | https://fedorahosted.org/freeipa/ticket/5516 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* rename topology suffixes to "domain" and "ca"Petr Vobornik2015-12-042-9/+11
| | | | | | | https://www.redhat.com/archives/freeipa-devel/2015-November/msg00485.html Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Separated Tracker implementations into standalone packageMilan Kubík2015-12-0217-1401/+1480
| | | | | | | | | | The previous way of implementing trackers in the module with the test caused circular imports. The separate package resolves this issue. https://fedorahosted.org/freeipa/ticket/5467 Reviewed-By: Ales 'alich' Marecek <amarecek@redhat.com>
* update idrange tests to reflect disabled modification of local ID rangesMartin Babinsky2015-11-231-24/+10
| | | | | | | | Fix for https://fedorahosted.org/freeipa/ticket/4826 temporarily disallowed modification of local ID ranges via API calls The corresponding XMLRPC tests were updated to reflect this change. Reviewed-By: Milan Kubik <mkubik@redhat.com>
* CI test: Fix installation of KRA on a replicaMartin Basti2015-11-181-1/+2
| | | | | | | | With domain level 1 installation of KRA has been changed on replica. https://fedorahosted.org/freeipa/ticket/5379 Reviewed-By: Ales 'alich' Marecek <amarecek@redhat.com>
* Fix CI tests domain_level env configMartin Basti2015-11-182-1/+3
| | | | Reviewed-By: Ales 'alich' Marecek <amarecek@redhat.com>
* Tests: DNS various exceptions can be raised in testMartin Basti2015-11-131-3/+5
| | | | | | | | | | | Test 'Try to add SRV record to zone %r both via parts and a raw value' can raise various exceptions which are all valid. Due to internal representation IPA may raise exception for any of target, port, priority, weight part. This commit handles all of them. Reviewed-By: Petr Spacek <pspacek@redhat.com>
* Tests: DNS replace 192.0.2.0/24 with 198.18.0.0/15 rangeMartin Basti2015-11-131-4/+5
| | | | | | | | | | | | 192.0.2.0/24 is IANA reserved address that should not be used. netaddr module check implemented for this address and IPA reject this address as invalid. 198.18.0.0/15 is IANA reserved address for benchmark testing purpose, so we can safely use this network. http://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml Reviewed-By: Petr Spacek <pspacek@redhat.com>
* Applied tier0 and tier1 marks on unit tests and xmlrpc testsMilan Kubik2015-11-09106-1/+323
| | | | | | | | | | | | | | | | | | | Web UI tests were marked as tier1 tests. The tier system is intended to be used together with CI system to make sure the more complicated tests are being run only when all of the basic functionality is working. The system is using pytest's marker system. E.g. an invocation of all tier1 tests with listing will look like: $ py.test -v -m tier1 ipatests or in case of out of tree tests: $ ipa-run-tests -m tier1 Reviewed-By: Ales 'alich' Marecek <amarecek@redhat.com>
* Fixed A record creation bugOleg Fayans2015-11-031-4/+3
| | | | | | | | | When creating an A record we used to provide full hostname as a record name, while we should have provided only the first part of the hostname https://fedorahosted.org/freeipa/ticket/5419 Reviewed-By: Martin Basti <mbasti@redhat.com>
* The test was made to be skipped if domainlevel is 0Oleg Fayans2015-11-031-0/+5
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* Updated the tests according to the new replica installation workflowOleg Fayans2015-11-033-10/+44
| | | | | | | | | | | As of 4.3 the replica installation is performed without preparing a gpg file on master, but rather enrolling a future replica as a client with subsequent promotion of the client. This required the corresponding change in the integration tests https://fedorahosted.org/freeipa/ticket/5379 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Added user friendly error message for dnszone enable and disableAbhijeet Kasurde2015-10-291-2/+6
| | | | | | | | | | Added try-except block in dns plugin in order to provide user friendly message to end user. https://fedorahosted.org/freeipa/ticket/4811 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* test_parameters: Alias long to int under Python 3Petr Viktorin2015-10-271-0/+1
| | | | | | In py3, the two types are unified under the name "int". Reviewed-By: Tomas Babej <tbabej@redhat.com>
* ipapython.secrets: Port to Python 3Petr Viktorin2015-10-271-1/+1
| | | | | | | | | | | StringIO was renamed in Python 3. The import was was unused, so remove it. Files need to be opened in binary mode if bytes are written to them. (For Python 2: on Linux, there's no practical difference between text and binary mode) Reviewed-By: Tomas Babej <tbabej@redhat.com>
* ipatests: CA ACL and cert profile functional testMilan Kubík2015-10-272-0/+344
| | | | | | https://fedorahosted.org/freeipa/ticket/57 Reviewed-By: Martin Basti <mbasti@redhat.com>
* ipatests: added unlock_principal_password and change_principalMilan Kubík2015-10-271-0/+40
| | | | | | | | | | | | | | | | The unlock_principal_password unlocks the (new) user by running ldappasswd as the user. change_principal is an context manager that changes identity for the supplied api object by disconnecting and reconnecting the rpcclient in and outside of requested kerberos context. This context manager allows to run tests that cannot be executed as an admin user which can for example override an CA ACL. https://fedorahosted.org/freeipa/ticket/57 Reviewed-By: Martin Basti <mbasti@redhat.com>
* ipatests: CA ACL - added config templatesMilan Kubík2015-10-273-0/+148
| | | | | | https://fedorahosted.org/freeipa/ticket/57 Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests: add test to check the default ACLMilan Kubík2015-10-271-7/+128
| | | | | | | | | Also includes basic ACL manipulation and adding and removing members to/from the acl. https://fedorahosted.org/freeipa/ticket/57 Reviewed-By: Martin Basti <mbasti@redhat.com>
* ipatests: Add initial CAACLTracker implementationMilan Kubík2015-10-272-0/+383
| | | | | | | | | | | | The patch implements the tracker for CA ACL feature. The basic CRUD checkers has been implemented. The methods for adding and removing the association of the resources with the ACL do not have the check methods. These will be provided as a separate test suite. https://fedorahosted.org/freeipa/ticket/57 Reviewed-By: Martin Basti <mbasti@redhat.com>
* ipatests: add fuzzy instances for CA ACL DN and RDNMilan Kubík2015-10-271-0/+8
| | | | | | https://fedorahosted.org/freeipa/ticket/57 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Fix more bytes/unicode issuesPetr Viktorin2015-10-227-40/+71
| | | | Reviewed-By: Tomas Babej <tbabej@redhat.com>
* ipatest.util: Port to Python 3Petr Viktorin2015-10-222-5/+5
| | | | | | | - Allow bytes or str in Fuzzy - test_util: Fix indices in lists whose elements are unorderable in py3 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Handle binascii.Error from base64.b64decode()Petr Viktorin2015-10-221-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python 3, the base64.b64decode function raises binascii.Error (a ValueError subclass) when it finds incorrect padding. In Python 2 it raises TypeError. Callers should usually handle ValueError; unless they are specifically concerned with handling base64 padding issues). In some cases, callers should handle ValueError: - ipalib.pkcs10 (get_friendlyname, load_certificate_request): callers should handle ValueError - ipalib.x509 (load_certificate*, get_*): callers should handle ValueError In other cases ValueError is handled: - ipalib.parameters - ipapython.ssh - ipalib.rpc (json_decode_binary - callers already expect ValueError) - ipaserver.install.ldapupdate Elsewhere no error handling is done, because values come from trusted sources, or are pre-validated: - vault plugin - ipaserver.install.cainstance - ipaserver.install.certs - ipaserver.install.ipa_otptoken_import Reviewed-By: Tomas Babej <tbabej@redhat.com>
* DNSSEC CI: wait until DS records is replicatedMartin Basti2015-10-221-0/+6
| | | | | | | In some cases replication may take much more time than we expected. This patch adds explicit cech if DS records has been replicated. Reviewed-By: Petr Spacek <pspacek@redhat.com>
* Fix hyphen-used-as-minus-sign warning (found by lintian)Benjamin Drung2015-10-222-3/+3
| | | | | | | See https://lintian.debian.org/tags/hyphen-used-as-minus-sign.html for an explanation. Reviewed-By: Martin Basti <mbasti@redhat.com>
* fix class teardown in user plugin testsMartin Babinsky2015-10-222-1/+15
| | | | | | https://fedorahosted.org/freeipa/ticket/5368 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Rename option --dirsrv-config-mods to --dirsrv-config-fileMartin Basti2015-10-191-2/+2
| | | | | | | | | | | Option is renamed to be consistent with other options. Affected tickets: https://fedorahosted.org/freeipa/ticket/4949 https://fedorahosted.org/freeipa/ticket/4048 https://fedorahosted.org/freeipa/ticket/1930 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* CI: installation with customized DS configMartin Basti2015-10-152-5/+105
| | | | | | | | | | Test covers: https://fedorahosted.org/freeipa/ticket/4949 https://fedorahosted.org/freeipa/ticket/4048 https://fedorahosted.org/freeipa/ticket/1930 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Add ipa-custodia serviceSimo Sorce2015-10-151-0/+55
| | | | | | | | | | Add a customized Custodia daemon and enable it after installation. Generates server keys and loads them in LDAP autonomously on install or update. Provides client code classes too. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* tests: Add tests for idoverride object integrityTomas Babej2015-10-141-2/+173
| | | | | | | | | | | As far as IPA objects are concerned, ID overrides are supposed to be removed when the respective user/group is removed. Adds a couple of tests to ensure this behaviour is covered. https://fedorahosted.org/freeipa/ticket/5322 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Replace tab with space in test_user_plugin.pyMartin Basti2015-10-141-2/+2
| | | | | | Mixing tabs and spaces is not allowed in python3 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* ipalib.parameters: Require bytes for Bytes.patternPetr Viktorin2015-10-131-1/+0
| | | | Reviewed-By: Tomas Babej <tbabej@redhat.com>
* ipalib.parameters: Handle 0-prefixed octal format of intsPetr Viktorin2015-10-131-0/+1
| | | | | | | | | | In Python 2, numbers prfixed with '0' are parsed as octal, e.g. '020' -> 16. In Python 3, the prefix is '0o'. Handle the old syntax for IPA's parameter conversion to keep backwards compatibility. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* test_keyring: Use str(e) instead of e.message for exceptionsPetr Viktorin2015-10-131-1/+1
| | | | Reviewed-By: Tomas Babej <tbabej@redhat.com>
* ipalib.aci: Port to Python 3Petr Viktorin2015-10-132-8/+8
| | | | | | | | | - Don't encode under Python 3, where shlex would choke on bytes - Sort the attrs dictionary in export_to_string, so the tests are deterministic. (The iteration order of dicts was always unspecified, but was always the same in practice under CPython 2.) Reviewed-By: Tomas Babej <tbabej@redhat.com>
* test_ipalib.test_frontend: Port unbound method tests to Python 3Petr Viktorin2015-10-131-4/+16
| | | | | | | Python 3 uses plain function objects instead of unbound methods. So, what was Class.method.__func__ is now just Class.method. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Rename caught exception for use outside the except: block.Petr Viktorin2015-10-131-5/+2
| | | | | | | | | | | | | | In Python 3, the variable with the currently handled exception is unset at the end of the except block. (This is done to break reference cycles, since exception instances now carry tracebacks, which contain all locals.) Fix this in baseldap's error handler. Use a simpler structure for the ipatests.raises utility that only uses the exception inside the except block. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* x509: Port to Python 3Petr Viktorin2015-10-131-15/+6
| | | | | | | | | | | | In python 3 , `bytes` has the buffer interface, and `buffer` was removed. Also, invalid padding in base64-encoded data raises a ValueError rather than TypeError. In tests, use pytest.assert_raises for more correct exception assertions. Also, get rid of unused imports in the tests Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Do not compare types that are not comparable in Python 3Petr Viktorin2015-10-132-3/+9
| | | | | | | | | | In Python 3, different types are generally not comparable (except for equality), and None can't be compared to None. Fix cases of these comparisons. In ipatest.util, give up on sorting lists if the sorting raises a TypeError. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* CI Test: add setup_kra options into install scriptsMartin Basti2015-10-122-11/+27
| | | | | | https://fedorahosted.org/freeipa/ticket/5302 Reviewed-By: Milan Kubik <mkubik@redhat.com>
* CI TEST: VaultMartin Basti2015-10-121-0/+205
| | | | | | | | Simple CI test for vault feature, including testing with replica Covers https://fedorahosted.org/freeipa/ticket/5302 Reviewed-By: Milan Kubik <mkubik@redhat.com>
* tests: Amend result assertions in realmdomains testsTomas Babej2015-10-121-8/+68
| | | | | | | | | | * Nonexistent domains have to be added/deleted with force * Warning messages are emitted * Some error messages have been altered https://fedorahosted.org/freeipa/ticket/5278 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Fixed a timing issue with drill returning non-zero exitcodeOleg Fayans2015-10-091-0/+1
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* Appease pylintPetr Viktorin2015-10-071-0/+2
| | | | | | Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* ipapython.ssh: Port to Python 3Petr Viktorin2015-10-071-6/+15
| | | | | | | | | Sort out the accepted types. Handle Python 3's stricter separation between bytes and unicode. Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>