dolittle-obsolete / DotNET.Fundamentals

Reusable, fundamental abstractions and building blocks
http://www.dolittle.io
MIT License
4 stars 8 forks source link

Testing against MongoDB #179

Closed smithmx closed 5 years ago

smithmx commented 5 years ago

If we are going to test queries, this should be done against a MongoDB instance (an integration test, not a mocked out interface).

We need a helper to handle instantiating the mongo instance and tearing it down (also in loading test data).

There's a basic implementation in the specs for Runtime.Events.MongoDB that uses Mongo2Go. This is too manual and (while working locally on all configs) hangs on the CI server.

We need a base MSpec spec that handles the mongo stuff. This might be on a per spec basis of a per assembly basis (using IAssemblyContext).

┆Issue is synchronized with this Asana task

smithmx commented 5 years ago

An example of setting up mongodb to use the in-memory version (ephemeralForTest storage engine)

http://thomasb.fr/tag/mongodb/