Skip to content

Commit 2af2d69

Browse files
authored
Add cosmos db emulator module (#934)
1 parent 0890956 commit 2af2d69

File tree

10 files changed

+469
-697
lines changed

10 files changed

+469
-697
lines changed

docs/modules/cosmosdb.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Cosmos DB Emulator Module (Linux-based)
2+
3+
[Azure Cosmos DB](https://azure.microsoft.com/en-GB/products/cosmos-db) is a globally distributed, multi-model database service provided by Microsoft.
4+
5+
## Install
6+
7+
```bash
8+
npm install @testcontainers/azurecosmosdb --save-dev
9+
```
10+
11+
## Examples
12+
<!--codeinclude-->
13+
[Connect to emulator and create a database:](../../packages/modules/azurecosmosdb/src/azure-cosmosdb-emulator-container.test.ts) inside_block:httpCreateDB
14+
<!--/codeinclude-->
15+
16+
<!--codeinclude-->
17+
[Using HTTPS:](../../packages/modules/azurecosmosdb/src/azure-cosmosdb-emulator-container.test.ts) inside_block:httpsCreateDB
18+
<!--/codeinclude-->
19+
20+
<!--codeinclude-->
21+
[Create and read items:](../../packages/modules/azurecosmosdb/src/azure-cosmosdb-emulator-container.test.ts) inside_block:createAndRead
22+
<!--/codeinclude-->
23+
24+
## Caveats
25+
### Compatibility
26+
This testcontainer uses the [linux-based](https://learn.microsoft.com/en-us/azure/cosmos-db/emulator-linux) version. In general, it:
27+
28+
- Provides better compatibility on a variety of systems
29+
- Consumes significantly less resources
30+
- Comes with much faster startup times
31+
32+
However, not all features of a full CosmosDB are implemented yet - please refer to [this overview](https://learn.microsoft.com/en-us/azure/cosmos-db/emulator-linux#feature-support) for a detailed list.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ nav:
4646
- Azurite: modules/azurite.md
4747
- Cassandra: modules/cassandra.md
4848
- ChromaDB: modules/chromadb.md
49+
- CosmosDB: modules/cosmosdb.md
4950
- Couchbase: modules/couchbase.md
5051
- CockroachDB: modules/cockroachdb.md
5152
- Elasticsearch: modules/elasticsearch.md

0 commit comments

Comments
 (0)