You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Lieven Govaerts <lg...@mobsol.be> on 2006/05/05 23:15:17 UTC
[PATCH] new python authz tests
Hi,
attached patch will expand the coverage of the python authz tests.
While the patch doesn't cover all possible authz scenario's (no test for
properties now), both positive and (mostly)negative read/write access for
files&folders manipulations is covered. I choose to only use direct
repository actions instead of going through the working copy. I suppose by
doing this I don't skip any authz validations?
Currently only ra_svn is supported. The two tests authz_read_access &
authz_write_access both write a custom authz file in the generated test
repository. If someone knows how to make these tests function over the
ra_dav layer, please let me know.
I see this as a first step in complete authz test coverage, any input is
welcome.
regards,
Lieven.
[[[
Add extra tests for authz validation
Patch by: Lieven Govaerts <lg...@mobsol.be>
* subversion/tests/cmdline/authz_tests.py:
(authz_read_access): new authz test for read access
(authz_write_access): new authz test for write access
]]]
Re: [PATCH] new python authz tests
Posted by David James <dj...@collab.net>.
On 5/8/06, Garrett Rooney <ro...@electricjellyfish.net> wrote:
> > One thing that I found odd is that when expected_err = "", the tests will
> > still work. I assumed the empty string was handled as no error at all, but
> > it seems to match all kinds of error output.
>
> That is kind of odd...
expected_err is a regular expression, so "" matches anything. If you
want to match the empty string you should use "^$".
Cheers,
David
--
David James -- http://www.cs.toronto.edu/~james
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] new python authz tests
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 5/6/06, Lieven Govaerts <lg...@mobsol.be> wrote:
> Updated patch attached.
>
> Two changes:
> - Whitespace changes have been removed.
> - the tests now run over ra_dav. I set up my apache according to the
> instructions in the README file, copied some code of svnsync_tests, adapted
> the expected error messages for ra_dav et voila!
Great! Committed in r19562. Thanks!
> One thing that I found odd is that when expected_err = "", the tests will
> still work. I assumed the empty string was handled as no error at all, but
> it seems to match all kinds of error output.
That is kind of odd...
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: [PATCH] new python authz tests
Posted by Lieven Govaerts <lg...@mobsol.be>.
Updated patch attached.
Two changes:
- Whitespace changes have been removed.
- the tests now run over ra_dav. I set up my apache according to the
instructions in the README file, copied some code of svnsync_tests, adapted
the expected error messages for ra_dav et voila!
One thing that I found odd is that when expected_err = "", the tests will
still work. I assumed the empty string was handled as no error at all, but
it seems to match all kinds of error output.
Lieven.
> -----Original Message-----
> From: rooneg@gmail.com [mailto:rooneg@gmail.com] On Behalf Of
> Garrett Rooney
>
> Looks good at first glance, although there's a bunch of
> unnecessary whitespace changes, which should happen
> separately if at all. Also, you should be able to test authz
> over DAV now, see the tests at the end of svnsync_tests.py to
> see how it works. If you could test to see that these work
> correctly over DAV it would be much appreciated.
>
> -garrett
Re: [PATCH] new python authz tests
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 5/5/06, Lieven Govaerts <lg...@mobsol.be> wrote:
> Hi,
>
>
> attached patch will expand the coverage of the python authz tests.
>
> While the patch doesn't cover all possible authz scenario's (no test for
> properties now), both positive and (mostly)negative read/write access for
> files&folders manipulations is covered. I choose to only use direct
> repository actions instead of going through the working copy. I suppose by
> doing this I don't skip any authz validations?
>
> Currently only ra_svn is supported. The two tests authz_read_access &
> authz_write_access both write a custom authz file in the generated test
> repository. If someone knows how to make these tests function over the
> ra_dav layer, please let me know.
>
> I see this as a first step in complete authz test coverage, any input is
> welcome.
Looks good at first glance, although there's a bunch of unnecessary
whitespace changes, which should happen separately if at all. Also,
you should be able to test authz over DAV now, see the tests at the
end of svnsync_tests.py to see how it works. If you could test to see
that these work correctly over DAV it would be much appreciated.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org