[Freeipa-devel] [PATCH] 0029 Check expected error messages in tests

Petr Viktorin pviktori at redhat.com
Tue Mar 27 13:45:49 UTC 2012


On 03/26/2012 09:49 PM, Rob Crittenden wrote:
> Petr Viktorin wrote:
>> On 03/20/2012 01:39 PM, Petr Viktorin wrote:
>>> This patch adds checking error messages, not just types, to the XML-RPC
>>> tests.
>>> The checking is still somewhat hackish, since XML-RPC doesn't give us
>>> structured error info, but it should protect against regressions on
>>> issues like whether we put name or cli_name in a ValidationError.
>>>
>>> https://fedorahosted.org/freeipa/ticket/2549
>>>
>>
>> Updated and rebased to current master.
>
> NACK
>
> automember wrongly was testing for non-existent users rather than
> automember rules but those should still be tested IMHO, perhaps with
> both types.
>
> There is also some inconsistency. In host you use substitution to set
> the hostname in the error: '%s: host not found' % fqdn1 but in others
> (group, hostgroup for example) the name is hardcoded. I also noticed
> that some reasons are unicode and others are not.
>
> rob

Added tests for automember, made all the reasons unicode, using 
substitutions when variables are involved.

The patch still only updates tests that didn't pass the error message check.

-- 
Petr³
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0029-02-Fix-expected-error-messages-in-tests.patch
Type: text/x-patch
Size: 70457 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120327/deda3128/attachment.bin>


More information about the Freeipa-devel mailing list