From 104c397d477d1d0ecc3f888e5324c2760bc9bb21 Mon Sep 17 00:00:00 2001 From: AndriySvyryd Date: Tue, 16 Jun 2020 09:36:05 -0700 Subject: [PATCH] Unify connection string in Cosmos tests --- .../TestUtilities/CosmosTestStore.cs | 2 +- .../TestUtilities/TestEnvironment.cs | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestStore.cs b/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestStore.cs index 27039fcc1a4..83edf819a11 100644 --- a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestStore.cs +++ b/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestStore.cs @@ -44,7 +44,7 @@ private CosmosTestStore( { ConnectionUri = TestEnvironment.DefaultConnection; AuthToken = TestEnvironment.AuthToken; - ConnectionString = TestEnvironment.ConnectionString; + ConnectionString = $"AccountEndpoint={TestEnvironment.DefaultConnection};AccountKey={TestEnvironment.AuthToken}"; _configureCosmos = extensionConfiguration == null ? (Action)(b => b.ApplyConfiguration()) : (b => diff --git a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/TestEnvironment.cs b/test/EFCore.Cosmos.FunctionalTests/TestUtilities/TestEnvironment.cs index 272f0362a46..fcf9a299d16 100644 --- a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/TestEnvironment.cs +++ b/test/EFCore.Cosmos.FunctionalTests/TestUtilities/TestEnvironment.cs @@ -25,10 +25,6 @@ public static class TestEnvironment ? "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==" : Config["AuthToken"]; - public static string ConnectionString { get; } = string.IsNullOrEmpty(Config["ConnectionString"]) - ? "AccountEndpoint=https://localhost:8081/;AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==" - : Config["ConnectionString"]; - public static bool IsEmulator { get; } = DefaultConnection.StartsWith("https://localhost:8081", StringComparison.Ordinal); } }