Hacker News new | ask | show | jobs
by davidlatwe 1851 days ago
Hmmm, better not using it for unit test I think.

Had a quick look into that mongo memory server and it pull the real mongodb instance for testing so it’s solid. MontyDB in other hand is only a tiny in-completed replica (only had basic CRUD implemented, no aggregation and other fancy stuff).

Could be used for a quick demo for application that requires MongoDB, which was part of my initiative back then.

2 comments

> Could be used for a quick demo for application that requires MongoDB

If the demo or production only requires those basic operations of course. Those implemented ops are testing against to real MongoDB, so should be good enough for basic usage.

IMO unit tests can be done against any implementation, even a mock one, so using Monty would be beneficial, if it supports all you need.

However, you need to have integration tests, to ensure that such implementation behaves the same as the MongoDB version you have in the production. Such tests only need to be run when you change the implementation or upgrade production MongoDB.

Thanks, that's a shame I started a new project in python (Fastapi and mongodb) and was looking for something to fill that gap.

This still looks awesome.

Thanks !