summaryrefslogtreecommitdiffstats
path: root/ipatests/test_xmlrpc
Commit message (Collapse)AuthorAgeFilesLines
* test: cert: Reflect change in behavior in testsDavid Kupka2016-06-291-2/+3
| | | | | | | | | | | | | Command cert-find with parameter sizelimit set to 0 no longer returns 0 certificates but returns all. More precise ConversionError is returned when parameter is not convertible to its type. https://fedorahosted.org/freeipa/ticket/5381 https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: Petr Spacek <pspacek@redhat.com>
* test: automember: Fix expected exception messageDavid Kupka2016-06-291-2/+2
| | | | | | https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* The LDAP*ReverseMember shouldn't imply --all is always specifiedStanislav Laznicka2016-06-292-9/+0
| | | | | | | | | | | The LDAP*ReverseMember methods would always return the whole LDAP object even though --all is not specified. Also had to fix some tests as objectClass will not be returned by default now. https://fedorahosted.org/freeipa/ticket/5892 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* DNS: Fix tests for realm domains integration with DNS zone addPetr Spacek2016-06-281-5/+5
| | | | | | | | | We forgot to update tests after change in 22f4045f72daf182c44ce574291c0d8a7733713b. https://fedorahosted.org/freeipa/ticket/5980 Reviewed-By: David Kupka <dkupka@redhat.com>
* Tests: Make ID views tests reflect new krbcanonicalname attributeLenka Doudova2016-06-281-0/+7
| | | | | | https://fedorahosted.org/freeipa/ticket/3864 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* test-{service,host}-plugin: only expect krbcanonicalname when all=TrueMartin Babinsky2016-06-282-6/+0
| | | | | | | | | fixes incorrect assertions in tests that create, retrieve, and search for services https://fedorahosted.org/freeipa/ticket/3864 Reviewed-By: Lenka Doudova <ldoudova@redhat.com>
* keep setting ipakrbprincipal objectclass on new service entriesMartin Babinsky2016-06-272-1/+4
| | | | | | | | | | | | | this is required for replica promotion to work, since the ACI allowing hosts to add their own services uses this objectclass as target filter. This partially reverts changes from commit 705f66f7490c64de1adc129221b31927616c485d https://fedorahosted.org/freeipa/ticket/5996 Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* Tests: Fix for failing location testsLenka Doudova2016-06-233-26/+87
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* account for added krbcanonicalname attribute during xmlrpc testsMartin Babinsky2016-06-237-7/+19
| | | | | | | https://fedorahosted.org/freeipa/ticket/3864 Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Simo Sorce <ssorce@redhat.com>
* DNS Locations: Rename ipalocationweight to ipaserviceweightMartin Basti2016-06-173-9/+9
| | | | | | | | | Service weight explains better meaning of attribute than location weight, because location itself have no weight only services have. https://fedorahosted.org/freeipa/ticket/2008 Reviewed-By: Petr Spacek <pspacek@redhat.com>
* Remove service and host cert issuer validationFraser Tweedale2016-06-061-2/+1
| | | | | | | | | | | When adding certifiates to a host or service entry, we currently check that the issuer matches the issuer DN of the IPA CA. Now that sub-CAs have been implemented, this check is no longer valid and will cause false negatives. Remove it and update call sites. Part of: https://fedorahosted.org/freeipa/ticket/4559 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* DNS Locations: extend tests with server-* commandsMartin Basti2016-06-034-7/+240
| | | | | | | https://fedorahosted.org/freeipa/ticket/2008 Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* DNS Locations: API testsMartin Basti2016-06-032-0/+232
| | | | | | | | | Tests for location-* commands https://fedorahosted.org/freeipa/ticket/2008 Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* ipalib: move server-side plugins to ipaserverJan Cholasta2016-06-0332-32/+32
| | | | | | | | | | Move the remaining plugin code from ipalib.plugins to ipaserver.plugins. Remove the now unused ipalib.plugins package. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* rpc: specify connection options in API configJan Cholasta2016-06-035-11/+11
| | | | | | | | | Specify RPC connection options once in API.bootstrap rather than in each invocation of rpcclient.connect. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* Test: fix failing host_testMartin Basti2016-06-011-1/+1
| | | | | | | | Regression caused by patches related to empty zones https://fedorahosted.org/freeipa/ticket/5710 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Performance: Find commands: do not process members by defaultMartin Basti2016-05-3117-52/+921
| | | | | | | | | | | | | | | | In all *-find commands, member attributes shouldn't be processed due high amount fo ldpaserches cause serious performance issues. For this reason --no-members option is set by default in CLI and API. To get members in *-find command option --all in CLI is rquired or 'no_members=False' or 'all=True' must be set in API call. For other commands processing of members stays unchanged. WebUI is not affected by this change. https://fedorahosted.org/freeipa/ticket/4995 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Turn verify_host_resolvable() into a wrapper around ipapython.dnsutilPetr Spacek2016-05-301-2/+1
| | | | | | | | | | | | | The code was duplicate and less generic anyway. As a side-effect I had to re-wrap dns.exception.DNSException into a PublicError so it can be displayed to the user. DNSError is now a super class for other DNS-related errors. Errors from DNS resolver are re-raised as DNSResolverError. https://fedorahosted.org/freeipa/ticket/5710 Reviewed-By: Martin Basti <mbasti@redhat.com>
* DNS: Warn if forwarding policy conflicts with automatic empty zonesPetr Spacek2016-05-301-0/+14
| | | | | | | | | | | | | | | | | | Forwarding policy "first" or "none" may conflicts with some automatic empty zones. Queries for zones specified by RFC 6303 will ignore forwarding and recursion and always result in NXDOMAIN answers. This is not detected and warned about. Global forwarding is equivalent to forward zone ".". Example: Forward zone 1.10.in-addr.arpa with policy "first" will not forward anything because BIND will automatically prefer automatic empty zone "10.in-addr.arpa." which is authoritative. https://fedorahosted.org/freeipa/ticket/5710 Reviewed-By: Martin Basti <mbasti@redhat.com>
* frontend: merge baseldap.CallbackRegistry into CommandJan Cholasta2016-05-251-3/+4
| | | | | | | | Also make it possible for subclasses to introduce new callback types. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* frontend: re-raise remote RequirementError using CLI name in CLIJan Cholasta2016-05-254-6/+6
| | | | | | https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* rpc: include structured error information in responsesJan Cholasta2016-05-256-27/+234
| | | | | | | | | | | | | | Include keyword arguments of exceptions in RPC responses. This is limited to JSON-RPC, as XML-RPC does not support additional data in error responses. Include keyword arguments of messages in RPC responses. Include keyword arguments of exceptions in batch command result. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* Test: Maximum username length higher than 255 cannot be setLenka Doudova2016-05-241-1/+30
| | | | | | https://fedorahosted.org/freeipa/ticket/5774 Reviewed-By: Ganna Kaihorodova <gkaihoro@redhat.com>
* Ping module tests.Peter Lacko2016-05-181-28/+27
| | | | | | | Test for ping module rewritten using non-declarative way. No new functionality has been added. Reviewed-By: Martin Basti <mbasti@redhat.com>
* test_cert_plugin: Encode 'certificate' for comparison with 'usercertificate'Petr Viktorin2016-05-101-2/+2
| | | | | | | | | The 'certificate' option is Str, but 'usercertificate' is Bytes. Decode before comparing one with the other. Part of the work for: https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Basti <mbasti@redhat.com>
* test_add_remove_cert_cmd: Use bytes for base64.b64encode()Petr Viktorin2016-05-051-1/+1
| | | | | | | Part of the work for: https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com>
* radiusproxy plugin tests: Expect bytes, not text, for ipatokenradiussecretPetr Viktorin2016-05-051-2/+3
| | | | | | | Part of the work for: https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com>
* range plugin tests: Use bytes with MockLDAP under Python 3Petr Viktorin2016-05-051-20/+28
| | | | | | | Part of the work for: https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com>
* xmlrpc_test: Expect bytes rather than strings for binary attributesPetr Viktorin2016-05-053-8/+8
| | | | | | | | | | The attributes krbextradata, krbprincipalkey, and userpassword contain binary data. Part of the work for: https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com>
* xmlrpc_test: Rename exception instance before working with itPetr Viktorin2016-05-051-8/+9
| | | | | | | | | | | | Python 3 unsets the exception variable at the end of an "except" block to prevent reference cycles and speed up garbage collection. Store the exception under a different name in order to use it later. Part of the work for https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com>
* test_xmlrpc: Use absolute importsPetr Viktorin2016-05-052-6/+6
| | | | | | | | | | In Python 3, a module from the current package can be imported either with the absolute name or by using an explicit relative import. Part of the work for https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com>
* fix stageuser tests (removal of has_keytab and has_password from find)Martin Basti2016-05-051-2/+5
| | | | | | | | | User tests has been fixed, but stageuser tests was forgotten, this commit fixes it. https://fedorahosted.org/freeipa/ticket/5281 Reviewed-By: David Kupka <dkupka@redhat.com>
* Test fix: Cleanup for host certificateLenka Doudova2016-05-032-1/+17
| | | | | | | This fix provides means to remove certificates from host that were added during tests, but not removed. Ticket: https://fedorahosted.org/freeipa/ticket/5839 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Performace: don't download password attributes in host/user-findMartin Basti2016-04-223-5/+11
| | | | | | | | | | | | For each entry in user/host-find was executed an extra search for password attributes what has significant impact on performance (for 2000 users there were 2000 additional searches) http://www.freeipa.org/page/V4/Performance_Improvements https://fedorahosted.org/freeipa/ticket/5281 Reviewed-By: David Kupka <dkupka@redhat.com>
* ipatests: Add test case for requesting a certificate with full principal.Milan Kubík2016-04-211-0/+7
| | | | | | https://fedorahosted.org/freeipa/ticket/5733 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Refactor test_automember_plugin, create AutomemberTrackerFilip Skola2016-04-192-1556/+945
| | | | Reviewed-By: Ales 'alich' Marecek <amarecek@redhat.com>
* specify type of exceeded limit when warning about truncated search resultsMartin Babinsky2016-04-132-8/+8
| | | | | | | | | API commands inheriting from LDAPSearch should mention which limit was exceeded in the warning message sent with truncated results. https://fedorahosted.org/freeipa/ticket/5677 Reviewed-By: Petr Spacek <pspacek@redhat.com>
* Refactor test_hostgroup_pluginFilip Skola2016-03-241-278/+101
| | | | Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Refactor test_nesting, create HostGroupTrackerFilip Skola2016-03-244-627/+399
| | | | Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Fix stageuser-activate - managers testMartin Basti2016-03-233-31/+35
| | | | | | https://fedorahosted.org/freeipa/ticket/5481 Reviewed-By: David Kupka <dkupka@redhat.com>
* Pylint: remove unnecessary-semicolonMartin Basti2016-03-221-1/+1
| | | | | Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
* test_cert_plugin: use only first part of the hostname to construct short nameMartin Babinsky2016-03-081-1/+1
| | | | | | | | | | | The short hostname construction for the negative test case in test_cert_plugin::test_cert_find suite could not work when domain name was different as hostname of the test runner, leading to test failure. A more naive approach works better in this case. https://fedorahosted.org/freeipa/ticket/5688 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Refactor test_group_plugin, use GroupTracker for testsFilip Skola2016-03-083-1165/+754
| | | | Reviewed-By: Milan Kubik <mkubik@redhat.com>
* pylint: supress false positive no-member errorsMartin Basti2016-03-021-0/+2
| | | | | | | | | pylint 1.5 prints many false positive no-member errors which are supressed by this commit. https://fedorahosted.org/freeipa/ticket/5615 Reviewed-By: David Kupka <dkupka@redhat.com>
* Refactor test_sudocmdgroup_pluginFilip Skola2016-03-012-670/+414
| | | | Reviewed-By: Ales 'alich' Marecek <amarecek@redhat.com>
* Refactor test_sudocmd_pluginFilip Skola2016-03-012-292/+269
| | | | Reviewed-By: Ales 'alich' Marecek <amarecek@redhat.com>
* ipatests: extend permission plugin test with new expected outputMilan Kubík2016-02-252-0/+32
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* Cosmetic changes to the codeStanislav Laznicka2016-02-242-1/+3
| | | | | | | | | | | | | | | Fixes some Coverity issues ipadiscovery.py: added assert should universe break plugins/dns.py: removed dead code dnssec/ldapkeydb.py: attribute assert in the proper object test_automount_plugin.py: fixed possible close() on None xmlrpc_test.py: Coverity does not like accessing None.__class__ https://fedorahosted.org/freeipa/ticket/5661 Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* 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>