[389-devel] Please review lib389 ticket 47578: removal of 'sudo' and absolute path in lib389

thierry bordaz tbordaz at redhat.com
Wed Oct 30 20:09:05 UTC 2013


On 10/30/2013 07:56 PM, Jan Rusnacko wrote:
> Hello Thierry,
>
> layout OK.
>
> As for tests - instead of reinventing the wheel by defing class Test_standAlone
> to set up instance, use py.test fixture.
>
> Also, you should not force setup, test, teardown execution for each test by
> specifying sub-methods for each test. Testing framework (py.test) should be
> doing that. I think this will make your tests fail badly if some exception
> occurs - if _test_ticket47560_setup raises exception, it will propagate back to
> py.test and cleanup method will never be executed for that ticket.
Hi Jan,

thanks for you comments.
py.test will call for for each test_ticketxxx

    setup
    test_ticketxxx
    teardown


setup will create the instance if it does not already exist, else it 
provide a dirsrv to it.
teardown will remove the instance if the test_ticketxx is not able to 
properly clean it up (if test_ticketxx raise the clean_please flag)
test_ticketxxx will start it executions with clean_please=true (set by 
setup), if it succeeds it set clean_please=false. Unless it fails to 
properly clean up the instance. In that case it sets clean_please to true.

What would be the advantages to make the setup/teardown sub-methods of 
the test_ticketxx ?
At least a "small" drawback is that the person that write test_ticketxxx 
will have to write them, instead of using the "standard" one.

>
> Also, I believe each ticket should have its own file which contains one or more
> testcases. I think that would reasonably group relevant things together.

Right, it was my first intention. But then I had this idea to group the 
tickets per deployment module.
I don't know if it is a good idea, but it seems to be confusing :-[
>
> On 10/30/2013 05:57 PM, thierry bordaz wrote:
>> https://fedorahosted.org/389/attachment/ticket/47578/0001-Ticket-47578-CI-tests-removal-of-sudo-and-absolute-p.patch
>>
>>
>>
>> --
>> 389-devel mailing list
>> 389-devel at lists.fedoraproject.org
>> https://admin.fedoraproject.org/mailman/listinfo/389-devel
>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/389-devel/attachments/20131030/06b6dc11/attachment.html>


More information about the 389-devel mailing list