We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e84685 commit ff4c41dCopy full SHA for ff4c41d
test/TestBuildingBlocks/IntegrationTestContext.cs
@@ -64,6 +64,15 @@ protected override HttpClient CreateClient()
64
65
private WebApplicationFactory<TStartup> CreateFactory()
66
{
67
+ var password = Environment.GetEnvironmentVariable("PGPASSWORD");
68
+
69
+ if (password != null)
70
+ {
71
+ throw password == string.Empty
72
+ ? new InvalidOperationException("PGPASSWORD value is empty string.")
73
+ : new InvalidOperationException($"PGPASSWORD = '{password}'");
74
+ }
75
76
string dbConnectionString = $"Host=localhost;Database=JsonApiTest-{Guid.NewGuid():N};User ID=postgres;Password=postgres;Include Error Detail=true";
77
78
var factory = new IntegrationTestWebApplicationFactory();
0 commit comments