From 50d03266b21f7e5cd771e0a5338a69d336f536a4 Mon Sep 17 00:00:00 2001 From: Julia Ilasova <1julka1il@gmail.com> Date: Thu, 25 Apr 2024 11:11:49 +0200 Subject: [PATCH] environment=Testing --- Tests/GlobalTestSetup.cs | 2 +- api/Program.cs | 2 +- appsettings.Testing.json => api/appsettings.Testing.json | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename appsettings.Testing.json => api/appsettings.Testing.json (100%) diff --git a/Tests/GlobalTestSetup.cs b/Tests/GlobalTestSetup.cs index 9e0c3c5..c80cbf1 100644 --- a/Tests/GlobalTestSetup.cs +++ b/Tests/GlobalTestSetup.cs @@ -8,6 +8,6 @@ public class GlobalTestSetup [OneTimeSetUp] public async Task StartApi() { - await Startup.StartApi(["Testing=true", "--db-init"]); + await Startup.StartApi(["ENVIRONMENT=Testing", "--db-init"]); } } \ No newline at end of file diff --git a/api/Program.cs b/api/Program.cs index a0533d7..ef55ce6 100644 --- a/api/Program.cs +++ b/api/Program.cs @@ -42,7 +42,7 @@ public static async Task StartApi(string[] args) var builder = WebApplication.CreateBuilder(args); - if (args.Contains("Testing=true")) + if (args.Contains("ENVIRONMENT=Testing")) { var dbContainer = new PostgreSqlBuilder() diff --git a/appsettings.Testing.json b/api/appsettings.Testing.json similarity index 100% rename from appsettings.Testing.json rename to api/appsettings.Testing.json