[HELP] Testing SQL queries and functions that use SQL queries in Golang.

This page summarizes the projects mentioned and recommended in the original post on /r/golang

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • dockertest

    Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work.

  • I don't know if you're familiar with Docker, but there's a package called ory/dockertest that allows you to run a container per suite (or per test it's up to you), that way you can actually test the code against a real local running database.

  • social

    social network in GRPC, Go, mysql, and vuejs, (by imran31415)

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • go-sqlmock

    Sql mock driver for golang to test database interactions

  • For testing DB queries I use https://github.com/DATA-DOG/go-sqlmock for unit tests. I then have a separate integration test suite that runs against all our services using Docker.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • How do you unit-test code that reaches out to the db, without introducing interfaces everywhere?

    1 project | /r/golang | 16 Aug 2023
  • Integration Tests with Postgres

    2 projects | /r/golang | 29 Mar 2023
  • When to mock and what to mock in a Web API?

    3 projects | /r/golang | 23 Mar 2023
  • Can you set expectations for SQL transaction using Testify?

    2 projects | /r/golang | 17 Jul 2022
  • how to mock DBs

    13 projects | /r/golang | 30 May 2022