Pgtemp: The easiest way to write tests with Postgres in Rust, without Docker
github.com
github.com
Will each testcase need to run migrations after connecting for the first time? Also, I’m used to using clients which lazily pool connections, do they still work with this model?
Op, I’d be curious what you think of my project pgtestdb, which takes a different approach: use a single server, but create new databases each time. Maybe there is some middle ground where a proxy creates a new cloned db after each connection? https://github.com/peterldowns/pgtestdb
In general I expect test suites to put things into the expected starting state, though I can see the appeal of giving each suite it's own isolated state since that makes parallelism easier
But mocking things are hard on Rust because of its strong type system, so this project can be useful.
Is there something similar for Node.js?