- поправил строку подключения.

- .net 6.0 => .net 5.0
parent 2e424701
...@@ -10,7 +10,7 @@ namespace PhoneStore.Tests.Helpers ...@@ -10,7 +10,7 @@ namespace PhoneStore.Tests.Helpers
public static class Utilities public static class Utilities
{ {
private const string ConnectionString = private const string ConnectionString =
"Server=localhost;Port=54320;database=testDb;Username=postgres;Password=postgres;"; "Server=localhost;Port=5432;database=testDb;Username=postgres;Password=postgres;";
public static WebApplicationFactory<Startup> SubstituteDbOnTestDb() public static WebApplicationFactory<Startup> SubstituteDbOnTestDb()
{ {
return new WebApplicationFactory<Startup>().WithWebHostBuilder(builder => return new WebApplicationFactory<Startup>().WithWebHostBuilder(builder =>
......
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>
......
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
......
{ {
"ConnectionStrings": { "ConnectionStrings": {
"DefaultConnection": "Server=localhost;Port=54320;database=lesson68;Username=postgres;Password=postgres;" "DefaultConnection": "Server=localhost;Port=5432;database=testDb;Username=postgres;Password=postgres;"
}, },
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment