Skip to content

Commit

Permalink
fix default e2e DB name
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrocp committed Oct 3, 2024
1 parent 5203d51 commit 4567718
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 6 additions & 3 deletions test/e2e/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ Code.require_file("fixtures.ex", __DIR__)

Application.put_env(:beacon_live_admin, :ecto_repos, [Beacon.LiveAdminTest.E2E.Repo])

repo_url = System.get_env("DATABASE_URL") || "postgres://localhost:5432/beacon_live_admin_e2e_test"
dbg(repo_url)

Application.put_env(
:beacon_live_admin,
Beacon.LiveAdminTest.E2E.Repo,
url: System.get_env("DATABASE_URL") || "postgres://localhost:5432/beacon_live_admin_test",
url: System.get_env("DATABASE_URL") || "postgres://localhost:5432/beacon_live_admin_e2e_test",
pool: Ecto.Adapters.SQL.Sandbox,
stacktrace: true,
show_sensitive_data_on_connection_error: true
Expand Down Expand Up @@ -160,8 +163,8 @@ defmodule Beacon.LiveAdminTest.E2E.Migrations.AddBeaconTables do
def down, do: Beacon.Migration.up()
end

Beacon.LiveAdminTest.E2E.Repo.__adapter__().storage_down(Beacon.LiveAdminTest.E2E.Repo.config())
Beacon.LiveAdminTest.E2E.Repo.__adapter__().storage_up(Beacon.LiveAdminTest.E2E.Repo.config())
Beacon.LiveAdminTest.E2E.Repo.__adapter__().storage_down(Beacon.LiveAdminTest.E2E.Repo.config()) |> dbg()
Beacon.LiveAdminTest.E2E.Repo.__adapter__().storage_up(Beacon.LiveAdminTest.E2E.Repo.config()) |> dbg()
{:ok, _pid} = Beacon.LiveAdminTest.E2E.Repo.start_link()
:ok = Ecto.Migrator.up(Beacon.LiveAdminTest.E2E.Repo, 0, Beacon.LiveAdminTest.E2E.Migrations.AddBeaconTables)

Expand Down
1 change: 0 additions & 1 deletion test/support/cluster.ex
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ defmodule Beacon.LiveAdminTest.Cluster do
[
url: System.get_env("DATABASE_URL") || "postgres://localhost:5432/beacon_live_admin_test",
pool: Ecto.Adapters.SQL.Sandbox,
pool_size: System.schedulers_online() * 2,
stacktrace: true,
show_sensitive_data_on_connection_error: true
]
Expand Down

0 comments on commit 4567718

Please sign in to comment.