DATA-DOG / go-sqlmock

Sql mock driver for golang to test database interactions
Other
5.95k stars 404 forks source link

How to print go-sqlmock expected query? #301

Closed tonytony2020 closed 1 year ago

tonytony2020 commented 1 year ago

Question

It's not easy to debug sqlmock with gorm, it always complains about

call to Query 'xxx' with args xxxx was not expected; call to Rollback transaction was not expected

So, what is it expected, how to setup print it out?