Closed bunyk closed 6 years ago
Hi @bunyk, Percona maintains a set of interfaces to do what you describe here: https://github.com/percona/pmgo.
I believe we only support gopkg.in/mgo.v2 but we hope to add/move to using globalsign/mgo in the future, any help is appreciated
Hi @bunyk,
I assume this issue is now resolved thanks to @timvaillancourt's suggestion. I'll close it, but feel free to reopen if there are any further questions.
Thanks, Esther
I have similar issue similar to this: https://github.com/stretchr/testify/issues/418
I have a function that receives collection and calls
Find()
, so I write following interface for its' parameters:How I could now construct
*mgo.Query
in unittests in such a way thatquery.Iter()
gives me iterator with the query results I want?Or should I write wrapper package for accessing my db, and mock it like advised here: https://stackoverflow.com/questions/46244007/mocking-mgo-chaining-functions ?