[ckan-dev] test failures

David Raznick kindly at gmail.com
Thu Feb 3 22:35:13 UTC 2011


On Thu, Feb 3, 2011 at 9:50 PM, David Read <david.read at okfn.org> wrote:

> Hi all,
>
> I've changed buildbot to run ckan tests twice now: firstly with sqlite and
> then again with postgres in the same buildbot script (I should split it into
> two tasks, but that is for another day). I've fixed a few problems with the
> tests under sqlite and they pass now, but there are still problems with
> tests in postgres.
>
> Seb changed lots of 'rebuild_db' statements to 'clean_db', which then
> requires 'init_db' at the start of the next test. So there are now 'init_db'
> statements at the start of a great many tests. Was there any reason for
> this?
>

This may not be necessary any more with the fix we did the other day on
migrate.  However, the in memory sqlite database gets lost mysteriously
sometimes and its hard to figure out where.  That is why I thought the
init_dbs were there.


> It seems a right faff to remember this - is there no better way? Indeed I
> believe the current test failures are caused by a test not having a init_db.
>
> Note for everyone: Seb, James and I have agreed to set in test.ini to use
> sqlite.
>

I disagree to this.  You should specify what database you want in your own
development.ini.  The template development.ini could have sqlite as the
default instead.  This is the only sane way to do it in my opinion.

We think it is a good idea to default tests to being run quickly. However, I
> can't see a good way to then run tests under postgres - if you comment out
> the sqlite in test.ini (as the buildbot currently does), 9/10 times you end
> up checking it in by mistake. Maybe someone has a better idea, since passing
> parameters to nose is a no no.
>

Why is this a no no?

David
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20110203/510905b3/attachment-0001.html>


More information about the ckan-dev mailing list