Skip to content

Commit ad097ac

Browse files
author
Oleksii Sokol
committed
test
1 parent 14e599a commit ad097ac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ManagedCode.Database.Tests/TestContainers/CosmosTestContainer.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public CosmosTestContainer()
4242
.WithPortBinding(10252, 10252)
4343
.WithPortBinding(10253, 10253)
4444
.WithPortBinding(10254, 10254)
45-
.WithEnvironment("AZURE_COSMOS_EMULATOR_PARTITION_COUNT", "6")
45+
.WithPortBinding(8081, 8081)
46+
.WithEnvironment("AZURE_COSMOS_EMULATOR_PARTITION_COUNT", "1")
4647
.WithEnvironment("AZURE_COSMOS_EMULATOR_IP_ADDRESS_OVERRIDE", "127.0.0.1")
4748
.WithEnvironment("AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE", "false")
4849
.WithCleanUp(false)
@@ -104,7 +105,7 @@ public async Task InitializeAsync()
104105
_database = new CosmosDatabase(new CosmosOptions
105106
{
106107
ConnectionString =
107-
$"AccountEndpoint=https://localhost:8081;AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==",
108+
$"AccountEndpoint=https://localhost:{publicPort}/;AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==",
108109
DatabaseName = "database",
109110
CollectionName = $"testContainer",
110111
AllowTableCreation = true,

0 commit comments

Comments
 (0)