News for hackers. Stuff that matters.
Re:PostgreSQL example of self-contained stored procedures by marcus_holmes on Monday October 28, 2019 @08:44AM (#21376340)
agree on the mocking the database - I wrote an entire test suite based on mocking the database responses, and then found a ton of live problems caused by the database - backend interaction (things like structs not aligning with the actual return records from functions, input format for arrays of ids being different from the mockup to the actual driver, and hstores).

Now I have a test database, which I create from a version-controlled schema.sql, and each test creates its own fixtures in the test db. Works way better.

There are no comments on this comment yet.