I am using Sring Data Cosmos DB implementation by connecting in a Cosmos DB SQL API instance on Azure, and it works fine. But I would like one database to run my integration tests locally on Linux, whether it's the Cosmos DB database (SQL API) or not.
Initially I thought about using the Azure Cosmos DB Emulator Docker Container, however, I saw that it is not compatible with Linux. So I thought of starting an H2 memory database only for the local environment, but it still does not work because the Spring Data Cosmos DB tries to create the documentDBTemplate bean and since there is no connection with Cosmos DB it does not create the bean, I received the error below:
Field myRepository in com.microsoft.azure.sample.controller.MyController required a bean of type 'com.microsoft.azure.spring.data.documentdb.core.DocumentDbOperations' that could not be found.
- Bean method 'documentDbTemplate' not loaded because @ConditionalOnProperty (azure.documentdb.[uri,key]) did not find properties 'uri', 'key'
Has Microsoft thought of any alternative (Linux / Mac compatible) to locally run applications that uses Cosmos DB?
Is there an alternative to do that instead of creating a Windows VM running the Azure Cosmos DB Emulator Docker Container?
Would there be any way to make the H2 database work for the local environment? I am thinking to use H2 database locally and Cosmos DB SQL API in the Azure environment.