Re: Making tests execute on multiple databases

[prev] [thread] [next] [Date index for 2005/05/05]

From: Jim Brandt
Subject: Re: Making tests execute on multiple databases
Date: 11:53 on 05 May 2005
On May 5, 2005, at 2:18 AM, Tony Bowden wrote:

> In principle I like the idea, but in practice it's going to be tricky 
> as
> the SQL required to create the schema will be different for each
> database.
>
> Class::DBI::DATA::Schema has a way of dealing with that, using
> SQL::Translator, but I don't want to make that a pre-req of CDBI 
> itself.
> Perhaps we could do something where if you have all that installed then
> you can do this?

Yeah, I was thinking the first principle would be do no harm, so the 
tests should continue to run in with SQLite for installation. Then add 
a layer to allow people to manually run with a particular database if 
they take some action.

I'll check out those modules and think about some other possible ways 
of providing this functionality.

To answer Matt's question, if I remember correctly I was able to get 
the Films tests running by just modifying the @DSN array in CDBase to 
connect to my database. I had to make a few other small changes to 
ripple this through, like changing the BEGIN in Film.t to use 
DBD::Oracle.

When I did this little experiment, I found several tests in Film.t that 
failed on Oracle. Specifically the sections that start with "Set up own 
SQL", "Multi-column search", "Inline SQL", and "Inline SQL removes 
WHERE". When I commented these out, everything else ran fine. I haven't 
looked deeply enough yet to figure out why this might be the case.

Thanks,
Jim


==========================================
Jim Brandt
Administrative Computing Services
University at Buffalo

Making tests execute on multiple databases
Jim Brandt 17:58 on 04 May 2005

Re: Making tests execute on multiple databases
Matt S Trout 23:34 on 04 May 2005

Re: Making tests execute on multiple databases
Tony Bowden 06:18 on 05 May 2005

Re: Making tests execute on multiple databases
Jim Brandt 11:53 on 05 May 2005

Generated at 11:49 on 06 May 2005 by mariachi v0.52