this post was submitted on 28 Jul 2023
10 points (91.7% liked)

Golang

2218 readers
1 users here now

This is a community dedicated to the go programming language.

Useful Links:

Rules:

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 1 year ago

Yes by all means, split your business logic from your infrastructure layer, but for the love of god don't use sqlmock. It's 2023, we have testcontainers and the ability to relatively simply - and reliably - host external dependencies locally. With a MySQL or Postgres instance there isn't really an excuse anymore to not be testing the integration.