s4: adding a DsdbTestCase class

Andrew Bartlett abartlet at samba.org
Fri Nov 19 13:43:51 MST 2010


On Fri, 2010-11-19 at 17:48 +0200, Nadezhda Ivanova wrote:
> Hi Jelmer and team,
> In the testsuites in dsdb/tests there is a practise currently that each test
> suite defines its own methods, even if they are the same as the ones used in
> other testsuites, such as delete_force, get_domain_sid and a few others. To
> avoid this, I suggest adding a DsdbTestCase class to samba.tests that
> contains these methods, and all the testsuites that use them to inherit it,
> as is the case with BlackboxTestCase and others. I have added the class
> here:
> 
> http://gitweb.samba.org/?p=nivanova/samba.git;a=commit;h=4bf20e6948133c3a53b91da6c18bf597220082c5

This would make sense, if there was a lot of test-specific
duplication.  

However, I don't see how these are test-specific.  The domain_sid should
be replaced by a call to SamDB.get_domain_sid(), and the dshuristics
calls added there, alongside all the other calls. 

That leaves delete_force(), which isn't enough of a reason to create a
new class. 

Andrew Bartlett
-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20101120/1b86200d/attachment.pgp>


More information about the samba-technical mailing list