Skip to content

Commit

Permalink
https://github.com/bonfire-networks/bonfire-app/issues/851
Browse files Browse the repository at this point in the history
  • Loading branch information
mayel committed Feb 23, 2024
1 parent 921a70b commit 1ec6f90
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ repo_connection_config =
db_url = System.get_env("DATABASE_URL") ->
[
url: db_url,
socket_options: maybe_repo_ipv6
socket_options: maybe_repo_ipv6,
pool: Ecto.Adapters.SQL.Sandbox
]

db_pw = System.get_env("POSTGRES_PASSWORD") ->
Expand All @@ -47,12 +48,14 @@ repo_connection_config =
password: db_pw,
hostname: System.get_env("POSTGRES_HOST", "localhost"),
database: "bonfire_test_#{test_instance}_#{System.get_env("MIX_TEST_PARTITION")}",
socket_options: maybe_repo_ipv6
socket_options: maybe_repo_ipv6,
pool: Ecto.Adapters.SQL.Sandbox
]

true ->
nil
end
|> IO.inspect()

# Choose password hashing backend
config :bonfire_data_identity, Bonfire.Data.Identity.Credential,
Expand All @@ -70,6 +73,8 @@ config :phoenix_test, :endpoint, Bonfire.Web.Endpoint

if repo_connection_config do
config :bonfire, :repo_module, Bonfire.Common.Repo
config :bonfire, Bonfire.Common.Repo, repo_connection_config
config :bonfire, Bonfire.Common.TestInstanceRepo, repo_connection_config
config :bonfire_umbrella, Bonfire.Common.Repo, repo_connection_config
config :bonfire_umbrella, Bonfire.Common.TestInstanceRepo, repo_connection_config
config :bonfire, ecto_repos: [Bonfire.Common.Repo]
Expand Down

0 comments on commit 1ec6f90

Please sign in to comment.