On Thu, Oct 09, 2008 at 02:24:55PM -0400, Greg Sabino Mullane wrote: > > > > > ... I suppose it could also be somewhat easy to try out a few series > > > > of basic/default credentials on localhost for engines like MySQL and > > > > Postgres, and try to setup a test database from there. > > > > > > That sounds more interesting. > > > > It sounds scary to me. > > I don't think either of the current proposals are going to do it exactly > that way anymore. To sum up and rearrange things a bit, a module needing a > database could: > > 1) Look for a TEST_DBI env variable and use that. > > 2) If that does not exist or fails, it uses the Test::DB module to create > a new database. By create a new database, we mean create a completely new > database cluster (to use a Postgres term), which has its own socket > directory, port, etc. and should not interfere with any existing or future > databases. The only potential problem is the database not being shut down > at the end of the test, and thus that particular port could not be used by > other applications until the db was killed. >
I'm currently working on 2). Configuration files might be useful for database engines for which it's not possible to create a new database. -- Philippe Bruhat (BooK) The end of a battle is not the same thing as peace. (Moral from Groo The Wanderer #79 (Epic))