[Freeipa-devel] [PATCH] 0021 Add CLI tests

Petr Viktorin pviktori at redhat.com
Wed Mar 28 08:19:29 UTC 2012


On 03/28/2012 09:11 AM, Martin Kosek wrote:
> On Tue, 2012-03-27 at 19:02 +0200, Petr Viktorin wrote:
>> Updated with a regression test for
>> https://fedorahosted.org/freeipa/ticket/2581 (Unable to delete all sshfp
>> records interactively) which Martin fixed recently.
>>
>>
>
> Thank's for adding a specific test for this I see 2 issues with this
> patch:
>
> 1) DNS tests are not skipped when DNS is not configured:
>
> $ ./make-test tests/test_cmdline/test_cli.py
> test_cli.TestCLIParsing.test_dnsrecord_add ... ok
> test_cli.TestCLIParsing.test_dnsrecord_del_all ... ERROR
> test_cli.TestCLIParsing.test_dnsrecord_del_one_by_one ... ERROR
> test_cli.TestCLIParsing.test_group_add ... ok
> ...
>
> We should rather skip these test as we do in test_dns_plugin.py instead
> of failing with ERROR.

Good point, I added this.

> 2) pprint is not needed, its output is not shown anyway as stdout is
> captured:
> +import pprint
> ...
> +        pprint.pprint(kw_got)

It is shown when the test fails; I found it quite useful when adding new 
tests. But you're right, it is not needed. Removed.


-- 
Petr³
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0021-06-Add-CLI-parsing-tests.patch
Type: text/x-patch
Size: 10661 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120328/7187da4c/attachment.bin>


More information about the Freeipa-devel mailing list