summaryrefslogtreecommitdiffstats
path: root/ipatests
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove empty test fileMartin Basti2015-12-231-26/+0
| | | | | | This test file has not been used Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* CI tests: Added domain realm as a parameter to master installation in ↵Oleg Fayans2015-12-211-1/+2
| | | | | | | | | | integration tests Without realm provided explicitly, installation calculates it automatically from the current hostname which may be inconsistent with the configured domain name. Which, in turn, causes failures in integration tests in the lab. Reviewed-By: Martin Basti <mbasti@redhat.com>
* CI tests: Enabled automatic creation of reverse zone during master installationOleg Fayans2015-12-211-1/+2
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* ipatests: Roll back the forwarder config after a test caseMilan Kubik2015-12-211-0/+9
| | | | Reviewed-By: Petr Spacek <pspacek@redhat.com>
* Fix DNS tests: dns-resolve returns warningMartin Basti2015-12-211-0/+18
| | | | Reviewed-By: Petr Spacek <pspacek@redhat.com>
* raise more descriptive Backend connection-related exceptionsMartin Babinsky2015-12-211-7/+9
| | | | | | https://fedorahosted.org/freeipa/ticket/5473 Reviewed-By: Martin Basti <mbasti@redhat.com>
* ipatests: replace the test-example.com domain in testsMilan Kubík2015-12-172-27/+33
| | | | | | | | | | Latest DNS patches introduced checks for the added zones. If a zone exists, the add fails if not forced. The domain test-example.com is resolvable thus causing errors in the test. Also adds missing __init__.py to the ipatests.test_cmdline package. Reviewed-By: Oleg Fayans <ofayans@redhat.com>
* CI tests: remove '-p' option from ipa-dns-install callsMartin Babinsky2015-12-143-8/+1
| | | | | | | | | fix for https://fedorahosted.org/freeipa/ticket/4933 made ipa-dns-install to use LDAPI and deprecated -p option for directory manager password. This patche remove the option from calls to ipa-dns-install in CI tests so that deprecation warning does not clutter the logs. Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Tests: test_ipagetkeytab: fix assert that is always trueMartin Basti2015-12-141-2/+2
| | | | | | | Fixes: /usr/lib/python2.7/site-packages/ipatests/test_cmdline/test_ipagetkeytab.py:116: SyntaxWarning: assertion is always true, perhaps remove parentheses? Reviewed-By: Tomas Babej <tbabej@redhat.com>
* test: Temporarily increase timeout in vault test.David Kupka2015-12-141-1/+1
| | | | | | Remove this change when vault is fixed. Reviewed-By: Martin Basti <mbasti@redhat.com>
* Refactor ipautil.runPetr Viktorin2015-12-144-12/+78
| | | | | | | | | | | | | | | | | | | | | The ipautil.run function now returns an object with returncode and output are accessible as attributes. The stdout and stderr of all commands are logged (unless skip_output is given). The stdout/stderr contents must be explicitly requested with a keyword argument, otherwise they are None. This is because in Python 3, the output needs to be decoded, and that can fail if it's not decodable (human-readable) text. The raw (bytes) output is always available from the result object, as is "leniently" decoded output suitable for logging. All calls are changed to reflect this. A use of Popen in cainstance is changed to ipautil.run. Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Migrate wget references and usage to curlGabe2015-12-111-5/+5
| | | | | | https://fedorahosted.org/freeipa/ticket/5458 Reviewed-By: Martin Basti <mbasti@redhat.com>
* CI: fix ipa-kra-install on domain level 1Martin Basti2015-12-111-6/+1
| | | | Reviewed-By: Oleg Fayans <ofayans@redhat.com>
* tests: Add hostmask detection for sudo rules validating on hostmaskTomas Babej2015-12-112-6/+43
| | | | | | | | | | | | | | | IPA sudo tests worked under the assumption that the clients that are executing the sudo commands have their IPs assigned within 255.255.255.0 hostmask. Removes this (invalid) assumption and adds a dynamic detection of the hostmask of the IPA client. https://fedorahosted.org/freeipa/ticket/5501 Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com> Reviewed-By: Oleg Fayans <ofayans@redhat.com> Reviewed-By: Ales 'alich' Marecek <amarecek@redhat.com>
* fix error message assertion in negative forced client reenrollment testsMartin Babinsky2015-12-111-1/+1
| | | | | | https://fedorahosted.org/freeipa/ticket/5511 Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
* Adding descriptive IDs to stageuser testsLenka Doudova2015-12-113-39/+56
| | | | | | Adding descriptive IDs to parametrized stageuser test for better identification of test cases. Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* 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>