Skip to content

Commit 72c0c09

Browse files
committed
PostgreSQL connection strings: remove default port, add error details
1 parent 05e9037 commit 72c0c09

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

src/Examples/DatabasePerTenantExample/appsettings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"Data": {
3-
"DefaultConnection": "Host=localhost;Port=5432;Database=DefaultTenantDb;User ID=postgres;Password=###",
4-
"AdventureWorksConnection": "Host=localhost;Port=5432;Database=AdventureWorks;User ID=postgres;Password=###",
5-
"ContosoConnection": "Host=localhost;Port=5432;Database=Contoso;User ID=postgres;Password=###"
3+
"DefaultConnection": "Host=localhost;Database=DefaultTenantDb;User ID=postgres;Password=###;Include Error Detail=true",
4+
"AdventureWorksConnection": "Host=localhost;Database=AdventureWorks;User ID=postgres;Password=###;Include Error Detail=true",
5+
"ContosoConnection": "Host=localhost;Database=Contoso;User ID=postgres;Password=###;Include Error Detail=true"
66
},
77
"Logging": {
88
"LogLevel": {

src/Examples/JsonApiDotNetCoreExample/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Data": {
3-
"DefaultConnection": "Host=localhost;Port=5432;Database=JsonApiDotNetCoreExample;User ID=postgres;Password=###"
3+
"DefaultConnection": "Host=localhost;Database=JsonApiDotNetCoreExample;User ID=postgres;Password=###;Include Error Detail=true"
44
},
55
"Logging": {
66
"LogLevel": {

src/Examples/NoEntityFrameworkExample/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Data": {
3-
"DefaultConnection": "Host=localhost;Port=5432;Database=NoEntityFrameworkExample;User ID=postgres;Password=###"
3+
"DefaultConnection": "Host=localhost;Database=NoEntityFrameworkExample;User ID=postgres;Password=###;Include Error Detail=true"
44
},
55
"Logging": {
66
"LogLevel": {

test/JsonApiDotNetCoreTests/IntegrationTests/AtomicOperations/Transactions/AtomicTransactionConsistencyTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ public AtomicTransactionConsistencyTests(IntegrationTestContext<TestableStartup<
2828
services.AddResourceRepository<LyricRepository>();
2929

3030
string postgresPassword = Environment.GetEnvironmentVariable("PGPASSWORD") ?? "postgres";
31-
string dbConnectionString = $"Host=localhost;Port=5432;Database=JsonApiTest-Extra-{Guid.NewGuid():N};User ID=postgres;Password={postgresPassword}";
31+
32+
string dbConnectionString =
33+
$"Host=localhost;Database=JsonApiTest-Extra-{Guid.NewGuid():N};User ID=postgres;Password={postgresPassword};Include Error Detail=true";
3234

3335
services.AddDbContext<ExtraDbContext>(options => options.UseNpgsql(dbConnectionString));
3436
});

test/TestBuildingBlocks/IntegrationTestContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ private WebApplicationFactory<TStartup> CreateFactory()
6565
{
6666
string postgresPassword = Environment.GetEnvironmentVariable("PGPASSWORD") ?? "postgres";
6767

68-
string dbConnectionString = $"Host=localhost;Port=5432;Database=JsonApiTest-{Guid.NewGuid():N};User ID=postgres;" +
69-
$"Password={postgresPassword};Include Error Detail=true";
68+
string dbConnectionString =
69+
$"Host=localhost;Database=JsonApiTest-{Guid.NewGuid():N};User ID=postgres;Password={postgresPassword};Include Error Detail=true";
7070

7171
var factory = new IntegrationTestWebApplicationFactory();
7272

0 commit comments

Comments
 (0)