11using System . Runtime . InteropServices ;
22using DotNet . Testcontainers . Builders ;
3+ using DotNet . Testcontainers . Configurations ;
34using DotNet . Testcontainers . Containers ;
45using DotNet . Testcontainers . Networks ;
56using 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 }
0 commit comments