Let me give a little bit of background for this question. For the record, this is a question about architecture and software engineering practice and not about the specific technologies that I am using. So any DB+container experience/thoughts are welcome!
- I am developing a library that comprehensively uses Mongo DB.
- I would like to develop unit tests for said library.
- I am currently testing against a real mongo instance on a physical server.
- I have searched high and low for good mock mongo DBs that I could use for unit testing and for some reason or another they didn't meet all of my needs.
- In addition to software problems, I have had a litany of hardware-related problems (while running the unit tests) with maintaining my own Linux server running Mongo.
So here is my question... why not just spin up a Docker container with MongoDB on it? I can spin it up during the unit tests, test against the real mccoy and then shut it down...
I'd like for the answer (if possible) to hit some of these points (if applicable):
- Managing Dependencies
- Version Control