Postgres Integration tests in Golang?! ~ Integration Testing in Go

Опубликовано: 23 Июль 2026
на канале: samvcodes
7,501
149

In this video, I review a nice way of testing your repositories in Golang using in-memory Postgres implementation. I also show an example of how you can write tests for your repositories in a way which enables you to reuse the same tests - without writing new test cases for a new implementation. I.e the same set of tests can be used by different implementations.

Integration tests for your SQL queries enable you to ensure your raw SQL strings are valid and add an extra layer of robustness to your Go services so that you can ensure SQL is passing and repos are working as expected.

The package I mentioned in the video: https://github.com/fergusstrange/embe...

Discord:   / discord  
Twitter:   / samvcodes  
Github: https://github.com/samverrall