[Grok-dev] testing and *rdb*

Toni Mueller support at oeko.net
Sat Jul 12 18:05:19 EDT 2008


Hi,

while trying to write some tests for my RDB using application, I found
that I'd like to enforce the specification of the DSN using a TEST_DSN
environment variable, to prevent the unwitting user (eg. me) from
inadvertantly erasing their production database. It was easy to enforce
this, but the side effect is that tests may no longer be run
unattended, since something that would run eg. all tests for all
packages contained in a certain directory tree (think of eg. BSD's
"make build"), would not know how to set up the test database. I also
can't simply assume that the test database is SQLite, which is far too
old on my system, but instead have to assume a full PostgreSQL right
now, but that can't be automagically configured.

What's the recommended way to solve this dilemma, please?


Kind regards,
--Toni++



More information about the Grok-dev mailing list