Hey,
I have some test class in which I need to (temporary) add a table. I did some stuff that works locally for my (just constructing some SQL and passing it to wfGetDb()->safeQuery) but it fails on Jenkins, presumably because it's using SQLLite or whatever there. Is there a better way to add such tables?
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
Use a stub instead? http://www.phpunit.de/manual/3.0/en/mock-objects.html (at the bottom of the page)
On Fri, May 25, 2012 at 3:47 PM, Jeroen De Dauw jeroendedauw@gmail.comwrote:
Hey,
I have some test class in which I need to (temporary) add a table. I did some stuff that works locally for my (just constructing some SQL and passing it to wfGetDb()->safeQuery) but it fails on Jenkins, presumably because it's using SQLLite or whatever there. Is there a better way to add such tables?
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. -- _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On 25/05/12 23:47, Jeroen De Dauw wrote:
Hey,
I have some test class in which I need to (temporary) add a table. I did some stuff that works locally for my (just constructing some SQL and passing it to wfGetDb()->safeQuery) but it fails on Jenkins, presumably because it's using SQLLite or whatever there. Is there a better way to add such tables?
Cheers
What's the definition of your table? It should be possible to write it in a way compatible with both MySQL and SQLite. Problem: We support more backends. Another option is to branch depending on the backend used.
And finally, there's the option to skip that test iif the backend is SQLite (there's currently a test doing that on mysql, take a look at it).
Cheers
wikitech-l@lists.wikimedia.org