So as part of my work on replay/update authorization I've been working
on making it possible to run the authz dependent tests over DAV. I've
got a working patch (modulo one test that fails, which I've changed to
XFail on DAV only, which required tweaks to XFail, but anyway), but I
didn't want to just commit it because it requires tweaks to a DAV test
setup, and I didn't want to break the tests without warning.
The general approach here is to make all tests run over DAV with
mod_authz_svn installed and configured to point to an authz file in
svn-test-work. The tests can overwrite that file if they need to
modify the authz behavior, and it'll be reverted to a virgin file
(which gives full read/write access to all users over the whole repos)
at the start of each test (actually at the creation of each sandbox,
since that's the easiest place to do it).
There are two other tweaks needed to make this sane. First, we have
an authz test that fails over DAV, so I had to tweak XFail to allow
you to pass in a function that determines if the test is really XFail
or not. This is different from how Skip works because to determine if
we're XFail based on an RA layer we need to wait until ARGV was
parsed, so the decision has to be delayed. Second, for DAV tests
since we only have one authz file we need to be able to reliably
determine the name of the repositories created, so we can set up rules
that only apply to one of them (for svnsync specifically). Currently
the names are determined via the number of the test, but that can
change if tests are moved around, which is undesireable if it's being
depended on. Thus I added an optional parameter to Sandbox.build that
controls the name used for such things.
Anyway, I'd love some feedback on this before commit, especially from
people who run automated tests so I know they're ready to turn on
mod_authz_svn in their config.
-garrett
[[[
Turn on mod_authz_svn for tests over DAV.
* subversion/tests/cmdline/svnsync_tests.py
(basic_authz): Pass a name to sbox.build(), and move the writing of
the authz conf file later in the test so it doesn't get overwritten.
(copy_from_unreadable_dir): Ditto, but also make the authz file
conditional on the type of ra layer we're using.
* subversion/tests/cmdline/README: Mention the AUthzSVNAccessFile
config needed for the authz tests.
* subversion/tests/cmdline/authz_tests.py
Alias XFail.
(skip_test_when_no_authz_available): Let http tests use authz again.
(is_this_dav): New helper function.
(test_list): Mark authz_open_directory as XFail on DAV.
* subversion/tests/cmdline/svntest/testcase.py
(XFail.__init__): Add a cond parameter, don't set up _result_text here,
stash cond for later.
(XFail.convert_result): Set up the _result_text here, and mention why.
Also reverse the order of the pass and fail strings, due to the fact
that we're changing the order of the call to this function.
* subversion/tests/cmdline/svntest/main.py
(Sandbox._set_name): Set authz_file conditionally based on ra layer.
(Sandbox.build): Allow the user to pass in an explicit name.
(TestRunner.run): Reverse the order fo calls to convert_result and
run_text, to allow the XFail class to reset _result_text.
]]]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 27 01:15:49 2006