diff options
author | Rob Crittenden <rcritten@redhat.com> | 2010-10-18 14:53:32 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2010-10-28 08:39:10 -0400 |
commit | 70a57924c8e265df1e97b7f0be1adf8da802fbfd (patch) | |
tree | 40731984730ee48d8161e0cca67c34581e55d246 /tests/test_xmlrpc/test_group_plugin.py | |
parent | 93290c8a72bcd5c4ab34eedf0ec443469b36f8c1 (diff) | |
download | freeipa.git-70a57924c8e265df1e97b7f0be1adf8da802fbfd.tar.gz freeipa.git-70a57924c8e265df1e97b7f0be1adf8da802fbfd.tar.xz freeipa.git-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_group_plugin.py')
-rw-r--r-- | tests/test_xmlrpc/test_group_plugin.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_group_plugin.py b/tests/test_xmlrpc/test_group_plugin.py index 55bb9cde..6218ebe5 100644 --- a/tests/test_xmlrpc/test_group_plugin.py +++ b/tests/test_xmlrpc/test_group_plugin.py @@ -27,6 +27,7 @@ from xmlrpc_test import Declarative, fuzzy_digits, fuzzy_uuid group1 = u'testgroup1' group2 = u'testgroup2' +renamedgroup1 = u'testgroup' user1 = u'tuser1' invalidgroup1=u'+tgroup1' @@ -66,6 +67,13 @@ class test_group(Declarative): dict( + desc='Try to rename non-existent %r' % group1, + command=('group_mod', [group1], dict(setattr=u'cn=%s' % renamedgroup1)), + expected=errors.NotFound(reason='no such entry'), + ), + + + dict( desc='Create non-POSIX %r' % group1, command=( 'group_add', [group1], dict(description=u'Test desc 1',nonposix=True) @@ -327,6 +335,8 @@ class test_group(Declarative): 'gidnumber': [fuzzy_digits], 'cn': [u'admins'], 'description': [u'Account administrators group'], + 'memberof_rolegroup': [u'replicaadmin'], + 'memberof_taskgroup': [u'managereplica', u'deletereplica'], }, { 'dn': u'cn=ipausers,cn=groups,cn=accounts,%s' % api.env.basedn, @@ -453,6 +463,36 @@ class test_group(Declarative): ), + dict( + desc='Rename %r' % group1, + command=('group_mod', [group1], dict(setattr=u'cn=%s' % renamedgroup1)), + expected=dict( + value=group1, + result=dict( + cn=[renamedgroup1], + description=[u'New desc 1'], + gidnumber=[fuzzy_digits], + ), + summary=u'Modified group "%s"' % group1 + ) + ), + + + dict( + desc='Rename %r back' % renamedgroup1, + command=('group_mod', [renamedgroup1], dict(setattr=u'cn=%s' % group1)), + expected=dict( + value=renamedgroup1, + result=dict( + cn=[group1], + description=[u'New desc 1'], + gidnumber=[fuzzy_digits], + ), + summary=u'Modified group "%s"' % renamedgroup1 + ) + ), + + ################ # delete group1: |