config-mod: normalize attribute names for --usersearch/--groupsearch

https://fedorahosted.org/freeipa/ticket/6236

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Petr Spacek
2016-08-22 10:14:20 +02:00
committed by Martin Basti
parent c9419411c9
commit 3ac2709f4b
2 changed files with 38 additions and 3 deletions

View File

@@ -64,6 +64,37 @@ class test_config(Declarative):
expected=errors.RequirementError(name='usersearch'),
),
dict(
desc='Add uppercased attribute to ipausersearchfields',
command=('config_mod', [], dict(
ipausersearchfields=
u'uid,givenname,sn,telephonenumber,ou,title,Description')
),
expected=dict(
result=lambda d: (
d['ipausersearchfields'] ==
(u'uid,givenname,sn,telephonenumber,ou,title,description',)
),
value=None,
summary=None,
),
),
dict(
desc='Remove uppercased attribute from ipausersearchfields',
command=('config_mod', [], dict(
ipausersearchfields=
u'uid,givenname,sn,telephonenumber,ou,title',)),
expected=dict(
result=lambda d: (
d['ipausersearchfields'] ==
(u'uid,givenname,sn,telephonenumber,ou,title',)
),
value=None,
summary=None,
),
),
dict(
desc='Try to set ipaselinuxusermapdefault not in selinux order list',
command=('config_mod', [],