Skip to content

Commit 462479e

Browse files
Merge pull request #408 from TransactionProcessing/task/#400_fixbootstrappertest
Improve code coverage
2 parents 3fa3b11 + 05c54ea commit 462479e

126 files changed

Lines changed: 171 additions & 170 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

SecurityService.BusinessLogic/SecurityService.BusinessLogic.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
<PackageReference Include="Duende.IdentityServer" Version="6.2.0-rc.1" />
99
<PackageReference Include="Duende.IdentityServer.EntityFramework.Storage" Version="6.2.0-rc.1" />
1010
<PackageReference Include="Duende.IdentityServer.Storage" Version="6.2.0-rc.1" />
11-
<PackageReference Include="MessagingService.Client" Version="1.1.5-build9" />
11+
<PackageReference Include="MessagingService.Client" Version="2022.12.1" />
1212
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />
1313
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.0" />
1414
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="7.0.0" />
15-
<PackageReference Include="Shared" Version="1.5.1" />
15+
<PackageReference Include="Shared" Version="2022.12.2" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

SecurityService.BusinessLogic/TestMessagingServiceClient.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
namespace SecurityService.BusinessLogic;
22

33
using System;
4+
using System.Diagnostics.CodeAnalysis;
45
using System.Threading;
56
using System.Threading.Tasks;
67
using MessagingService.Client;
78
using MessagingService.DataTransferObjects;
89
using Shared.Logger;
910

11+
[ExcludeFromCodeCoverage]
1012
public class TestMessagingServiceClient : IMessagingServiceClient
1113
{
1214
public SendEmailRequest LastEmailRequest { get; private set; }

SecurityService.Client/SecurityService.Client.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="ClientProxyBase" Version="1.5.1" />
9+
<PackageReference Include="ClientProxyBase" Version="2022.12.2" />
1010
</ItemGroup>
1111

1212
<ItemGroup>

SecurityService.Database/SecurityService.Database.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net7.0</TargetFramework>
5+
<DebugType>None</DebugType>
56
</PropertyGroup>
67

78
<ItemGroup>
@@ -20,7 +21,7 @@
2021
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2122
</PackageReference>
2223
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0-alpha.1" />
23-
<PackageReference Include="Shared" Version="1.5.1" />
24+
<PackageReference Include="Shared" Version="2022.12.2" />
2425
</ItemGroup>
2526
<ItemGroup>
2627
<Folder Include="DbContexts\" />

SecurityService.IntegrationTests/SecurityService.IntegrationTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
1212

13-
<PackageReference Include="Shared.IntegrationTesting" Version="1.5.1" />
13+
<PackageReference Include="Shared.IntegrationTesting" Version="2022.12.2" />
1414
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
1515
<PackageReference Include="xunit" Version="2.4.2" />
1616
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.0" />

SecurityService.MySqlMigrations/SecurityService.MySqlMigrations.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net7.0</TargetFramework>
5+
<DebugType>None</DebugType>
56
</PropertyGroup>
67
<ItemGroup>
78
<PackageReference Include="Duende.IdentityServer.EntityFramework" Version="6.2.0-rc.1" />

SecurityService.OpenIdConnect.IntegrationTests/Common/DockerHelper.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public override async Task StartContainersForScenarioRun(String scenarioName)
8585
IContainerService securityServiceTestUIContainer = SetupSecurityServiceTestUIContainer(this.SecurityServiceTestUIContainerName,
8686
this.SecurityServiceContainerName,
8787
this.SecurityServicePort,
88-
this.TestNetworks.Last(),
88+
this.TestNetworks,
8989
("estateUIClient", "Secret1"));
9090

9191
this.SecurityServiceTestUIPort = securityServiceTestUIContainer.ToHostExposedEndpoint("5004/tcp").Port;
@@ -162,7 +162,7 @@ private static void ExecuteBashCommand(String command)
162162
private IContainerService SetupSecurityServiceTestUIContainer(String containerName,
163163
String securityServiceContainerName,
164164
Int32 securityServiceContainerPort,
165-
INetworkService networkService,
165+
List<INetworkService> networkServices,
166166
(String clientId, String clientSecret) clientDetails)
167167
{
168168
// Management API Container
@@ -174,13 +174,16 @@ private IContainerService SetupSecurityServiceTestUIContainer(String containerNa
174174
.UseImage("securityservicetestui").ExposePort(5004)
175175
.Build().Start().WaitForPort("5004/tcp", 30000);
176176

177-
networkService.Attach(securityServiceTestUIContainer, false);
177+
foreach (INetworkService networkService in networkServices) {
178+
networkService.Attach(securityServiceTestUIContainer, false);
179+
}
178180

179181
return securityServiceTestUIContainer;
180182
}
181183

182-
public override async Task<IContainerService> SetupSecurityServiceContainer(INetworkService networkService,
183-
List<String> additionalEnvironmentVariables = null) {
184+
public override async Task<IContainerService> SetupSecurityServiceContainer(List<INetworkService> networkServices,
185+
List<String> additionalEnvironmentVariables = null)
186+
{
184187
this.Trace("About to Start Security Container");
185188

186189
List<String> environmentVariables = this.GetCommonEnvironmentVariables(DockerPorts.SecurityServiceDockerPort);
@@ -204,7 +207,9 @@ public override async Task<IContainerService> SetupSecurityServiceContainer(INet
204207
// Now build and return the container
205208
IContainerService builtContainer = securityServiceContainer.Build().Start().WaitForPort($"{DockerPorts.SecurityServiceDockerPort}/tcp", 30000);
206209

207-
networkService.Attach(builtContainer, false);
210+
foreach (INetworkService networkService in networkServices) {
211+
networkService.Attach(builtContainer, false);
212+
}
208213

209214
this.Trace("Security Service Container Started");
210215
this.Containers.Add(builtContainer);
@@ -216,6 +221,7 @@ public override async Task<IContainerService> SetupSecurityServiceContainer(INet
216221
return builtContainer;
217222
}
218223

224+
219225
#endregion
220226
}
221227
}

SecurityService.OpenIdConnect.IntegrationTests/SecurityService.OpenIdConnect.IntegrationTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<PackageReference Include="Selenium.Support" Version="4.6.0" />
1616
<PackageReference Include="Selenium.WebDriver" Version="4.6.0" />
17-
<PackageReference Include="Shared.IntegrationTesting" Version="1.5.1" />
17+
<PackageReference Include="Shared.IntegrationTesting" Version="2022.12.2" />
1818
<PackageReference Include="xunit" Version="2.4.2" />
1919
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
2020
<PrivateAssets>all</PrivateAssets>

SecurityService.SqlServerMigrations/SecurityService.SqlServerMigrations.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net7.0</TargetFramework>
5+
<DebugType>None</DebugType>
56
</PropertyGroup>
67
<ItemGroup>
78
<PackageReference Include="Duende.IdentityServer.EntityFramework" Version="6.2.0-rc.1" />

SecurityService.UnitTests/SecurityService.UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net7.0</TargetFramework>
5-
<DebugType>Full</DebugType>
5+
<DebugType>None</DebugType>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

0 commit comments

Comments
 (0)