{"repo":"tryvium-travels/memongo","free":true,"listed":false,"github":"https://github.com/tryvium-travels/memongo","clone":"git clone https://github.com/tryvium-travels/memongo.git","description":"Easily run an in-memory MongoDB server for your Go unit tests","language":"Go","stars":68,"topics":["golang","mongo","unit-testing","mongodb","mocking","test","mongo-memory-server","tryvium","travel","tryvium-travels"],"license":"MIT","category":"databases-storage","readme_excerpt":"memongo NOTE: This project started as a fork of benweissmann/memongo project, but rapidly evolved to its own. While we thank and credit original creator for the job so far, we are going separate ways for the time being. This is the only memongo library officially supported and maintained by Tryvium Travels LTD memongo is a Go package that spins up a real MongoDB server, backed by in-memory storage, for use in testing and mocking during development. It's based on mongodb-memory-server for NodeJS. In general, it's better to mock out interaction with the database, so you don't need to run a Mongo server during testing. But becuase most Mongo clients use a fluent interface that's tough to mock, and sometimes you need to test the queries themselves, it's often helpful to be able to spin up a Mongo server quickly and easily. That's where memongo comes in! Project Status Beta. Tests and CI are set up and working, but more esoteric configurations may not work. If Memongo isn't working on your platform, you might want to use memongo.StartWithOptions() and pass the correct download URL for your platform manually. Caveats and Notes Currently, memongo only supports UNIX systems. CI will run on MacOS, Ubuntu Xenial, Ubuntu Trusty, and Ubuntu Precise. Other flavors of Linux may or may not work. Basic Usage Spin up a server for a single test: Spin up a server, shared between tests: Spin up a replica set server: How it works Behind the scenes, when you run Start() , a few things are happenin","default_branch":null,"files":null,"tree":[],"storefront":"/r/tryvium-travels","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tryvium-travels/memongo/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}