Patch attached. Lenka
From 2b6d0b4fe1a3f468e5125d521194fb10d4e654c1 Mon Sep 17 00:00:00 2001 From: Lenka Doudova <ldoud...@redhat.com> Date: Fri, 13 May 2016 12:56:03 +0200 Subject: [PATCH] Test: Maximum username length higher than 255 cannot be set https://fedorahosted.org/freeipa/ticket/5774 --- ipatests/test_xmlrpc/test_config_plugin.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/ipatests/test_xmlrpc/test_config_plugin.py b/ipatests/test_xmlrpc/test_config_plugin.py index 2a9086f258149198a2df91562d1a972b848d92fa..b9992ded895df5aecfa488f9099ededb11291656 100644 --- a/ipatests/test_xmlrpc/test_config_plugin.py +++ b/ipatests/test_xmlrpc/test_config_plugin.py @@ -1,7 +1,8 @@ # Authors: # Petr Viktorin <pvikt...@redhat.com> +# Lenka Doudova <ldoud...@redhat.com> # -# Copyright (C) 2010 Red Hat +# Copyright (C) 2010, 2016 Red Hat # see file 'COPYING' for use and warranty information # # This program is free software; you can redistribute it and/or modify @@ -151,4 +152,21 @@ class test_config(Declarative): ), ), + dict( + desc='Set maximum username length higher than limit of 255', + command=('config_mod', [], dict(ipamaxusernamelength=256)), + expected=errors.ValidationError( + name='maxusername', + error='can be at most 255'), + ), + + dict( + desc='Set maximum username length equal to limit 255', + command=('config_mod', [], dict(ipamaxusernamelength=255)), + expected=dict( + result=lambda d: d['ipamaxusernamelength'] == (u'255',), + value=None, + summary=None, + ), + ), ] -- 2.5.5
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code