Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # In ConnCase setup
- setup tags do
- :ok = Ecto.Adapters.SQL.Sandbox.checkout(Reporting.Repo)
- :ok = Ecto.Adapters.SQL.Sandbox.checkout(Profilix.RepoRead)
- unless tags[:async] do
- Ecto.Adapters.SQL.Sandbox.mode(Reporting.Repo, {:shared, self()})
- Ecto.Adapters.SQL.Sandbox.mode(Reporting.Repo, {:shared, self()})
- end
- end
- # In config/test.exs
- config :reporting, Reporting.Repo,
- adapter: Ecto.Adapters.MySQL,
- username: "gjaldon",
- password: "gjaldon",
- database: "reporting_test",
- hostname: "localhost",
- pool: Ecto.Adapters.SQL.Sandbox
- config :profilix, Profilix.RepoWrite,
- adapter: Ecto.Adapters.MySQL,
- username: "gjaldon",
- password: "gjaldon",
- database: "profilix_test",
- hostname: "localhost",
- pool: Ecto.Adapters.SQL.Sandbox
- config :profilix, Profilix.RepoRead,
- adapter: Ecto.Adapters.MySQL,
- username: "gjaldon",
- password: "gjaldon",
- database: "profilix_test",
- hostname: "localhost",
- pool: Ecto.Adapters.SQL.Sandbox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement