go-mocket - Go GORM & SQL mocking library

  •        399

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




Related Projects

Go-JWT-Postgres-Mysql-Restful-API - This is an API built with golang, jwt, gorm, postgresql, mysql

  •    Go

This is an application built with golang, jwt, gorm, postgresql, mysql.

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.

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

  •    Go

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

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.

prisma-client-go - Prisma Client Go is an auto-generated and fully type-safe database client

  •    Go

Prisma Client Go is an auto-generated query builder that enables type-safe database access and reduces boilerplate. You can use it as an alternative to traditional ORMs such as gorm, xorm, sqlboiler and most database-specific tools. It is part of the Prisma ecosystem. Prisma provides database tools for data access, declarative data modeling, schema migrations and visual data management.

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.

gnomock - Test your code without writing mocks with ephemeral Docker containers 📦 Setup popular services with just a couple lines of code ⏱️ No bash, no yaml, only code 💻

  •    Go

Gnomock is an integration and end-to-end testing toolkit. It uses Docker to create temporary containers for application dependencies, setup their initial state and clean them up in the end. Gnomock allows to test the code with no mocks wherever possible. The power of Gnomock is in a variety of Presets, each implementing a specific database, service or other tools. Each preset provides ways of setting up its initial state as easily as possible: SQL schema creation, test data upload into S3, sending test events to Splunk, etc.

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.

mockolo - Efficient Mock Generator for Swift

  •    Swift

Mockolo is an efficient mock generator for Swift. Swift doesn't provide mocking support, and Mockolo provides a fast and easy way to autogenerate mock objects that can be tested in your code. One of the main objectives of Mockolo is fast performance. Unlike other frameworks, Mockolo provides highly performant and scalable generation of mocks via a lightweight commandline tool, so it can run as part of a linter or a build if one chooses to do so. Try Mockolo and enhance your project's test coverage in an effective, performant way. One of the main objectives of this project is high performance. There aren't many 3rd party tools that perform fast on a large codebase containing, for example, over 2M LoC or over 10K protocols. They take several hours and even with caching enabled take several minutes. Mockolo was built to make highly performant generation of mocks possible (in the magnitude of seconds) on such large codebase. It uses a minimal set of frameworks necessary (mentioned in the Used libraries section) to keep the code lean and efficient.

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.

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

  •    Ruby

Rspec-2 doubles (mocks and stubs)

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.

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.

godror - GO DRiver for ORacle DB

  •    C

godror is a package which is a database/sql/driver.Driver for connecting to Oracle DB, using Anthony Tuininga's excellent OCI wrapper, ODPI-C. Although Oracle Client libraries are NOT required for compiling, they are needed at run time. Download the free Basic or Basic Light package from https://www.oracle.com/database/technologies/instant-client/downloads.html.

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.

We have large collection of open source products. Follow the tags from Tag Cloud >>

Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.