Replies: 2 comments 1 reply
-
Thanks for your kind words! It means a lot!
pgxmock is a testing library. It's not supposed to go into production binary. That means you can develop your application with go 1.21 and produce your build with go 1.19 on a build server.
Most of them are connected with the new functionality introduced in v3 major release.
Well, you are still able to use pre-v3 versions, for example v2.12. They all support Golang v1.19. Just execute this command to force your project to use v2 latest release go get github.com/pashagolub/pgxmock/v2 |
Beta Was this translation helpful? Give feedback.
-
Hi @pashagolub , thanks for the answer. I am sorry, yes sure the pgxmock will not compiled into production binary. I have read the pgxmock source code, specifically the func (e *commonExpectation) fulfilled() bool {
return e.triggered >= max(e.plannedCalls, 1)
} To this one: func (e *commonExpectation) fulfilled() bool {
theMax := uint(1)
plannedCallsQty := uint(e.plannedCalls)
if plannedCallsQty > theMax {
theMax = plannedCallsQty
}
return e.triggered >= theMax
} The By patching the
|
Beta Was this translation helpful? Give feedback.
-
Thank you for this awesome pgxmock libray...
For some reason, I am not allowed to use the N-2 latest Golang versions on production (1.21 and 1.20).
And my unit-tests that are using pgxmock failed when I run using Golang 1.19.
I have questions:
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions