Further thoughts on File System ACL tests ...
Richard Sharpe
realrichardsharpe at gmail.com
Tue Mar 27 22:54:02 MDT 2012
On Tue, Mar 27, 2012 at 9:26 PM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> Hi folks,
>
> So, I have looked closely at the tests in
> source4/dsdb/test/python/acl.py and checked out the Python unittest
> framework and the samba.test.TestCase stuff etc.
>
> My first observation is that all of the tests in acl.py seem to relate
> mainly to LDAP type tests, and perhaps the file is misnamed.
>
> In any event, it would seem that I should put my tests in a separate
> file, perhaps in the source3 directory somewhere and called fs_acl.py.
>
> In a general sense as well, the tests should accept the credentials of
> an Administrator-like user on the command line and should then add
> users and groups as needed.
>
> Each class should be derived form saba.tests.TestCase and its setup
> method would create a connection to the server and share, add users,
> groups, etc as needed, and create the appropriate directories and ACLs
> for the test. The teardown method would cleanup after the tests (ie,
> delete users, etc).
>
> Then there would be a bunch of individual tests that test that the
> correct things happen.
>
> I should be able to get an initial simple test started this weekend,
> if not earlier. However, further feedback is welcome.
Hmmm, perhaps more importantly, I will have to extend samba.smb.SMB so
that I can cause NTCreateAndX to be called with the AccessMask I
require along with other parameters like FILE_OPEN_FOR_BACKUP_INTENT
in CreateOptions etc, so perhaps I will concentrate on a simple
initial test along with the needed extension.
--
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
More information about the samba-technical
mailing list