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
78 changes: 39 additions & 39 deletions Shared.IntegrationTesting/BaseDockerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public BaseDockerHelper() {
this.ImageDetails.Add(ContainerType.TestHost, ("stuartferguson/testhostswindows:master", true));
this.ImageDetails.Add(ContainerType.EstateManagement, ("stuartferguson/estatemanagementwindows:master", true));
this.ImageDetails.Add(ContainerType.EstateReporting, ("stuartferguson/estatereportingwindows:master", true));
this.ImageDetails.Add(ContainerType.VoucherManagement, ("stuartferguson/vouchermanagementwindows:master", true));
//this.ImageDetails.Add(ContainerType.VoucherManagement, ("stuartferguson/vouchermanagementwindows:master", true));
this.ImageDetails.Add(ContainerType.TransactionProcessor, ("stuartferguson/transactionprocessorwindows:master", true));
this.ImageDetails.Add(ContainerType.FileProcessor, ("stuartferguson/fileprocessorwindows:master", true));
this.ImageDetails.Add(ContainerType.VoucherManagementAcl, ("stuartferguson/vouchermanagementaclwindows:master", true));
Expand All @@ -154,7 +154,7 @@ public BaseDockerHelper() {
this.ImageDetails.Add(ContainerType.TestHost, ("stuartferguson/testhosts:master", true));
this.ImageDetails.Add(ContainerType.EstateManagement, ("stuartferguson/estatemanagement:master", true));
this.ImageDetails.Add(ContainerType.EstateReporting, ("stuartferguson/estatereporting:master", true));
this.ImageDetails.Add(ContainerType.VoucherManagement, ("stuartferguson/vouchermanagement:master", true));
//this.ImageDetails.Add(ContainerType.VoucherManagement, ("stuartferguson/vouchermanagement:master", true));
this.ImageDetails.Add(ContainerType.TransactionProcessor, ("stuartferguson/transactionprocessor:master", true));
this.ImageDetails.Add(ContainerType.FileProcessor, ("stuartferguson/fileprocessor:master", true));
this.ImageDetails.Add(ContainerType.VoucherManagementAcl, ("stuartferguson/vouchermanagementacl:master", true));
Expand Down Expand Up @@ -814,42 +814,42 @@ public virtual async Task<IContainerService> SetupVoucherManagementAclContainer(
return builtContainer;
}

public virtual async Task<IContainerService> SetupVoucherManagementContainer(List<INetworkService> networkServices,
Int32 securityServicePort = DockerPorts.SecurityServiceDockerPort,
List<String> additionalEnvironmentVariables = null) {
this.Trace("About to Start Voucher Management Container");

List<String> environmentVariables = this.GetCommonEnvironmentVariables(securityServicePort);
environmentVariables.Add($"urls=http://*:{DockerPorts.VoucherManagementDockerPort}");
environmentVariables
.Add($"ConnectionStrings:EstateReportingReadModel=\"server={this.SqlServerContainerName};user id={this.SqlCredentials.Value.usename};password={this.SqlCredentials.Value.password};database=EstateReportingReadModel\"");

if (additionalEnvironmentVariables != null) {
environmentVariables.AddRange(additionalEnvironmentVariables);
}

ContainerBuilder voucherManagementContainer = new Builder().UseContainer().WithName(this.VoucherManagementContainerName)
.WithEnvironment(environmentVariables.ToArray())
.UseImageDetails(this.GetImageDetails(ContainerType.VoucherManagement))
.ExposePort(DockerPorts.VoucherManagementDockerPort)
.MountHostFolder(this.HostTraceFolder)
.SetDockerCredentials(this.DockerCredentials);

// Now build and return the container
IContainerService builtContainer = voucherManagementContainer.Build().Start().WaitForPort($"{DockerPorts.VoucherManagementDockerPort}/tcp", 30000);
foreach (INetworkService networkService in networkServices)
{
networkService.Attach(builtContainer, false);
}
this.Trace("Voucher Management Container Started");
this.Containers.Add(builtContainer);

// Do a health check here
this.VoucherManagementPort = builtContainer.ToHostExposedEndpoint($"{DockerPorts.VoucherManagementDockerPort}/tcp").Port;
await this.DoHealthCheck(ContainerType.VoucherManagement);

return builtContainer;
}
//public virtual async Task<IContainerService> SetupVoucherManagementContainer(List<INetworkService> networkServices,
// Int32 securityServicePort = DockerPorts.SecurityServiceDockerPort,
// List<String> additionalEnvironmentVariables = null) {
// this.Trace("About to Start Voucher Management Container");

// List<String> environmentVariables = this.GetCommonEnvironmentVariables(securityServicePort);
// environmentVariables.Add($"urls=http://*:{DockerPorts.VoucherManagementDockerPort}");
// environmentVariables
// .Add($"ConnectionStrings:EstateReportingReadModel=\"server={this.SqlServerContainerName};user id={this.SqlCredentials.Value.usename};password={this.SqlCredentials.Value.password};database=EstateReportingReadModel\"");

// if (additionalEnvironmentVariables != null) {
// environmentVariables.AddRange(additionalEnvironmentVariables);
// }

// ContainerBuilder voucherManagementContainer = new Builder().UseContainer().WithName(this.VoucherManagementContainerName)
// .WithEnvironment(environmentVariables.ToArray())
// .UseImageDetails(this.GetImageDetails(ContainerType.VoucherManagement))
// .ExposePort(DockerPorts.VoucherManagementDockerPort)
// .MountHostFolder(this.HostTraceFolder)
// .SetDockerCredentials(this.DockerCredentials);

// // Now build and return the container
// IContainerService builtContainer = voucherManagementContainer.Build().Start().WaitForPort($"{DockerPorts.VoucherManagementDockerPort}/tcp", 30000);
// foreach (INetworkService networkService in networkServices)
// {
// networkService.Attach(builtContainer, false);
// }
// this.Trace("Voucher Management Container Started");
// this.Containers.Add(builtContainer);

// // Do a health check here
// this.VoucherManagementPort = builtContainer.ToHostExposedEndpoint($"{DockerPorts.VoucherManagementDockerPort}/tcp").Port;
// await this.DoHealthCheck(ContainerType.VoucherManagement);

// return builtContainer;
//}

public abstract Task StartContainersForScenarioRun(String scenarioName);

Expand Down Expand Up @@ -896,7 +896,7 @@ protected async Task DoHealthCheck(ContainerType containerType) {
ContainerType.TestHost => ("http", this.TestHostServicePort),
ContainerType.TransactionProcessor => ("http", this.TransactionProcessorPort),
ContainerType.SecurityService => ("https", this.SecurityServicePort),
ContainerType.VoucherManagement => ("http", this.VoucherManagementPort),
//ContainerType.VoucherManagement => ("http", this.VoucherManagementPort),
ContainerType.VoucherManagementAcl => ("http", this.VoucherManagementAclPort),
ContainerType.TransactionProcessorAcl => ("http", this.TransactionProcessorAclPort),
_ => (null, 0)
Expand Down
2 changes: 1 addition & 1 deletion Shared.IntegrationTesting/ContainerType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public enum ContainerType
TestHost,
EstateManagement,
EstateReporting,
VoucherManagement,
//VoucherManagement,
TransactionProcessor,
FileProcessor,
VoucherManagementAcl,
Expand Down
14 changes: 7 additions & 7 deletions Shared.IntegrationTesting/DockerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ await this.SetupEstateReportingContainer(new List<INetworkService> {
this.SqlServerNetwork
});

await this.SetupVoucherManagementContainer(new List<INetworkService> {
testNetwork,
this.SqlServerNetwork
});
//await this.SetupVoucherManagementContainer(new List<INetworkService> {
// testNetwork,
// this.SqlServerNetwork
// });

await this.SetupTransactionProcessorContainer(new List<INetworkService> {
testNetwork,
Expand All @@ -119,9 +119,9 @@ await this.SetupFileProcessorContainer(new List<INetworkService> {
this.SqlServerNetwork
});

await this.SetupVoucherManagementAclContainer(new List<INetworkService> {
testNetwork,
});
//await this.SetupVoucherManagementAclContainer(new List<INetworkService> {
// testNetwork,
// });

await this.SetupTransactionProcessorAclContainer(testNetwork);

Expand Down