On 10/16/13, Olemis Lang <[email protected]> wrote:
> On 10/16/13, Ethan Jucovy <[email protected]> wrote:
[...]
>
> I will transform this into a component and submit a patch to #11333 ...
>
> [...]
>>
>> I've thought about packaging it into a plugin's trac-admin command or
>> submitting a core patch, but I had assumed nobody else would ever need
>> it.
>>  :-)
>>
>
> ... if you do not beat me and get it done first ;)
>
> [...]
>

I've been working today on patches for #11333 [1]_ . It's quite close
. Database initialization is working. Nevertheless I'm getting this
error (after commenting one assertion ;) at the moment of populating
the database with default data .

{{{#!sh

$ /srv/venv/python/trac/trac-mq/bin/python trac/admin/tests/console.py
................F............................................................................................
========
FAIL: test_initdb_noarg (__main__.TracadminTestCase)
----------------
Traceback (most recent call last):
  File "trac/admin/tests/console.py", line 1302, in test_initdb_noarg
    self.assertEqual(self.expected_results[test_name], output)
  File "trac/admin/tests/console.py", line 146, in assertEqual
    output, diff()))
AssertionError: u'\nInitializing database from configuration
sqlite:newtrac.db ...\nImporting default data ...\nDatabase
initialization ... ok\n\n' != u'Initializing database from
configuration ...\nImporting default data ...\nIntegrityError: column
name is not unique\n'
--- expected
+++ actual
@@ -1,6 +1,4 @@
+Initializing database from configuration ...
+Importing default data ...
+IntegrityError: column name is not unique

-Initializing database from configuration sqlite:newtrac.db ...
-Importing default data ...
-Database initialization ... ok
-
-
}}}

I attribute this to the fact that the DB connection is still bound to
the previous DB (<= is that possible ?) which already contains default
values ; if so what's the recommended approach to invalidate the
DatabaseManager pool ? Shutdown seems too radical .

TIA

.. [1] 
https://bitbucket.org/olemis/trac-mq/src/862f5fd4db3b9f098dcda7e447f2f366fd502497/t11333?at=trac_t11333

-- 
Regards,

Olemis - @olemislc

Apacheā„¢ Bloodhound contributor
http://issues.apache.org/bloodhound
http://blood-hound.net

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to