I have found some old blog posts teaching how to mock, but at the time the driver was at v1, and v2 is no longer compatible with the mtest package, implemented on v1, now I can’t find a way to mock the database, anyone know what to do?
Skip to main content
Hi @Fabio_Nacarelli, we usually advise against mocking databases. Instead, it’s better to use a container-based integration testing framework like testcontainers. However, if you need to use a mock deployment, version 2 provides a MockDeployment option in the experimental API. Note that experimental API may be modified or removed without notice.
New & Unread Topics
Topic | Replies | Views | Activity |
---|---|---|---|
How to work with Kotlin Sealed Classes + Kotlinx Serialization + MongoDB Kotlin driver? | 0 | 773 | Apr 2024 |
Enable MongoDB with PGO, build with gcc and clang | 0 | 510 | Apr 2024 |
CPU load average spikes observed every 20 minutes with a consistent read & write workload | 0 | 238 | Aug 2024 |
Entity Framework Role Manager error | 5 | 426 | Aug 2024 |
After chaging bindIp from 0.0.0.0 to 185.121.228.66 MondoDb won’t start | 1 | 25 | Dec 2024 |