Skip to content

Commit

Permalink
Unify connection string in Cosmos tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriySvyryd committed Jun 16, 2020
1 parent 2c0a6ae commit 104c397
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<CosmosDbContextOptionsBuilder>)(b => b.ApplyConfiguration())
: (b =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 104c397

Please sign in to comment.