summaryrefslogtreecommitdiffstats
path: root/ipatests
Commit message (Collapse)AuthorAgeFilesLines
...
* ipapython: remove default_encoding_utf8Jan Cholasta2016-01-151-1/+0
| | | | | | | | | Replace the "import default_encoding_utf8" in ipalib/cli.py with equivalent Python code. https://fedorahosted.org/freeipa/ticket/5596 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* CI test: fix regression in task.install_kraMartin Basti2016-01-141-1/+1
| | | | | | | | ipa-kra-install needs directory manager password Regression caused by c4b9b295d8184694c50c0d56051e0273445c98ec Reviewed-By: Martin Basti <mbasti@redhat.com>
* ipatests: Make the A record for hosts in topology conditionalMilan Kubík2016-01-131-2/+9
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests for package version comparisonMartin Babinsky2016-01-121-0/+51
| | | | | | | | | | These tests will ensure that our package version handling code can correctly decide when to upgrade IPA master. https://fedorahosted.org/freeipa/ticket/5572 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* DNSSEC test: fix adding zones with --skip-overlap-checkMartin Basti2016-01-121-5/+12
| | | | | | | In DNSSEC tests the root zone has to be created, this requires to use --skip-overlap-check to work properly. Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* ipatests: Fix configuration problems in dns testsMilan Kubík2016-01-111-2/+3
| | | | | | | revzone2 changed to unresolvable reverse zone test for root zone now supresses the overlap check Reviewed-By: Martin Basti <mbasti@redhat.com>
* Fixed install_ca and install_kra under domain level 0Oleg Fayans2016-01-071-4/+24
| | | | | | Also added ipa_backup, ipa_restore and replica_uninstall functions Reviewed-By: Martin Basti <mbasti@redhat.com>
* Enable pylint unnecessary-pass checkMartin Basti2015-12-231-1/+0
| | | | | | Enables check and removes extra pass statement from code. Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Enable pylint expression-not-assigned checkMartin Basti2015-12-233-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enables check and fixes: ************* Module ipa-replica-conncheck install/tools/ipa-replica-conncheck:150: [W0106(expression-not-assigned), parse_options] Expression "(replica_group.add_option('-w', '--password', dest='password', sensitive=True, help='Password for the principal'), )" is assigned to nothing) ************* Module ipatests.test_xmlrpc.test_automount_plugin ipatests/test_xmlrpc/test_automount_plugin.py:437: [W0106(expression-not-assigned), test_automount_indirect.test_1a_automountmap_add_indirect] Expression "api.Command['automountmap_add_indirect'](self.locname, self.mapname, **self.map_kw)['result']" is assigned to nothing) ************* Module ipatests.test_ipaserver.test_otptoken_import ipatests/test_ipaserver/test_otptoken_import.py:128: [W0106(expression-not-assigned), test_otptoken_import.test_mini] Expression "[(t.id, t.options) for t in doc.getKeyPackages()]" is assigned to nothing) ************* Module ipatests.test_ipaserver.test_ldap ipatests/test_ipaserver/test_ldap.py:221: [W0106(expression-not-assigned), test_LDAPEntry.test_popitem] Expression "list(e) == []" is assigned to nothing) ************* Module ipa-client-install ipa-client/ipa-install/ipa-client-install:114: [W0106(expression-not-assigned), parse_options] Expression "(basic_group.add_option('-p', '--principal', dest='principal', help='principal to use to join the IPA realm'), )" is assigned to nothing) ipa-client/ipa-install/ipa-client-install:116: [W0106(expression-not-assigned), parse_options] Expression "(basic_group.add_option('-w', '--password', dest='password', sensitive=True, help='password to join the IPA realm (assumes bulk password unless principal is also set)'), )" is assigned to nothing) ipa-client/ipa-install/ipa-client-install:118: [W0106(expression-not-assigned), parse_options] Expression "(basic_group.add_option('-k', '--keytab', dest='keytab', help='path to backed up keytab from previous enrollment'), )" is assigned to nothing) ipa-client/ipa-install/ipa-client-install:120: [W0106(expression-not-assigned), parse_options] Expression "(basic_group.add_option('-W', dest='prompt_password', action='store_true', default=False, help='Prompt for a password to join the IPA realm'), )" is assigned to nothing) Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Enable pylint unused-format-string-key checkMartin Basti2015-12-231-4/+2
| | | | | | | | | | | | Enables check and fixes: ipatests/test_xmlrpc/test_permission_plugin.py:534: [W1301(unused-format-string-key), test_permission] Unused key 'tdn' in format string dictionary) ipatests/test_xmlrpc/test_permission_plugin.py:652: [W1301(unused-format-string-key), test_permission] Unused key 'tdn' in format string dictionary) Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Enable pylint duplicated-key checkMartin Basti2015-12-231-1/+0
| | | | | | | | Enables check and fixes: ipatests/test_xmlrpc/test_permission_plugin.py:65: [W0109(duplicate-key), ] Duplicate key 'ipapermlocation' in dictionary) Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Remove wildcard importsMartin Basti2015-12-231-1/+0
| | | | | | | | | | | Wildcard imports should not be used. Check for wildcard imports has been enabled in pylint. Pylint note: options 'wildcard-import' causes too much false positive results, so instead it I used 'unused-wildcard-import' option which has almost the same effect. Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Remove unused importsMartin Basti2015-12-2343-96/+38
| | | | | | | This patch removes unused imports, alse pylint has been configured to check unused imports. Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* 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>