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
2 changes: 1 addition & 1 deletion MessagingService.Client/MessagingService.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClientProxyBase" Version="1.0.3.1" />
<PackageReference Include="ClientProxyBase" Version="1.0.3.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="Shared.EventStore" Version="1.0.3.1" />
<PackageReference Include="Shared.EventStore" Version="1.0.3.3" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared" Version="1.0.3.1" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.3.1" />
<PackageReference Include="Shared" Version="1.0.3.3" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.3.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared" Version="1.0.3.1" />
<PackageReference Include="Shared.EventStore" Version="1.0.3.1" />
<PackageReference Include="Shared" Version="1.0.3.3" />
<PackageReference Include="Shared.EventStore" Version="1.0.3.3" />
</ItemGroup>

<ItemGroup>
Expand Down
46 changes: 4 additions & 42 deletions MessagingService.IntegrationTests/Common/DockerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,14 @@ public override async Task StartContainersForScenarioRun(String scenarioName)
this.EventStoreContainerName = $"eventstore{testGuid:N}";
this.MessagingServiceContainerName = $"messagingservice{testGuid:N}";

String eventStoreAddress = $"http://{this.EventStoreContainerName}";

(String, String, String) dockerCredentials = ("https://www.docker.com", "stuartferguson", "Sc0tland");

INetworkService testNetwork = DockerHelper.SetupTestNetwork();
this.TestNetworks.Add(testNetwork);
IContainerService eventStoreContainer =
DockerHelper.SetupEventStoreContainer(this.EventStoreContainerName, this.Logger, "eventstore/eventstore:20.6.0-buster-slim", testNetwork, traceFolder, usesEventStore2006OrLater:true);
DockerHelper.SetupEventStoreContainer(this.EventStoreContainerName, this.Logger, "eventstore/eventstore:20.10.0-buster-slim", testNetwork, traceFolder, true);

IContainerService securityServiceContainer = DockerHelper.SetupSecurityServiceContainer(this.SecurityServiceContainerName,
this.Logger,
Expand All @@ -153,7 +155,7 @@ public override async Task StartContainersForScenarioRun(String scenarioName)
traceFolder,
dockerCredentials,
this.SecurityServiceContainerName,
this.EventStoreContainerName,
eventStoreAddress,
("serviceClient", "Secret1"));

this.Containers.AddRange(new List<IContainerService>
Expand Down Expand Up @@ -202,46 +204,6 @@ public override async Task StopContainersForScenarioRun()
}
}

public const int MessagingServiceDockerPort = 5006;
public static IContainerService SetupMessagingServiceContainer(String containerName,
ILogger logger,
String imageName,
List<INetworkService> networkServices,
String hostFolder,
(String URL, String UserName, String Password)? dockerCredentials,
String securityServiceContainerName,
String eventStoreContainerName,
(String clientId, String clientSecret) clientDetails,
Boolean forceLatestImage = false,
Int32 securityServicePort = DockerHelper.SecurityServiceDockerPort)
{
logger.LogInformation("About to Start Messaging Service Container");

List<String> environmentVariables = new List<String>();
environmentVariables.Add($"EventStoreSettings:ConnectionString=https://{eventStoreContainerName}:{DockerHelper.EventStoreHttpDockerPort}");
environmentVariables.Add($"AppSettings:SecurityService=http://{securityServiceContainerName}:{securityServicePort}");
environmentVariables.Add($"SecurityConfiguration:Authority=http://{securityServiceContainerName}:{securityServicePort}");
environmentVariables.Add($"urls=http://*:{DockerHelper.MessagingServiceDockerPort}");
environmentVariables.Add("AppSettings:EmailProxy=Integration");
environmentVariables.Add("AppSettings:SMSProxy=Integration");

ContainerBuilder messagingServiceContainer = new Builder().UseContainer().WithName(containerName).WithEnvironment(environmentVariables.ToArray())
.UseImage(imageName, forceLatestImage).ExposePort(DockerHelper.MessagingServiceDockerPort)
.UseNetwork(networkServices.ToArray()).Mount(hostFolder, "/home", MountType.ReadWrite);

if (dockerCredentials.HasValue)
{
messagingServiceContainer.WithCredential(dockerCredentials.Value.URL, dockerCredentials.Value.UserName, dockerCredentials.Value.Password);
}

// Now build and return the container
IContainerService builtContainer = messagingServiceContainer.Build().Start().WaitForPort($"{DockerHelper.MessagingServiceDockerPort}/tcp", 30000);

logger.LogInformation("Messaging Service Container Started");

return builtContainer;
}

#endregion
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClientProxyBase" Version="1.0.3.1" />
<PackageReference Include="ClientProxyBase" Version="1.0.3.3" />
<PackageReference Include="Ductus.FluentDocker" Version="2.7.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="SecurityService.Client" Version="1.0.5" />
<PackageReference Include="Shared.IntegrationTesting" Version="1.0.3.1" />
<PackageReference Include="Shared.IntegrationTesting" Version="1.0.3.3" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.5.14" />
<PackageReference Include="SpecFlow.xUnit" Version="3.5.14" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.3.1" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.3.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.EventStore" Version="1.0.3.1" />
<PackageReference Include="Shared.EventStore" Version="1.0.3.3" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion MessagingService/MessagingService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.2" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" />
<PackageReference Include="Shared" Version="1.0.3.1" />
<PackageReference Include="Shared" Version="1.0.3.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="4.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="4.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
Expand Down