Skip to content

Comment on Scaling Go Testing with Contract and Scenario Mocksparent

Comments

If your SQL is isolated to one place then you only need to test that single package with a real DB and can use mocks everywhere else. Your mocks can be tested with the exact same test suite as the SQL package, so you know it conforms to the same contract.

If you have SQL scattered all over the place... Leave the spaghetti for dinner.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.