On Fri, Sep 20, 2013 at 11:31 AM, Olemis Lang <[email protected]> wrote:
> Hi ! > :) > > On 9/20/13, Anze Staric <[email protected]> wrote: > > Security suite is the only suite that does multiproduct testing (it > > upgrades the environment to multiproduct). Since BEP-0010, we modify > > ticket table to set UID as autoincrement, and increment ID manually. > > After each test, reset_db is called, but it does not recreate the > > tables, it just removes their content, so autoincrement field remains > > UID. > > > > If "single product" tests are run afterwards, they are run in an > > upgraded database, but since the version table has been wiped, they do > > not know that. Sql translation unaware of the upgraded database does > > not fill the id field in the ticket table so NULL gets inserted as > > ticket id, causing the errors you mentioned. > > > > Unless anyone is aware of a simple way to recreate the tables when > > needed, I'd go with reordering the tests. > > > > All tests most (if not all) tests i.e. most tests (if not all) > in bloodhound_multiproduct will > perform multi-product assertions as long as they invoke > MultiproductTestCase._upgrade_mp class method (... in my local copy > after applying patches for functional test suite , in /trunk this > might still be an instance method ...) > > it's a class method in trunk as well http://bhnet.blood-hound.net/browser/bloodhound/bloodhound_multiproduct/tests/env.py?marks=224-240#L224 [...] -- Regards, Olemis - @olemislc
