[Haskell-cafe] Property checks and PostgreSQL?

Ignat Insarov kindaro at gmail.com
Sat Mar 13 23:13:27 UTC 2021


> The template test database should be immutable during the tests.  Just
> clone the template database, and run tests against the clone.  When done,
> drop the clone.

Is it significantly faster than importing from prepared `*.sql` files?
The problem here is that, as I understand, we will have to restart the
application every time so that it connects to the new data base. It
takes about a second. I was hoping that there is some way to clone a
single schema, but I figure it is not possible. So now I have to
either drop the schema and import it again from `*.sql`, or drop the
data base, clone it from the template and restart the application. It
does not seem like a clear win.

Note that I need the application to be running so that I may observe
the HTTP API. Although perhaps I can factor the API out and write a
simple wrapper for it that would start faster. But this is extra work
and it would increase the complexity of the project, so I am not sure
if I should.


More information about the Haskell-Cafe mailing list