Skip to content

Commit df7236f

Browse files
try fix failing tests
1 parent 51d03e9 commit df7236f

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

SecurityService.OpenIdConnect.IntegrationTests/Common/DockerHelper.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Runtime.InteropServices;
22
using DotNet.Testcontainers.Builders;
3+
using DotNet.Testcontainers.Configurations;
34
using DotNet.Testcontainers.Containers;
45
using DotNet.Testcontainers.Networks;
56
using Shared.IntegrationTesting.TestContainers;
@@ -84,7 +85,7 @@ public override async Task CreateSubscriptions(){
8485
/// <param name="scenarioName">Name of the scenario.</param>
8586
public override async Task StartContainersForScenarioRun(String scenarioName, DockerServices dockerServices)
8687
{
87-
this.Trace($"Test Id is {this.TestId} and Scenrio {scenarioName}");
88+
this.Trace($"Test Id is {this.TestId} and Scenario {scenarioName}");
8889

8990
await base.StartContainersForScenarioRun(scenarioName,dockerServices);
9091

@@ -94,11 +95,6 @@ public override async Task StartContainersForScenarioRun(String scenarioName, Do
9495

9596
this.SecurityServiceClient = new SecurityServiceClient(securityServiceBaseAddressResolver, httpClient);
9697

97-
//this.Containers.AddRange(new List<IContainerService>
98-
// {
99-
// securityServiceTestUIContainer
100-
// });
101-
10298
DockerHelper.AddEntryToHostsFile("127.0.0.1", SecurityServiceContainerName);
10399
DockerHelper.AddEntryToHostsFile("localhost", SecurityServiceContainerName);
104100
}
@@ -138,6 +134,10 @@ protected async Task StartContainer(Func<ContainerBuilder> buildContainerFunc, L
138134

139135
this.SecurityServiceTestUIPort = builtContainer.GetMappedPublicPort(5004);
140136

137+
this.Containers.AddRange(new List<(DockerServices, IContainer)> {
138+
(DockerServices.None,builtContainer)
139+
});
140+
141141
await this.DoTestUIHealthCheck();
142142
}
143143
catch (Exception ex)
@@ -203,15 +203,15 @@ private ContainerBuilder SetupSecurityServiceTestUIContainer(){
203203
environmentVariables.Add($"AppSettings:Authority",$"https://identity-server:{this.SecurityServicePort}");
204204
environmentVariables.Add($"AppSettings:ClientId",clientDetails.Item1);
205205
environmentVariables.Add($"AppSettings:ClientSecret",clientDetails.Item2);
206-
environmentVariables.Add("urls","https://*:5004");
206+
//environmentVariables.Add("urls","https://*:5004");
207207
environmentVariables.Add("Logging:LogLevel:Microsoft","Information");
208208
environmentVariables.Add("Logging:LogLevel:Default","Information");
209209
environmentVariables.Add("Logging:EventLog:LogLevel:Default","None");
210210

211211

212212

213213
ContainerBuilder securityServiceTestUIContainer = new ContainerBuilder().WithName(this.SecurityServiceTestUIContainerName)
214-
.WithEnvironment(environmentVariables).WithImage("securityservicetestui").WithPortBinding(5004);
214+
.WithEnvironment(environmentVariables).WithImage("securityservicetestui").WithPortBinding(5004, true);
215215

216216
return securityServiceTestUIContainer;
217217
}

SecurityService.OpenIdConnect.IntegrationTests/Common/GenericSteps.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public async Task StartSystem()
5858

5959
[AfterScenario]
6060
public async Task StopSystem(){
61-
DockerServices sharedDockerServices = DockerServices.SqlServer;
61+
DockerServices sharedDockerServices = DockerServices.None;
6262
this.TestingContext.DockerHelper.Logger.LogInformation("About to Stop Containers for Scenario Run");
6363
await this.TestingContext.DockerHelper.StopContainersForScenarioRun(sharedDockerServices).ConfigureAwait(false);
6464
this.TestingContext.DockerHelper.Logger.LogInformation("Containers for Scenario Run Stopped");

0 commit comments

Comments
 (0)