Could anybody please advise a guide how to test my app which uses postgres DB? I think mocking Exposed is quite tricky, so maybe I should just somehow create a DB for every test case. but anyway I don't know how. Of course I can declare something like "before every test start docker" and "after every test stop docker" via
, but it seems too rough... Is there an in-memory DB that I can create in JVM and with which Exposed can work?
I created a UserData Class, then a list variable with a bunch of those in it called testUsers. Then I just created tests that insert, select, delete, insert, etc in the appropriate order with a beginning setup operation. I have a gradle tasks that can kick of the DB build too, tables only... but the testing wasn't tough