3 ms·
I use docker to spin up new postgresql DBs on the fly
by mStreamTeam 6y ago
I use docker to spin up new postgresql DBs on the fly
- toyg 6y agoI do that too but it’s a noticeable overhead, I guess it wouldn’t be great for mass-testing scenarios.
- GordonS 6y agoSame here, and I run the same set of migrations that run in production. To he clear, this is only done once per test session, not for individual tests, and the tests are written in such a way that they don't interfere with each other. The overhead is actually pretty small, less than 10s. I'd saw too much for unit tests, but we'll within the tolerable range for integration/functional tests. Compared with the time I'd spend hacking together some brittle and unrealistic in-memory alternative, I much prefer to use a real database.