From eceaf85e923b3d9561e6b4aa7e14e5a80391f5f6 Mon Sep 17 00:00:00 2001 From: Rick van Dam Date: Fri, 24 May 2024 11:44:07 +0200 Subject: [PATCH] use same postgre image for running locally and running tests --- CleanAspCore.Api.Tests/TestSetup/ServiceCollectionExtensions.cs | 1 + docker-compose.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CleanAspCore.Api.Tests/TestSetup/ServiceCollectionExtensions.cs b/CleanAspCore.Api.Tests/TestSetup/ServiceCollectionExtensions.cs index c9a7960..11f0176 100644 --- a/CleanAspCore.Api.Tests/TestSetup/ServiceCollectionExtensions.cs +++ b/CleanAspCore.Api.Tests/TestSetup/ServiceCollectionExtensions.cs @@ -23,6 +23,7 @@ public static void RegisterPostgreSqlContainer(this IServiceCollection services) services.AddTransient, PostgreSqlDatabasePoolPolicy>(); var container = new PostgreSqlBuilder() + .WithImage("postgres:16.3-alpine") .WithReuse(true) .Build(); container.StartAsync().RunSynchronouslyWithoutSynchronizationContext(); diff --git a/docker-compose.yaml b/docker-compose.yaml index 74ce455..6e0ab05 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -2,7 +2,7 @@ version: '3' services: postgres: - image: postgres:15.1 + image: postgres:16.3-alpine container_name: "postgres" environment: - POSTGRES_USER=postgres