summaryrefslogtreecommitdiffstats
path: root/tests/test_xmlrpc/test_taskgroup_plugin.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-10-18 14:53:32 -0400
committerSimo Sorce <ssorce@redhat.com>2010-10-28 08:39:10 -0400
commit70a57924c8e265df1e97b7f0be1adf8da802fbfd (patch)
tree40731984730ee48d8161e0cca67c34581e55d246 /tests/test_xmlrpc/test_taskgroup_plugin.py
parent93290c8a72bcd5c4ab34eedf0ec443469b36f8c1 (diff)
downloadfreeipa-70a57924c8e265df1e97b7f0be1adf8da802fbfd.tar.gz
freeipa-70a57924c8e265df1e97b7f0be1adf8da802fbfd.tar.xz
freeipa-70a57924c8e265df1e97b7f0be1adf8da802fbfd.zip
Allow RDN changes for users, groups, rolegroups and taskgroups.
To do a change right now you have to perform a setattr like: ipa user-mod --setattr uid=newuser olduser The RDN change is performed before the rest of the mods. If the RDN change is the only change done then the EmptyModlist that update_entry() throws is ignored. ticket 323
Diffstat (limited to 'tests/test_xmlrpc/test_taskgroup_plugin.py')
-rw-r--r--tests/test_xmlrpc/test_taskgroup_plugin.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_taskgroup_plugin.py b/tests/test_xmlrpc/test_taskgroup_plugin.py
index 8401fbdc3..ce3166020 100644
--- a/tests/test_xmlrpc/test_taskgroup_plugin.py
+++ b/tests/test_xmlrpc/test_taskgroup_plugin.py
@@ -32,6 +32,7 @@ taskgroup1 = u'test-taskgroup-1'
taskgroup1_dn = u'cn=%s,cn=taskgroups,cn=accounts,%s' % (
taskgroup1, api.env.basedn
)
+renamedtaskgroup1 = u'test-taskgroup1'
taskgroup2 = u'test-taskgroup-2'
taskgroup2_dn = u'cn=%s,cn=taskgroups,cn=accounts,%s' % (
@@ -80,6 +81,13 @@ class test_taskgroup(Declarative):
dict(
+ desc='Try to rename non-existent %r' % taskgroup1,
+ command=('taskgroup_del', [taskgroup1], dict(setattr=u'cn=%s' % renamedtaskgroup1)),
+ expected=errors.NotFound(reason='no such entry'),
+ ),
+
+
+ dict(
desc='Search for non-existent %r' % taskgroup1,
command=('taskgroup_find', [taskgroup1], {}),
expected=dict(
@@ -362,6 +370,36 @@ class test_taskgroup(Declarative):
dict(
+ desc='Rename %r' % taskgroup1,
+ command=('taskgroup_mod', [taskgroup1], dict(setattr=u'cn=%s' % renamedtaskgroup1)),
+ expected=dict(
+ value=taskgroup1,
+ result=dict(
+ cn=[renamedtaskgroup1],
+ description=[u'New desc 1'],
+ member_rolegroup=[u'test-rolegroup-1'],
+ ),
+ summary=u'Modified taskgroup "%s"' % taskgroup1
+ )
+ ),
+
+
+ dict(
+ desc='Rename %r back' % renamedtaskgroup1,
+ command=('taskgroup_mod', [renamedtaskgroup1], dict(setattr=u'cn=%s' % taskgroup1)),
+ expected=dict(
+ value=renamedtaskgroup1,
+ result=dict(
+ cn=[taskgroup1],
+ description=[u'New desc 1'],
+ member_rolegroup=[u'test-rolegroup-1'],
+ ),
+ summary=u'Modified taskgroup "%s"' % renamedtaskgroup1
+ )
+ ),
+
+
+ dict(
desc='Delete %r' % taskgroup1,
command=('taskgroup_del', [taskgroup1], {}),
expected=dict(