From 4fa886d026fb72c09ecd3dc706a265676c1208f0 Mon Sep 17 00:00:00 2001 From: Nelson Kopliku Date: Thu, 4 Jul 2024 13:59:45 +0200 Subject: [PATCH] Adjust configuration --- config/config.exs | 3 ++- test/test_helper.exs | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/config/config.exs b/config/config.exs index 0cd262ec67..def4d643a0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -204,7 +204,8 @@ config :trento, Trento.Infrastructure.SoftwareUpdates.SumaApi, executor: Trento.Infrastructure.SoftwareUpdates.Suma.HttpExecutor config :trento, Trento.ActivityLog.ActivityLogger, - adapter: Trento.Infrastructure.ActivityLog.Logger.NoopLogger + adapter: Trento.ActivityLog.Logger.PersistentLogger, + writer: Trento.Infrastructure.ActivityLog.Logger.DatabasetWriter config :bodyguard, # The second element of the {:error, reason} tuple returned on auth failure diff --git a/test/test_helper.exs b/test/test_helper.exs index 5bc8c0f5a6..137177383d 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -34,9 +34,12 @@ Mox.defmock(Trento.ActivityLog.ActivityLogger.Mock, for: Trento.ActivityLog.ActivityLogger ) -Application.put_env(:trento, Trento.ActivityLog.ActivityLogger, - adapter: Trento.ActivityLog.ActivityLogger.Mock -) +activity_log_config = + :trento + |> Application.fetch_env!(Trento.ActivityLog.ActivityLogger) + |> Keyword.put(:adapter, Trento.ActivityLog.ActivityLogger.Mock) + +Application.put_env(:trento, Trento.ActivityLog.ActivityLogger, activity_log_config) Mox.defmock(Trento.Infrastructure.Messaging.Adapter.Mock, for: Trento.Infrastructure.Messaging.Adapter.Gen