Custom views - support for h2 database?
App Development3 posts169 views2 likesLast activity Apr 2023
HU
huwOP
Apr 2023I am looking to unit test my application which is using custom views. Will I have to test it using a postgres database or is it possible to use h2 in memory database?
ST
stefanobaghino-da
Apr 2023In principle right now they’re only tested internally using PostgreSQL. In practice, if this is for testing your application, using H2 in PostgreSQL compatibility mode might be viable. However, you might expect additional bumps in the road to the ones that are already normally expected for early access features. Another possibility to test is to consider using the Postgres module of Testcontainers.
HU
huw
Apr 2023Thanks @stefanobaghino-da . Looks like Testcontainers will do the job nicely.