summaryrefslogtreecommitdiffstats
path: root/ipatests
Commit message (Collapse)AuthorAgeFilesLines
* Include ipatests/test_xmlrpc/data directory into distribution.Milan Kubík2015-10-051-0/+1
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* ipatests: configure Network Manager not to manage resolv.confMilan Kubík2015-10-021-0/+36
| | | | | | | | | For the duration of the test, makes resolv.conf unmanaged. If NetworkManager is not running, nothing is changed. https://fedorahosted.org/freeipa/ticket/5331 Reviewed-By: Martin Basti <mbasti@redhat.com>
* re-kinit after ipa-restore in backup/restore CI testsMartin Babinsky2015-10-021-0/+3
| | | | | | | | | | | In FreeIPA CI-tests the install_master task automatically performs kinit after successfull installation. This may break some backup/restore tests which perform backup into previously installed IPA master. In this case it is neccessary to re-kinit after restore. https://fedorahosted.org/freeipa/ticket/5326 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Added a proper workaround for dnssec test failures in Beaker environmentOleg Fayans2015-10-011-3/+9
| | | | | | | | | | | | | | In beaker lab the situation when master and replica have ip addresses from different subnets is quite frequent. When a replica has ip from different subnet than master's, ipa-replica-prepare looks up a proper reverse zone to add a pointer record, and if it does not find it, it asks a user for permission to create it automatically. It breaks the tests adding the unexpected input. The workaround is to always create a reverse zone for a new replica. Corresponding ticket is https://fedorahosted.org/freeipa/ticket/5306 Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* Replace StandardError with ExceptionRobert Kuska2015-09-307-23/+23
| | | | | | | | 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>
* CI: backup and restore with KRAMartin Basti2015-09-251-0/+77
| | | | Reviewed-By: Milan Kubík <mkubik@redhat.com>
* Use byte literals where appropriateJan Cholasta2015-09-175-21/+21
| | | | Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* Use bytes instead of str where appropriateJan Cholasta2015-09-171-5/+5
| | | | | | Under Python 2, "str" and "bytes" are synonyms. Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* Alias "unicode" to "str" under Python 3Jan Cholasta2015-09-1725-0/+119
| | | | | | | | | 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-166-1/+1158
| | | | | 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>
* backup CI: test DNS/DNSSEC after backup and restoreMartin Basti2015-09-162-0/+155
| | | | Reviewed-By: Milan Kubík <mkubik@redhat.com>
* DNSSEC CI: test master migrationMartin Basti2015-09-161-0/+149
| | | | Reviewed-By: Oleg Fayans <ofayans@redhat.com>
* DNSSEC: improve CI testMartin Basti2015-09-161-4/+109
| | | | | | Test disabling and re-enabling zone signing. Reviewed-By: Oleg Fayans <ofayans@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>
* Convert zip() result to list()Petr Viktorin2015-09-011-2/+2
| | | | | | | | | | In Python 3, zip() returns an iterator. To get a list, it must be explicitly converted. In most cases, zip() result is iterated over so this is not necessary. Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Modernize use of range()Petr Viktorin2015-09-0111-17/+17
| | | | | | | | | | | | 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-0115-54/+74
| | | | | | | | | 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-014-7/+6
| | | | | | | | | | 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 six.integer_types instead of (long, int)Petr Viktorin2015-09-011-2/+5
| | | | | Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Replace filter() calls with list comprehensionsPetr Viktorin2015-09-012-2/+2
| | | | | | | | In Python 3, filter() returns an iterator. Use list comprehensions instead. Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Use Python3-compatible dict method namesPetr Viktorin2015-09-0112-36/+40
| | | | | | | | | | | | | | | | | | | | | | 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-013-12/+18
| | | | | Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Integration tests for topology pluginOleg Fayans2015-08-283-21/+241
| | | | | Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Tomas Babej <tbabej@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-265-26/+14
| | | | | | | | | | | | | | | | | | 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>
* Temporary fix for ticket 5240Oleg Fayans2015-08-241-2/+2
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* Added a user-friendly output to an import errorOleg Fayans2015-08-241-1/+5
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* ipatests: Take otptoken import test out of executionMilan Kubík2015-08-201-0/+2
| | | | | | | | | | | | The issue reported in ticket [1] hasn't been solved yet. This patch prevents the test cases for OTP import being run. The change is intended as a *temporary* workaround until proper fix for the issue is introduced. [1] https://fedorahosted.org/freeipa/ticket/5192 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Use absolute importsPetr Viktorin2015-08-1235-43/+58
| | | | | | | In Python 3, implicit relative imports will not be supported. Use fully-qualified imports everywhere. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Replace dict.has_key with the 'in' operatorPetr Viktorin2015-08-123-26/+26
| | | | | | | | | The deprecated has_key method will be removed from dicts in Python 3. For custom dict-like classes, has_key() is kept on Python 2, but disabled for Python 3. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Modernize function and method attribute namesPetr Viktorin2015-08-121-4/+4
| | | | | | | | Python 3 uses double-underscored names for internal function attributes. In Python 2.7, these names exist as aliases to the old 'func_*' and 'im_*' names. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Modernize 'except' clausesPetr Viktorin2015-08-1213-32/+32
| | | | | | | The 'as' syntax works from Python 2 on, and Python 3 will drop the "comma" syntax. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* test suite for user/host/service certificate management API commandsMartin Babinsky2015-08-031-0/+349
| | | | | | | | | These tests excercise various scenarios when using new class of API commands to add or remove certificates to user/service/host entries. Part of http://www.freeipa.org/page/V4/User_Certificates Reviewed-By: Milan Kubík <mkubik@redhat.com>
* tests: Allow Tracker.dn be an instance of FuzzyMilan Kubík2015-07-311-2/+3
| | | | | | | | | | | | | Some of the IPA LDAP entries are using ipaUniqueID as the "primary key". To match this UUID based attribute in assert_deepequal, an instance of Fuzzy class must be used. This change adds the possibility to assign the Fuzzy object as the DN for the tracked entry. The user may need to override the rdn and name properties for the class using the Fuzzy DN. Reviewed-By: Lenka Doudova <ldoudova@redhat.com>
* Modernize number literalsPetr Viktorin2015-07-312-4/+4
| | | | | | | | | | | | | | Use Python-3 compatible syntax, without breaking compatibility with py 2.7 - Octals literals start with 0o to prevent confusion - The "L" at the end of large int literals is not required as they use long on Python 2 automatically. - Using 'int' instead of 'long' for small numbers is OK in all cases except strict type checking checking, e.g. type(0). https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Added test - topology plugin is listed among DS pluginsOleg Fayans2015-07-271-0/+70
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests: test_cert: Services can have multiple certificatesTomas Babej2015-07-221-4/+4
| | | | | | | | | Old certificates of the services are no longer removed and revoked after new ones have been issued. Check that both old and new certificates are present. Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* tests: test_rpc: Create connection for the current threadTomas Babej2015-07-221-0/+3
| | | | | | | Both context.xmlclient and context.xmlclient_<id> need to be created in order to successfully call the Command.forward method. Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests: vault_plugin: Skip tests if KRA not availableTomas Babej2015-07-221-0/+11
| | | | Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* tests: Version is currently generated during command callTomas Babej2015-07-221-35/+16
| | | | | | | | In the previous versions, version in the response was generated as part of the process_keyword_arguments method. This is no longer true, and so the explicit check for it should be removed. Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests: realmdomains_plugin: Add explanatory commentTomas Babej2015-07-221-0/+3
| | | | | | | | | | | The realmdomains_mod command will fail if the testing environment is configured improperly and the IPA domain's NS/SOA records are not resolvable. This can easily happen if the machine's DNS server is not configured to the IPA server. Leave a explanatory note in the class. Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests: service_plugin: Make sure the cert is decoded from base64Tomas Babej2015-07-221-1/+5
| | | | Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* tests: user_plugin: Add preserved flag when --all is usedTomas Babej2015-07-211-1/+4
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* Py3: replace tab with spaceMartin Basti2015-07-171-3/+3
| | | | | | python3 does not allow to mix spaces and tabs Reviewed-By: Christian Heimes <cheimes@redhat.com>
* Fix minor typosYuri Chornoivan2015-07-171-1/+1
| | | | | | | | | | | | | <ame> -> <name> overriden -> overridden ablity -> ability enties -> entries the the -> the https://fedorahosted.org/freeipa/ticket/5109 Reviewed-By: Petr Vobornik <pvoborni@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>