News for hackers. Stuff that matters.
Re:Mocking Is an Anti-Pattern by pasc1878 on Monday June 17, 2024 @12:52PM (#40707901)
Isn't that rather slow - or do you mean for each run of unit-tests.
Re:Mocking Is an Anti-Pattern by cryptonector on Monday June 17, 2024 @03:58PM (#40710329)
In my tests spinning up a PG instance (ultimately just an `initdb` and `createdb` invocation, loading a schema and test data (`psql`), running the test, and tearing down the PG instance is quite fast.
Re:Mocking Is an Anti-Pattern by gfna on Monday June 17, 2024 @01:19PM (#40708245)
They way we did this was basically separate readonly and read/write tests. All the readonly tests would use the same instance with seeded data in parallel, and the read/write tests would get their own databases per test.