Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Shared.EventStoreContext.Tests/EventStoreDockerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
await this.StartContainersForScenarioRun(testName, DockerServices.EventStore);
}

public override async Task StopContainersForScenarioRun(DockerServices sharedDockerServices)

Check warning on line 28 in Shared.EventStoreContext.Tests/EventStoreDockerHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests - Windows

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
if (this.Containers.Any())
{
Expand All @@ -50,7 +50,7 @@
}
}

public override async Task CreateSubscriptions(){

Check warning on line 53 in Shared.EventStoreContext.Tests/EventStoreDockerHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests - Windows

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
// Nothing actually needed here
}

Expand Down Expand Up @@ -93,12 +93,12 @@

}

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);
Expand Down
6 changes: 3 additions & 3 deletions Shared.IntegrationTesting/BaseDockerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -808,9 +808,9 @@
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"){

Check warning on line 812 in Shared.IntegrationTesting/BaseDockerHelper.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Shared.IntegrationTesting/BaseDockerHelper.cs#L812

Use the overloading mechanism instead of the optional parameters.
String eventStoreAddress = $"esdb://{userName}:{password}@{this.EventStoreContainerName}:{DockerPorts.EventStoreHttpDockerPort}?tls=false";

return eventStoreAddress;
}
Expand Down Expand Up @@ -854,7 +854,7 @@
try{
await projectionClient.CreateContinuousAsync(projectionName, projection, trackEmittedStreams:true).ConfigureAwait(false);
}
catch(Exception ex){

Check warning on line 857 in Shared.IntegrationTesting/BaseDockerHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests - Windows

The variable 'ex' is declared but never used
}

projectionNames.Add(projectionName);
Expand Down
Loading