summaryrefslogtreecommitdiffstats
path: root/ipatests/test_xmlrpc
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2014-09-17 17:17:54 +0200
committerMartin Kosek <mkosek@redhat.com>2014-09-29 15:24:58 +0200
commitd83af7d38d65dfc50c70cb4ecf48f5c4c57d6979 (patch)
tree9c796262a3987c53e44c9d6983ece7864d4bf698 /ipatests/test_xmlrpc
parentf8f3d5868820136422c63f80540f1e1ff5387861 (diff)
downloadfreeipa-d83af7d38d65dfc50c70cb4ecf48f5c4c57d6979.tar.gz
freeipa-d83af7d38d65dfc50c70cb4ecf48f5c4c57d6979.tar.xz
freeipa-d83af7d38d65dfc50c70cb4ecf48f5c4c57d6979.zip
baseldap: Properly handle the case of renaming object to the same name
When renaming a object to the same name, errors.EmptyModList is raised. This is not properly handled, and can cause other modifications in the LDAPUpdate command to be ignored. https://fedorahosted.org/freeipa/ticket/4548 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipatests/test_xmlrpc')
-rw-r--r--ipatests/test_xmlrpc/test_user_plugin.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/ipatests/test_xmlrpc/test_user_plugin.py b/ipatests/test_xmlrpc/test_user_plugin.py
index e4c06145e..dfca104eb 100644
--- a/ipatests/test_xmlrpc/test_user_plugin.py
+++ b/ipatests/test_xmlrpc/test_user_plugin.py
@@ -527,11 +527,28 @@ class test_user(Declarative):
expected=errors.EmptyModlist(),
),
+ dict(
+ desc='Rename "%s" to same value, check that other modifications '
+ 'are performed' % renameduser1,
+ command=('user_mod', [renameduser1],
+ dict(setattr=u'uid=%s' % renameduser1,
+ loginshell=u'/bin/bash')),
+ expected=dict(
+ result=get_user_result(
+ renameduser1, u'Finkle', u'User1', 'mod',
+ mail=[u'%s@%s' % (user1, api.env.domain)],
+ homedirectory=[u'/home/%s' % user1],
+ loginshell=[u'/bin/bash']),
+ summary=u'Modified user "%s"' % renameduser1,
+ value=renameduser1,
+ ),
+ ),
+
dict(
desc='Rename back "%s"' % renameduser1,
command=('user_mod', [renameduser1],
- dict(setattr=u'uid=%s' % user1)),
+ dict(setattr=u'uid=%s' % user1, loginshell=u'/bin/sh')),
expected=dict(
result=get_user_result(user1, u'Finkle', u'User1', 'mod'),
summary=u'Modified user "%s"' % renameduser1,