All Projects → thylong → mongo_mock_go_example

thylong / mongo_mock_go_example

Licence: other
How to mock MongoDB in Golang

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to mongo mock go example

doo
简单易用的接口管理解决方案,支持接口文档管理、Mock服务,接口测试等功能。接口文档采用 yaml 或 Excel 格式书写,简单快捷,Mock 基于该文档,无需数据库,一条命令秒变 Mock 服务。
Stars: ✭ 36 (+20%)
Mutual labels:  mock
mswjs.io
Official website and documentation for the Mock Service Worker library.
Stars: ✭ 77 (+156.67%)
Mutual labels:  mock
jsxmock
使用 JSX 来定义 Mock Server
Stars: ✭ 31 (+3.33%)
Mutual labels:  mock
jest-how-do-i-mock-x
Runnable examples for common testing situations that often prove challenging
Stars: ✭ 63 (+110%)
Mutual labels:  mock
mountebank-api-php
Working with mountebank api it's easy!
Stars: ✭ 17 (-43.33%)
Mutual labels:  mock
Retromock
Java library for mocking responses in a Retrofit service.
Stars: ✭ 48 (+60%)
Mutual labels:  mock
React-CleanArchitecture-Example
Sample frontend project with Clean Architecture using React.js and jest.
Stars: ✭ 73 (+143.33%)
Mutual labels:  mock
Raccoon
Raccoon is a lightweight response mocking framework that can be easily integrated into the Android UI tests.
Stars: ✭ 47 (+56.67%)
Mutual labels:  mock
kras
Efficient server proxying and mocking in Node.js. 💪
Stars: ✭ 18 (-40%)
Mutual labels:  mock
stub-server
Stub server for REST APIs
Stars: ✭ 14 (-53.33%)
Mutual labels:  mock
emock
🐞 下一代C/C++跨平台mock库 (Next generation cross-platform mock library for C/C++)
Stars: ✭ 73 (+143.33%)
Mutual labels:  mock
jest-launchdarkly-mock
Easily unit test LaunchDarkly feature flagged components with jest
Stars: ✭ 14 (-53.33%)
Mutual labels:  mock
msw-storybook-addon
Mock API requests in Storybook with Mock Service Worker.
Stars: ✭ 168 (+460%)
Mutual labels:  mock
webapi
WAI based library for web api
Stars: ✭ 27 (-10%)
Mutual labels:  mock
Lol-Mock-API
Mock API Tool
Stars: ✭ 15 (-50%)
Mutual labels:  mock
animaris
Documentation and Mock for JSBridge base on ThinkJS & MongoDB & React & Antd.
Stars: ✭ 28 (-6.67%)
Mutual labels:  mock
elixir mock
Creates clean, concurrent, inspectable mocks from elixir modules
Stars: ✭ 21 (-30%)
Mutual labels:  mock
elasticmock
Python Elasticsearch Mock for test purposes
Stars: ✭ 98 (+226.67%)
Mutual labels:  mock
httpmock
Lightweight HTTP mocking in Go (aka golang)
Stars: ✭ 75 (+150%)
Mutual labels:  mock
ng-apimock
Node plugin that provides the ability to use scenario based api mocking: for local development for protractor testing
Stars: ✭ 102 (+240%)
Mutual labels:  mock

Mongo Mock example in Go

This repository contains a simple way to mock Mgo driver.

If you're interested in it, you can find an article here : http://thylong.com/golang/2016/mocking-mongo-in-golang/

Installing

$ git clone [email protected]:thylong/mongo_mock_go_example.git

Quick-start

If you want to test only the mock, you can run it this way :

$ go get github.com/thylong/mongo_mock_go_example
$ go run main.go

If you want to test both the connection to Mongo and the mock, you can use the docker-compose file.

Nota Bene

The code was tested with versions 1.7.* of Go.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].