You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@collab.net> on 2001/08/09 15:06:54 UTC

python tests over ra_dav

hey gstein:

I'm trying to tweak the python test-system to be able to run over
ra_dav instead of ra_local.  (Apache would be running locally, and the
network activity would be via loopback.) 

In theory, it's easy -- every test starts life by checking out a
working copy.  My plan is just to checkout an http://localhost/... URL
instead of the usual file:/// URL.  Once it has a working copy, each
test can commit and update as it pleases, thereby exercising whatever
RA layer was originally used.

Here's my problem, though: before initial checkout, each test begins
by making a *copy* of a pristine repository that contains a greek
tree.  This creates a safe, isolated environment: every test has a
private repository and private working copy.

Unfortunately, this doesn't translate so well for Apache; httpd wants
to know about *every* repository at startup by reading httpd.conf, and
yet here we have tests creating new repositories on the fly.  Is there
some way to write a <Location> directive which maps to a "directory of
repositories"?

<Location /svn/my-repo>
   DAV svn
   SVNPath /www/svn/my-repo
</Location>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: python tests over ra_dav

Posted by Ben Collins-Sussman <su...@collab.net>.
Greg Stein <gs...@lyra.org> writes:
 
> I like solution (2), as it keeps everything simpler. Also, having an
> explicit post-mortem area is nice. Lastly, it means that "downstream"
> developers can more easily set up a test environment -- they have a single
> Location to configure.

I already implemented (3)...  so we'll see how it goes.  The
developers still only need to create a single location in httpd.conf
if they want to run automated DAV tests.  The python test suite now
appends new repositories to an .htaccess file on-the-fly.

We can always change things later if we need to.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: python tests over ra_dav

Posted by Greg Stein <gs...@lyra.org>.
On Thu, Aug 09, 2001 at 10:37:58AM -0500, Ben Collins-Sussman wrote:
> Ben Collins-Sussman <su...@collab.net> writes:
> 
> > Is there some way to write a <Location> directive which maps to a
> > "directory of repositories"?

Nope.

Each repository (at this point in time) requires its own SVNPath
configuration. We will probably want to add something later to do the
multiple-repository thing (I'm thinking SourceForge would not appreciate
tens of thousands of config lines :-).

I did not rely on the standard Apache aliasing to map URLs to filesystem
locations because we want to be absolutely sure that the raw repository
files cannot be accessed via standard Apache servicing. Thus, the use of
SVNPath.

> If there's no way to do this, Karl and Mike have offered three other
> potential solutions:
> 
>  1.  Define N specific repositories in httpd.conf, and keep adding
>      them every time we write a new test.
> 
>  2.  Define a single repository in httpd.conf, and have each test
>      'overwrite' this location with its own private repository.  If a
>      test fails, copy the private repository to a post-mortem area
>      before it's blown away by the next test.
> 
>  3.  Create a "repositories" directory location in httpd.conf.
>      Place a .htaccess file in this directory that contains an
>      ever-growing number of <Location> pointers to repositories.  When
>      each test runs, it creates its own repository within the
>      directory and then appends a new <Location> to .htaccess.
> 
> Solution #3 seems the most attractive, assuming it works.  The only
> thing better than this is my original idea.

I like solution (2), as it keeps everything simpler. Also, having an
explicit post-mortem area is nice. Lastly, it means that "downstream"
developers can more easily set up a test environment -- they have a single
Location to configure.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: python tests over ra_dav

Posted by Ben Collins-Sussman <su...@collab.net>.
Ben Collins-Sussman <su...@collab.net> writes:

> Is there some way to write a <Location> directive which maps to a
> "directory of repositories"?

If there's no way to do this, Karl and Mike have offered three other
potential solutions:

 1.  Define N specific repositories in httpd.conf, and keep adding
     them every time we write a new test.

 2.  Define a single repository in httpd.conf, and have each test
     'overwrite' this location with its own private repository.  If a
     test fails, copy the private repository to a post-mortem area
     before it's blown away by the next test.

 3.  Create a "repositories" directory location in httpd.conf.
     Place a .htaccess file in this directory that contains an
     ever-growing number of <Location> pointers to repositories.  When
     each test runs, it creates its own repository within the
     directory and then appends a new <Location> to .htaccess.

Solution #3 seems the most attractive, assuming it works.  The only
thing better than this is my original idea.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org