Re: Making tests execute on multiple databases
[prev]
[thread]
[next]
[Date index for 2005/05/05]
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