Fork me on GitHub
#sql
<
2021-02-28
>
kulminaator08:02:42

we often run 2 layers of tests , one for testing business logic only (quick set, if you will) and another for testing everything including throwaway db instance that we temporarily run in docker. mocking db level behavior in your tests is very error prone due to assumptions about it's behavior. i would advise you don't try mocking that, use the actual test db instance instead. it's a place where docker naturally fits very well.

6
💯 3
kulminaator10:02:31

at about 14:45 into the part he gets to a similar point , but its worth watching the whole thing

richiardiandrea17:03:12

yeah I am doing integration tests (with clj-test-containers), but here this piece of code is not separating logic and persistence

richiardiandrea17:03:05

and I realized this right after the convo with Sean ... 😄 Not going to mock any db behavior 😉

👍 3