[ckan-dev] Create a temporary database for CKAN plugin nose tests

Toby Dacre toby.okfn at gmail.com
Fri Mar 1 17:52:58 UTC 2013


ok I've got a prototype here https://github.com/okfn/ckan/pull/517
runs locally and on travis.

The issues:

names - it would be nice to do something like use `ckan_test` for the
tests and maybe change to `ckan_dev` for dev work?
we also need to have a database for the datastore maybe `datastore_test`

I've completely removed development.ini from test-core.ini as it feels
that causes tests running inconsistently depending on config settings
in development.ini

If we get some consensus I can clean it up and make a fresh clean
commit rather than having lots of noise.

cheers

On 1 March 2013 13:55, Vitor Baptista <vitor at vitorbaptista.com> wrote:
> +100 for not testing in the development database.
>
> But I don't think we need/should drop and recreate it every time we run the
> tests. In theory, every test should create whatever it needs to test, and
> drop it afterwards.
>
>
> 2013/3/1 Toby Dacre <toby.okfn at gmail.com>
>>
>> On 1 March 2013 10:10, Adrià Mercader <adria.mercader at okfn.org> wrote:
>> > Sean, Toby is there an issue created for this so we don't forget?
>> >
>> is now https://github.com/okfn/ckan/issues/517 please add anything you
>> think needed - very basic at the mo
>> >
>> > Adrià
>> >
>> > On 28 February 2013 16:30, David Read <david.read at hackneyworkshop.com>
>> > wrote:
>> >> +1 to having a different sqlalchemy.url in test-core.ini
>> >>
>> >> It saves running:
>> >>  nosetests --with-pylons=other.ini
>> >> or
>> >>  paster serve other.ini
>> >>
>> >> D
>> >>
>> >> On 25 February 2013 18:38, Toby Dacre <toby.okfn at gmail.com> wrote:
>> >>>
>> >>>
>> >>> On 25 February 2013 18:19, Vitor Baptista <vitor at vitorbaptista.com>
>> >>> wrote:
>> >>>>
>> >>>>
>> >>>>
>> >>>> 2013/2/25 Sean Hammond <sean.hammond at okfn.org>
>> >>>>>
>> >>>>> @ckan-devs, I wonder if maybe we should make test-core.ini use a
>> >>>>> different database from the development/production ini file template
>> >>>>> by
>> >>>>> default? I think it does surprise people when running the tests
>> >>>>> wipes
>> >>>>> all their data (and it's also annoying).
>> >>>>
>> >>>>
>> >>>> +1
>> >>>
>> >>>
>> >>> I would also vote for this we should have a standard test database etc
>> >>> and
>> >>> add info to dev docs etc
>> >>> seems like a ckan 2.1 upgrade :)
>> >>>
>> >>>>
>> >>>>
>> >>>> _______________________________________________
>> >>>> ckan-dev mailing list
>> >>>> ckan-dev at lists.okfn.org
>> >>>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>> >>>> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>> >>>>
>> >>>
>> >>>
>> >>> _______________________________________________
>> >>> ckan-dev mailing list
>> >>> ckan-dev at lists.okfn.org
>> >>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>> >>> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>> >>>
>> >>
>> >> _______________________________________________
>> >> ckan-dev mailing list
>> >> ckan-dev at lists.okfn.org
>> >> http://lists.okfn.org/mailman/listinfo/ckan-dev
>> >> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>> >
>> > _______________________________________________
>> > ckan-dev mailing list
>> > ckan-dev at lists.okfn.org
>> > http://lists.okfn.org/mailman/listinfo/ckan-dev
>> > Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>




More information about the ckan-dev mailing list