Selvatico / go-mocket

Go GORM & SQL mocking library
MIT License
220 stars 36 forks source link

Examples for mocking database transactions using go-mocket #17

Open humblefool007 opened 5 years ago

humblefool007 commented 5 years ago

Hi, I am using gorm as ORM in my golang project. I was initially using sqlmock for unit testing now I have switched to go-mocket since it is recommended by the gorm-community and I faced issues while mocking postgres INSERT queries. But now the problem is that I am unable to mock my db transactions. Can someone guide me with this

pavansokkenagaraj commented 5 years ago

Is it even possible with available mock functions?

update: mocket is not catching the transaction commit