Sql mock driver for golang to test database interactions
I use Sqlmock for that purpose
pgx mock driver for golang to test database interactions
For postgres only but pgxmock is similarly excellent
Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.
How do you unit-test code that reaches out to the db, without introducing interfaces everywhere?
1 project | /r/golang | 16 Aug 2023
SQL mock driver for Golang to test database interactions
1 project | news.ycombinator.com | 5 Feb 2022
Can't get a specifc SQL query with pgx to work
1 project | /r/golang | 30 Jan 2022
[HELP] how to test this piece of code?
1 project | /r/golang | 29 Dec 2021
Integration Tests with Postgres
2 projects | /r/golang | 29 Mar 2023