-
dockertest
Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work.
Don't mock. Use https://github.com/ory/dockertest to actually run tests against a dockerized DB.
-
InfluxDB
Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
-
then just replace whole function, don't generate manually the mock '__') or it would get out of hand fast, you can just use codegen that static typed like https://github.com/maxbrunsfeld/counterfeiter
-
Mocking has some advantages, but so does using a real database, at work we use https://github.com/allaboutapps/integresql and I quite like the approach that integresql has, since it makes possible to have a fresh database with your dummy data for every test without impacting the execution speed (compared to dropping an re-creating the database).