kaizendorks / pymongo_inmemory

A mongo mocking library with an ephemeral MongoDB running in memory.
MIT License
40 stars 13 forks source link

Fixed default fallback for storage engine for mongo versions > 6. #119

Open davidwaroquiers opened 1 month ago

davidwaroquiers commented 1 month ago

Hello!

Thanks a lot for this nice package!

I stumbled across an issue with mongo versions > 6 (actually already raised in #97). The reason is that the "ephemeralForTest" storage engine has been removed in mongo version 7 onwards.

This pull requests solves this by having a different fallback for mongo versions up to 6 ("ephemeralForTest") and mongo versions larger than 6 ("wiredTiger").