diff --git a/Shared.EventStoreContext.Tests/EventStoreDockerHelper.cs b/Shared.EventStoreContext.Tests/EventStoreDockerHelper.cs index c676005..16d2671 100644 --- a/Shared.EventStoreContext.Tests/EventStoreDockerHelper.cs +++ b/Shared.EventStoreContext.Tests/EventStoreDockerHelper.cs @@ -93,12 +93,12 @@ await this.StartContainer2(SetupInsecureEventStoreContainerLocal, } - public EventStoreClientSettings CreateEventStoreClientSettings(Boolean secureEventStore, TimeSpan? deadline = null) + public EventStoreClientSettings CreateEventStoreClientSettings(Boolean secureEventStore, TimeSpan? deadline = null, String userName="admin", String password="changeit") { String connectionString = secureEventStore switch { - true => $"esdb://admin:changeit@127.0.0.1:{this.EventStoreSecureHttpPort}?tls=true&tlsVerifyCert=false", - _ => $"esdb://admin:changeit@127.0.0.1:{this.EventStoreHttpPort}?tls=false" + true => $"esdb://{userName}:{password}@127.0.0.1:{this.EventStoreSecureHttpPort}?tls=true&tlsVerifyCert=false", + _ => $"esdb://{userName}:{password}@127.0.0.1:{this.EventStoreHttpPort}?tls=false" }; EventStoreClientSettings settings = EventStoreClientSettings.Create(connectionString); diff --git a/Shared.IntegrationTesting/BaseDockerHelper.cs b/Shared.IntegrationTesting/BaseDockerHelper.cs index a875b93..cd35b46 100644 --- a/Shared.IntegrationTesting/BaseDockerHelper.cs +++ b/Shared.IntegrationTesting/BaseDockerHelper.cs @@ -808,9 +808,9 @@ protected void Error(String message, Exception ex){ this.Logger.LogError($"{this.TestId}|{message}", ex); } } - - protected virtual String GenerateEventStoreConnectionString(){ - String eventStoreAddress = $"esdb://admin:changeit@{this.EventStoreContainerName}:{DockerPorts.EventStoreHttpDockerPort}?tls=false"; + + protected virtual String GenerateEventStoreConnectionString(String userName = "admin", String password = "changeit"){ + String eventStoreAddress = $"esdb://{userName}:{password}@{this.EventStoreContainerName}:{DockerPorts.EventStoreHttpDockerPort}?tls=false"; return eventStoreAddress; }