How to mock database calls

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

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • go-sqlmock

    Sql mock driver for golang to test database interactions

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • dockertest

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

  • mongoifc

    The implementation of the interfaces for the official MongoDB driver in Go

  • testfixtures

    Ruby on Rails like test fixtures for Go. Write tests against a real database

    I'm the author of https://github.com/go-testfixtures/testfixtures, a library written to make it easier to write tests with a real database and test data. You might want to use it together with docker-compose, for example.

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

  • Why elixir over Golang

    10 projects | /r/elixir | 29 May 2023
  • Using SQLC in project how do I mock database Calls with it for unit testing?

    3 projects | /r/golang | 22 Oct 2022
  • Mocking database or use a test database

    5 projects | /r/golang | 18 Apr 2022
  • I share my authentication server.

    18 projects | /r/golang | 20 Dec 2021
  • Building a RESTful API with Go Fiber: An Express-Inspired Boilerplate

    13 projects | dev.to | 5 Oct 2024