openvsx
openvsx copied to clipboard
Quality: Write tests for DB queries
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.