Skip to content

Commit

Permalink
Adjust configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonkopliku committed Jul 4, 2024
1 parent 6e23e9b commit 4fa886d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions test/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4fa886d

Please sign in to comment.