go-mocket - Go GORM & SQL mocking library

  •        89

Now if use singleton instance of DB it will use everywhere mocked connection.




Related Projects

gorm - The fantastic ORM library for Golang, aims to be developer friendly

  •    Go

The fantastic ORM library for Golang, aims to be developer friendly.Released under the MIT License.

SQLBoiler - Generate a Go ORM tailored to your database schema.

  •    Go

SQLBoiler is a tool to generate a Go ORM tailored to your database schema.It is a "database-first" ORM as opposed to "code-first" (like gorm/gorp). That means you must first create your database schema. Please use something like goose, sql-migrate or some other migration tool to manage this part of the database's life-cycle.

mockery - A mock code autogenerator for golang

  •    Go

mockery provides the ability to easily generate mocks for golang interfaces. It removes the boilerplate coding required to use mocks. See github.com/jaytaylor/mockery-example for the fully runnable version of the outline below.

mockery - Simplifying the use of mocks with Node.js

  •    Javascript

If you've tried working with mocks in Node.js, you've no doubt discovered that it's not so easy to get your mocks hooked up in the face of Node's module loading system. When your source-under-test pulls in its dependencies through require, you want your mocks provided, instead of the original module, to enable true unit testing of your code. This is exactly the problem Mockery is designed to solve. Mockery gives you a simple and easy to use API with which you can hook in your mocks without having to get your hands dirty with the require cache or other Node implementation details.

bolthold - BoltHold is an embeddable NoSQL store for Go types built on BoltDB

  •    Go

BoltHold is a simple querying and indexing layer on top of a Bolt DB instance. For a similar library built on Badger see BadgerHold. The goal is to create a simple, higher level interface on top of Bolt DB that simplifies dealing with Go Types and finding data, but exposes the underlying Bolt DB for customizing as you wish. By default the encoding used is Gob, so feel free to use the GobEncoder/Decoder interface for faster serialization. Or, alternately, you can use any serialization you want by supplying encode / decode funcs to the Options struct on Open.

db - Productive data access layer for Go.

  •    Go

The upper.io/db.v3 package for Go is a productive data access layer for Go that provides a common interface to work with different data sources such as PostgreSQL, MySQL, SQLite, MSSQL, QL and MongoDB.Take the tour to see real live examples in your browser.

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

  •    Go

When developing applications, it is often necessary to use services that talk to a database system. Unit Testing these services can be cumbersome because mocking database/DBAL is strenuous. Making slight changes to the schema implies rewriting at least some, if not all of the mocks. The same goes for API changes in the DBAL. To avoid this, it is smarter to test these specific services against a real database that is destroyed after testing. Docker is the perfect system for running unit tests as you can spin up containers in a few seconds and kill them when the test completes. The Dockertest library provides easy to use commands for spinning up Docker containers and using them for your tests.Using Dockertest is straightforward and simple. Check the releases tab for available releases.

Testify - A toolkit with common assertions and mocks that plays nicely with the standard library

  •    Go

Go code (golang) set of packages that provide many tools for testifying that your code will behave as you intend. It supports Easy assertions, Mocking, Testing suite interfaces and functions.

golang-gin-realworld-example-app - Exemplary real world application built with Golang + Gin

  •    Go

This codebase was created to demonstrate a fully fledged fullstack application built with Golang/Gin including CRUD operations, authentication, routing, pagination, and more.

rspec-mocks - Rspec-2 doubles (mocks and stubs)

  •    Ruby

Rspec-2 doubles (mocks and stubs)

Bio4j - Bioinformatics Graph based DB

  •    Java

Bio4j is a bioinformatics graph based DB including most data available in Uniprot KB (SwissProt + Trembl), Gene Ontology (GO), UniRef (50,90,100), RefSeq, NCBI Taxonomy, and Expasy Enzyme DB. Bio4j provides a completely new and powerful framework for protein related information querying and management. Since it relies on a high-performance graph engine, data is stored in a way that semantically represents its own structure.

interfake - :computer: Fake APIs for prototypes & automated tests.

  •    Javascript

Interfake is a tool which allows developers of client-side applications of any platform to easily create dummy HTTP APIs to develop against. Let's get started with a simple example.If you don't want to use the JavaScript method to create your Interfake API, go read up on all the methods. Otherwise, read on.

Smocker - Simple and efficient HTTP mock server

  •    Go

Smocker (server mock) is a simple and efficient HTTP mock server. Smocker exposes two ports: Port 8080 is the mock server port. It will expose the routes you register through the configuration port and Port 8081 is the configuration port. It's the port you will use to register new mocks. This port also exposes a user interface.

Gin - HTTP web framework written in Go (Golang)

  •    Go

Gin is a web framework written in Go (Golang). It features a martini-like API with much better performance, up to 40 times faster thanks to httprouter. If you need performance and good productivity, you will love You can add global, per-group, and per-route middlewares, thousands of nested groups, nice JSON validation and rendering. And the performance will be still great. Gin uses httprouter internally, the fastest HTTP router for Golang. Httprouter was created by Julien Schmidt and it’s based in a Radix Tree algorithm.

Fireworq - Lightweight, high-performance, language-independent job queue system

  •    Go

Fireworq is a lightweight, high-performance job queue system with the following abilities. It is available from ANY programming language which can talk HTTP. It works with a single binary without external dependencies. It is built on top of RDBMS (MySQL), so that jobs won't be lost even if the job queue process dies. You can apply an ordinary replication scheme to the underlying DB for the reliability of the DB itself.

pgwatch2 - PostgreSQL metrics monitor/dashboard

  •    Go

Software is packaged as Docker (for custom setup see the last paragraph below, for a Docker quickstart see here) for getting started quickly. After some minutes you could open the "db-overview" dashboard and start looking at metrics. For defining your own dashboards you need to log in as admin (admin/pgwatch2admin). NB! If you don't want to add the "test" database (the pgwatch2 configuration db) for monitoring set the NOTESTDB=1 env parameter when launching the image.

azuredatastudio - Azure Data Studio is a data management tool that enables working with SQL Server, Azure SQL DB and SQL DW from Windows, macOS and Linux

  •    TypeScript

Azure Data Studio is a data management tool that enables you to work with SQL Server, Azure SQL DB and SQL DW from Windows, macOS and Linux. Go to our download page for more specific instructions.

db - Expressive database wrappers for Go (golang). SQLite3, MySQL, PostgreSQL and MongoDB.

  •    Go

Expressive database wrappers for Go (golang). SQLite3, MySQL, PostgreSQL and MongoDB.