You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have added a method sqlmock.New() which opens a mock connections and pings it. Using it as a shortcut, will save you from this trouble. The issue was that sql driver Close was not triggered, looks like connection is not being opened unless a database is used. There is no direct hook to ping the database otherwise from the driver side. While keeping all backwards compatible, this should handle the case, could not think of something more convenient, if you have any ideas, you are welcome.
The following test will pass even if it shouldn't:
If I do something with the database, this will fail as expected:
The text was updated successfully, but these errors were encountered: