[Enhancement] Use MongoDB Mock for Testing
Summary
At the moment, the testing code requires a live mongo database. This complicates automated testing and CI/CD quite a lot. Instead, we could switch to database mocks. See for example here:
- https://medium.com/@victor.neuret/mocking-the-official-mongo-golang-driver-5aad5b226a78
- https://liza.io/how-im-testing-mongodb-calls-in-go-for-now/
However, we probably can use testify/mock.
Why is the current feature not sufficient?
- Not really compatible with CI
- More work setting up local dev setup