On 08/12/10 05:58, Robin Sheat wrote: > While attempting to put the packages for 3.2.1 together, I encountered a > number of test cases that fail unless you have a database configured. > This seems to be due to tests 'use'ing modules that attempt to connect > to the database immediately, and therefore failing. >
> I'm after some opinions on how to best solve this. My ideas are: > * Move these tests into a 'db_dependent' directory so that they aren't > run by default. Perhaps add a 'make test_all' rule that includes them. > * Have the packages move the iffy ones out of the way (although they > will still fail for anyone running 'make test' without the database set > up.) > * Introduce an environment variable that is set during testing that > tells C4::Context (or whatever it is making the DB connection) that > failures are OK. This may reduce test coverage however, which we don't > want. I'm wondering if the last possibility might be enhanced by using something like DBD::Mock. Cheers Colin -- Colin Campbell Chief Software Engineer, PTFS Europe Limited Content Management and Library Solutions +44 (0) 208 366 1295 (phone) +44 (0) 7759 633626 (mobile) [email protected] skype: colin_campbell2 http://www.ptfs-europe.com _______________________________________________ Koha-devel mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
