diff --git a/tests/KArtSell.Integration.Tests/TestDatabaseConnection.cs b/tests/KArtSell.Integration.Tests/TestDatabaseConnection.cs index 14ebc899..d243c162 100644 --- a/tests/KArtSell.Integration.Tests/TestDatabaseConnection.cs +++ b/tests/KArtSell.Integration.Tests/TestDatabaseConnection.cs @@ -6,6 +6,10 @@ internal static class TestDatabaseConnection { public static string GetConnectionString() { + var configured = Environment.GetEnvironmentVariable("KARTSELL_POSTGRES"); + if (!string.IsNullOrWhiteSpace(configured)) + return configured; + var path = Path.Combine(AppContext.BaseDirectory, "appsettings.Development.json"); if (!File.Exists(path)) throw new InvalidOperationException($"Integration test settings are required: {path}");