Implementing MongoDB Test Fixtures in Go

Introduction At some point in the recent past; I needed to port the integration tests of a Go service using PostgreSQL to MongoDB. I was surprised by the lack of resources for loading test fixtures, so I decided to document my approach here. For PostgreSQL, we use go-testfixtures to describe our test data as .yml files, which (naturally) does not support MongoDB. I wanted a similar approach for…