Загрузка...

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

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/embedded-postgres

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

Видео Postgres Integration tests in Golang?! ~ Integration Testing in Go канала samvcodes
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять