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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="Moq" Version="4.16.0" />
<PackageReference Include="Shared.EventStore" Version="1.0.5" />
<PackageReference Include="Shared.EventStore" Version="1.0.12" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SecurityService.Client" Version="1.0.5.1" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.5" />
<PackageReference Include="SecurityService.Client" Version="1.0.7" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.12" />
<PackageReference Include="MediatR" Version="9.0.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion EstateManagement.Client/EstateManagement.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClientProxyBase" Version="1.0.5" />
<PackageReference Include="ClientProxyBase" Version="1.0.12" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.5" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.12" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.5" />
<PackageReference Include="Shared.EventStore" Version="1.0.5" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.12" />
<PackageReference Include="Shared.EventStore" Version="1.0.12" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.5" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.12" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="Shared.EventStore" Version="1.0.5" />
<PackageReference Include="Shared.EventStore" Version="1.0.12" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.5" />
<PackageReference Include="Shared.EventStore" Version="1.0.5" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.12" />
<PackageReference Include="Shared.EventStore" Version="1.0.12" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClientProxyBase" Version="1.0.5" />
<PackageReference Include="ClientProxyBase" Version="1.0.12" />
<PackageReference Include="Ductus.FluentDocker" Version="2.10.7" />
<PackageReference Include="EstateReporting.Database" Version="1.0.12" />
<PackageReference Include="EstateReporting.Database" Version="1.0.15" />
<PackageReference Include="EventStore.Client.Grpc.PersistentSubscriptions" Version="20.10.0" />
<PackageReference Include="EventStore.Client.Grpc.ProjectionManagement" Version="20.10.0" />
<PackageReference Include="Grpc.Net.Client" Version="2.35.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="NLog" Version="4.7.6" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.0" />
<PackageReference Include="SecurityService.Client" Version="1.0.5.1" />
<PackageReference Include="Shared" Version="1.0.7" />
<PackageReference Include="Shared.IntegrationTesting" Version="1.0.7" />
<PackageReference Include="SecurityService.Client" Version="1.0.7" />
<PackageReference Include="Shared" Version="1.0.12" />
<PackageReference Include="Shared.IntegrationTesting" Version="1.0.12" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="SpecFlow" Version="3.5.14" />
<PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.5.14" />
Expand Down
18 changes: 13 additions & 5 deletions EstateManagement.IntegrationTests/Shared/SharedSteps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -410,12 +410,20 @@ public async Task ThenTheMerchantBalancesAreAsFollows(Table table)
Decimal availableBalance = SpecflowTableHelper.GetDecimalValue(tableRow, "AvailableBalance");
Decimal balance = SpecflowTableHelper.GetDecimalValue(tableRow, "Balance");

MerchantBalanceResponse merchantBalanceResponse = await this.TestingContext.DockerHelper.EstateClient.GetMerchantBalance(token, estateDetails.EstateId, merchantId, CancellationToken.None).ConfigureAwait(false);
await Retry.For(async () =>
{
MerchantBalanceResponse merchantBalanceResponse = await this.TestingContext.DockerHelper.EstateClient
.GetMerchantBalance(token,
estateDetails.EstateId,
merchantId,
CancellationToken.None).ConfigureAwait(false);

merchantBalanceResponse.EstateId.ShouldBe(estateDetails.EstateId);
merchantBalanceResponse.MerchantId.ShouldBe(merchantId);
merchantBalanceResponse.AvailableBalance.ShouldBe(availableBalance);
merchantBalanceResponse.Balance.ShouldBe(balance);
});

merchantBalanceResponse.EstateId.ShouldBe(estateDetails.EstateId);
merchantBalanceResponse.MerchantId.ShouldBe(merchantId);
merchantBalanceResponse.AvailableBalance.ShouldBe(availableBalance);
merchantBalanceResponse.Balance.ShouldBe(balance);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.5" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.12" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.EventStore" Version="1.0.5" />
<PackageReference Include="Shared.EventStore" Version="1.0.12" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion EstateManagement.Models/EstateManagement.Models.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="EstateReporting.Database" Version="1.0.12" />
<PackageReference Include="EstateReporting.Database" Version="1.0.15" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="EstateReporting.Database" Version="1.0.12" />
<PackageReference Include="EstateReporting.Database" Version="1.0.15" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion EstateManagement.Testing/EstateManagement.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="EstateReporting.Database" Version="1.0.12" />
<PackageReference Include="EstateReporting.Database" Version="1.0.15" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion EstateManagement/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
FROM stuartferguson/txnprocbase AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build
Expand Down
2 changes: 1 addition & 1 deletion EstateManagement/Dockerfilewindows
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0-windowsservercore-ltsc2019 AS base
FROM stuartferguson/txnprocbasewindows AS base
USER ContainerAdministrator
WORKDIR /app

Expand Down
11 changes: 10 additions & 1 deletion EstateManagement/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ public class Startup
public Startup(IWebHostEnvironment webHostEnvironment)
{
IConfigurationBuilder builder = new ConfigurationBuilder().SetBasePath(webHostEnvironment.ContentRootPath)
.AddJsonFile("/home/txnproc/config/appsettings.json", true, true)
.AddJsonFile($"/home/txnproc/config/appsettings.{webHostEnvironment.EnvironmentName}.json", optional: true)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{webHostEnvironment.EnvironmentName}.json", optional: true).AddEnvironmentVariables();
.AddJsonFile($"appsettings.{webHostEnvironment.EnvironmentName}.json", optional: true, reloadOnChange: true)
.AddEnvironmentVariables();

Startup.Configuration = builder.Build();
Startup.WebHostEnvironment = webHostEnvironment;
Expand Down Expand Up @@ -362,6 +365,12 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerF

Logger.Initialise(logger);

Action<String> loggerAction = message =>
{
Logger.LogInformation(message);
};
Startup.Configuration.LogConfiguration(loggerAction);

ConfigurationReader.Initialise(Startup.Configuration);

app.AddRequestLogging();
Expand Down
45 changes: 2 additions & 43 deletions EstateManagement/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,5 @@
{
"Logging": {
"LogLevel": {
"Default": "Trace",
"Microsoft": "Trace",
"Microsoft.Hosting.Lifetime": "Trace"
}
},
"EventStoreSettings": {
"ConnectionString": "https://192.168.1.133:2113",
"ConnectionName": "Estate Management",
"UserName": "admin",
"Password": "changeit",
"START_PROJECTIONS": false,
"ContinuousProjectionsFolder": ""
},
"ConnectionStrings": {
"ConnectionStringConfiguration": "server=192.168.1.133;database=ConnectionStringConfiguration;user id=sa;password=Sc0tland",
"EstateReportingReadModel": "server=192.168.1.133;user id=sa;password=Sc0tland;database=EstateReportingReadModel",
"HealthCheck": "server=192.168.1.133;user id=sa;password=Sc0tland;database=master"
},
"AppSettings": {
"HandlerEventTypesToSilentlyHandle": {
},
"UseConnectionStringConfig": false,
"SecurityService": "https://192.168.1.133:5001"
},
"SecurityConfiguration": {
"ApiName": "estateManagement",
"Authority": "https://192.168.1.133:5001"
},
"AllowedHosts": "*",
//"HealthChecksUI": {
// "HealthChecks": [
// {
// "Name": "Http and UI on single project",
// "Uri": "http://localhost:5000/health",


// }
// ],
// "Webhooks": [],
// "EvaluationTimeinSeconds": 10,
// "MinimumSecondsBetweenFailureNotifications": 60
//}
"ApiName": "estateManagement"
}
}