From 4a56994673387ed1c4ea98b5566c65f01c82f10e Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Fri, 3 Sep 2021 07:44:37 +0100 Subject: [PATCH 1/2] Fix nightly --- .../Common/DockerHelper.cs | 60 +++++++++++++------ ...ansactionProcessor.IntegrationTests.csproj | 2 +- 2 files changed, 42 insertions(+), 20 deletions(-) diff --git a/TransactionProcessor.IntegrationTests/Common/DockerHelper.cs b/TransactionProcessor.IntegrationTests/Common/DockerHelper.cs index 186c65a9..9450b3a2 100644 --- a/TransactionProcessor.IntegrationTests/Common/DockerHelper.cs +++ b/TransactionProcessor.IntegrationTests/Common/DockerHelper.cs @@ -89,6 +89,8 @@ public class DockerHelper : global::Shared.IntegrationTesting.DockerHelper protected String TestHostContainerName; + protected String MessagingServiceContainerName; + /// /// The transaction processor port /// @@ -185,6 +187,7 @@ public override async Task StartContainersForScenarioRun(String scenarioName) this.TransactionProcessorContainerName = $"txnprocessor{testGuid:N}"; this.TestHostContainerName = $"testhosts{testGuid:N}"; this.VoucherManagementContainerName = $"vouchermanagement{testGuid:N}"; + this.MessagingServiceContainerName = $"messaging{testGuid:N}"; String eventStoreAddress = $"http://{this.EventStoreContainerName}"; @@ -200,6 +203,31 @@ await Retry.For(async () => await this.PopulateSubscriptionServiceConfiguration().ConfigureAwait(false); }, retryFor: TimeSpan.FromMinutes(2), retryInterval: TimeSpan.FromSeconds(30)); + //List additionalVoucherManagementVariables = new List() + // { + // $"ConnectionStrings:HealthCheck=\"server=" + Setup.SqlServerContainerName + ";user id=" + "sa" + + // ";password=" + "thisisalongpassword123!" + ";database=master\"", + // $"AppSettings:MessagingServiceApi=http://{this.MessagingServiceContainerName}:{DockerHelper.MessagingServiceDockerPort}", + // "AppSettings:UseConnectionStringConfig=false" + // }; + IContainerService voucherManagementContainer = SetupVoucherManagementContainer(this.VoucherManagementContainerName, + this.Logger, + "stuartferguson/vouchermanagement", + new List + { + testNetwork + }, + traceFolder, + dockerCredentials, + this.SecurityServiceContainerName, + this.EstateManagementContainerName, + eventStoreAddress, + (Setup.SqlServerContainerName, + "sa", + "thisisalongpassword123!"), + ("serviceClient", "Secret1"), + true); + IContainerService estateManagementContainer = DockerHelper.SetupEstateManagementContainer(this.EstateManagementContainerName, this.Logger, "stuartferguson/estatemanagement", new List { @@ -214,6 +242,16 @@ await Retry.For(async () => ("serviceClient", "Secret1"), true); + IContainerService messagingServiceContainer = DockerHelper.SetupMessagingServiceContainer(this.MessagingServiceContainerName, this.Logger, + "stuartferguson/messagingservice", new List + { + testNetwork + }, traceFolder, dockerCredentials, + this.SecurityServiceContainerName, + eventStoreAddress, + ("serviceClient", "Secret1"), + true); + IContainerService securityServiceContainer = DockerHelper.SetupSecurityServiceContainer(this.SecurityServiceContainerName, this.Logger, "stuartferguson/securityservice", @@ -221,24 +259,7 @@ await Retry.For(async () => traceFolder, dockerCredentials, true); - - IContainerService voucherManagementContainer = SetupVoucherManagementContainer(this.VoucherManagementContainerName, - this.Logger, - "stuartferguson/vouchermanagement", - new List - { - testNetwork - }, - traceFolder, - dockerCredentials, - this.SecurityServiceContainerName, - this.EstateManagementContainerName, - eventStoreAddress, - (Setup.SqlServerContainerName, - "sa", - "thisisalongpassword123!"), - ("serviceClient", "Secret1"), - true); + List additionalVariables = new List() { @@ -297,7 +318,8 @@ await Retry.For(async () => transactionProcessorContainer, estateReportingContainer, testhostContainer, - voucherManagementContainer + voucherManagementContainer, + messagingServiceContainer }); // Cache the ports diff --git a/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj b/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj index 1e40c8d4..c668dad0 100644 --- a/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj +++ b/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj @@ -17,7 +17,7 @@ - + From a03528b979f7ea0de495e3037c83d609fffbc2b3 Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Fri, 3 Sep 2021 08:17:01 +0100 Subject: [PATCH 2/2] Review comments --- .../Common/DockerHelper.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/TransactionProcessor.IntegrationTests/Common/DockerHelper.cs b/TransactionProcessor.IntegrationTests/Common/DockerHelper.cs index 9450b3a2..ceb02ef7 100644 --- a/TransactionProcessor.IntegrationTests/Common/DockerHelper.cs +++ b/TransactionProcessor.IntegrationTests/Common/DockerHelper.cs @@ -202,14 +202,7 @@ await Retry.For(async () => { await this.PopulateSubscriptionServiceConfiguration().ConfigureAwait(false); }, retryFor: TimeSpan.FromMinutes(2), retryInterval: TimeSpan.FromSeconds(30)); - - //List additionalVoucherManagementVariables = new List() - // { - // $"ConnectionStrings:HealthCheck=\"server=" + Setup.SqlServerContainerName + ";user id=" + "sa" + - // ";password=" + "thisisalongpassword123!" + ";database=master\"", - // $"AppSettings:MessagingServiceApi=http://{this.MessagingServiceContainerName}:{DockerHelper.MessagingServiceDockerPort}", - // "AppSettings:UseConnectionStringConfig=false" - // }; + IContainerService voucherManagementContainer = SetupVoucherManagementContainer(this.VoucherManagementContainerName, this.Logger, "stuartferguson/vouchermanagement",