openvsx icon indicating copy to clipboard operation
openvsx copied to clipboard

Quality: Write tests for DB queries

Open spoenemann opened this issue 3 years ago • 0 comments
trafficstars

Most of our current tests mock away the DB because they're focused on the application logic and external API. We have seen changes breaking some DB queries without being caught by tests from time to time. We should improve the situation by adding tests that run the DB queries defined in our entity / DTO repositories and assert no DB error, just to ensure that the queries are consistent with the schema.

We can use PostgreSQL shipped with Testcontainers for this kind of tests, as we already do for the integration test.

spoenemann avatar Nov 22 '21 07:11 spoenemann