summaryrefslogtreecommitdiffstats
path: root/ipatests/test_xmlrpc
Commit message (Collapse)AuthorAgeFilesLines
...
* ipatests: Add missing certificate profile fixtureMilan Kubík2016-02-111-1/+10
| | | | | | https://fedorahosted.org/freeipa/ticket/5630 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Refactor test_attrFilip Skola2016-01-261-388/+281
| | | | Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Refactor test_replaceFilip Skola2016-01-261-126/+48
| | | | Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Refactor test_user_plugin, use UserTracker for testsFilip Skola2016-01-252-1520/+1026
| | | | | Reviewed-By: Ales 'alich' Marecek <amarecek@redhat.com> Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Alias "unicode" to "str" under Python 3Petr Viktorin2016-01-204-0/+17
| | | | | | | | | | | | | | Follow-up to commit 23507e6124041ed17f39db211e802495e37520e7 The six way of doing this is to replace all occurences of "unicode" with "six.text_type". However, "unicode" is non-ambiguous and (arguably) easier to read. Also, using it makes the patches smaller, which should help with backporting. https://fedorahosted.org/freeipa/ticket/5623 Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Martin Basti <mbasti@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>
* 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-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 unused importsMartin Basti2015-12-2321-55/+24
| | | | | | | This patch removes unused imports, alse pylint has been configured to check unused imports. Reviewed-By: Jan Cholasta <jcholast@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>
* Refactor ipautil.runPetr Viktorin2015-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* Separated Tracker implementations into standalone packageMilan Kubík2015-12-0215-1400/+1472
| | | | | | | | | | 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>
* 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-0947-1/+166
| | | | | | | | | | | | | | | | | | | 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>
* 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>
* 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: 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 class teardown in user plugin testsMartin Babinsky2015-10-222-1/+15
| | | | | | https://fedorahosted.org/freeipa/ticket/5368 Reviewed-By: Martin Basti <mbasti@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.aci: Port to Python 3Petr Viktorin2015-10-131-5/+5
| | | | | | | | | - 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>
* 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>
* Remove uses of the `types` modulePetr Viktorin2015-10-071-2/+1
| | | | | | | | | | | In Python 3, the types module no longer provide alternate names for built-in types, e.g. `types.StringType` can just be spelled `str`. NoneType is also removed; it needs to be replaced with type(None) Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* Replace StandardError with ExceptionRobert Kuska2015-09-301-2/+2
| | | | | | | | StandardError was removed in Python3 and instead Exception should be used. Signed-off-by: Robert Kuska <rkuska@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Use byte literals where appropriateJan Cholasta2015-09-171-2/+2
| | | | Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* Alias "unicode" to "str" under Python 3Jan Cholasta2015-09-1710-0/+48
| | | | | | | | | The six way of doing this is to replace all occurences of "unicode" with "six.text_type". However, "unicode" is non-ambiguous and (arguably) easier to read. Also, using it makes the patches smaller, which should help with backporting. Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* ipatests: Add basic tests for certificate profile pluginMilan Kubík2015-09-165-1/+1148
| | | | | Reviewed-By: Lenka Doudova <ldoudova@redhat.com> Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
* ipatests: Add Certprofile tracker class implementationMilan Kubík2015-09-162-0/+145
| | | | | | | https://fedorahosted.org/freeipa/ticket/57 Reviewed-By: Lenka Doudova <ldoudova@redhat.com> Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
* Updated number of legacy permission in ipatestsAbhijeet Kasurde2015-09-161-1/+1
| | | | | | | | | | | | Since IPA 4.2 has an additional permission "Request Certificate ignoring CA ACLs", the number of legacy permission in testcase is updated from 8 to 9. https://fedorahosted.org/freeipa/ticket/5264 Signed off-by: Abhijeet Kasurde <akasurde@redhat.com> Reviewed-By: Tomas Babej <tbabej@redhat.com>
* FIX vault testsMartin Basti2015-09-091-6/+33
| | | | Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Modernize use of range()Petr Viktorin2015-09-012-3/+3
| | | | | | | | | | | | In Python 3, range() behaves like the old xrange(). The difference between range() and xrange() is usually not significant, especially if the whole result is iterated over. Convert xrange() usage to range() for small ranges. Use modern idioms in a few other uses of range(). Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Use the print functionPetr Viktorin2015-09-014-7/+11
| | | | | | | | | In Python 3, `print` is no longer a statement. Call it as a function everywhere, and include the future import to remove the statement in Python 2 code as well. Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Replace uses of map()Petr Viktorin2015-09-012-4/+4
| | | | | | | | | | In Python 2, map() returns a list; in Python 3 it returns an iterator. Replace all uses by list comprehensions, generators, or for loops, as required. Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Use Python3-compatible dict method namesPetr Viktorin2015-09-012-3/+2
| | | | | | | | | | | | | | | | | | | | | | Python 2 has keys()/values()/items(), which return lists, iterkeys()/itervalues()/iteritems(), which return iterators, and viewkeys()/viewvalues()/viewitems() which return views. Python 3 has only keys()/values()/items(), which return views. To get iterators, one can use iter() or a for loop/comprehension; for lists there's the list() constructor. When iterating through the entire dict, without modifying the dict, the difference between Python 2's items() and iteritems() is negligible, especially on small dicts (the main overhead is extra memory, not CPU time). In the interest of simpler code, this patch changes many instances of iteritems() to items(), iterkeys() to keys() etc. In other cases, helpers like six.itervalues are used. Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Use six.string_types instead of "basestring"Petr Viktorin2015-09-011-5/+6
| | | | | Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Fix user tracker to reflect new user-del messageLenka Doudova2015-08-271-1/+1
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* vault: fix vault tests after default type changePetr Vobornik2015-08-261-2/+9
| | | | | | https://fedorahosted.org/freeipa/ticket/5251 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Port from python-krbV to python-gssapiMichael Simacek2015-08-263-9/+3
| | | | | | | | | | | | | | | | | | python-krbV library is deprecated and doesn't work with python 3. Replacing all it's usages with python-gssapi. - Removed Backend.krb and KRB5_CCache classes They were wrappers around krbV classes that cannot really work without them - Added few utility functions for querying GSSAPI credentials in krb_utils module. They provide replacements for KRB5_CCache. - Merged two kinit_keytab functions - Changed ldap plugin connection defaults to match ipaldap - Unified getting default realm Using api.env.realm instead of krbV call Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Robbie Harwood <rharwood@redhat.com> Reviewed-By: Simo Sorce <ssorce@redhat.com>
* Added support for changing vault encryption.Endi S. Dewata2015-08-251-0/+249
| | | | | | | | | | | | The vault-mod command has been modified to support changing vault encryption attributes (i.e. type, password, public/private keys) in addition to normal attributes (i.e. description). Changing the encryption requires retrieving the stored secret with the old attributes and rearchiving it with the new attributes. https://fedorahosted.org/freeipa/ticket/5176 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Automated test for stageuser pluginLenka Doudova2015-08-253-6/+1421
| | | | | | | | Ticket: https://fedorahosted.org/freeipa/ticket/3813 Test plan: http://www.freeipa.org/page/V4/User_Life-Cycle_Management/Test_Plan Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
* Use absolute importsPetr Viktorin2015-08-1233-39/+53
| | | | | | | In Python 3, implicit relative imports will not be supported. Use fully-qualified imports everywhere. Reviewed-By: Tomas Babej <tbabej@redhat.com>