'Unit Testing for pgxpool

I am looking to write unit tests for Go code that uses pgxpool to interact with a postgres database. Is there a test framework that will stand up a dummy or mock database to test on?

I am aware of a package called pgxpoolmock. The problem is, there is no way to test actual production code, as a pool from pgxpool cannot be casted to the type pgxpoolmock (or can it?)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source