go-sqlmock icon indicating copy to clipboard operation
go-sqlmock copied to clipboard

Fix args passed not exp

Open IvoGoman opened this issue 3 years ago • 0 comments
trafficstars

This PR changes the behavior in the expectation matching. Previously if no query arg was expected but one was actually passed during query execution the expectations were still met. (Example https://go.dev/play/p/VwF9k6KlET2 ) With this change it is ensured that expected and actual query args do always match.

This should be considered a breaking change as it changes the behavior how expectations are matched and can result in failing unit tests.

I was not able to run the tests locally against go < 1.8. The install of multiple go version mentioned here (https://go.dev/doc/manage-install#installing-multiple) did not work. There seems to be no darwin-arm64 version hosted for 1.7.6

Resolves #292

IvoGoman avatar Aug 01 '22 09:08 IvoGoman