Advertisement
Guest User

Untitled

a guest
Apr 7th, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. # In ConnCase setup
  2. setup tags do
  3. :ok = Ecto.Adapters.SQL.Sandbox.checkout(Reporting.Repo)
  4. :ok = Ecto.Adapters.SQL.Sandbox.checkout(Profilix.RepoRead)
  5.  
  6. unless tags[:async] do
  7. Ecto.Adapters.SQL.Sandbox.mode(Reporting.Repo, {:shared, self()})
  8. Ecto.Adapters.SQL.Sandbox.mode(Reporting.Repo, {:shared, self()})
  9. end
  10. end
  11.  
  12. # In config/test.exs
  13. config :reporting, Reporting.Repo,
  14. adapter: Ecto.Adapters.MySQL,
  15. username: "gjaldon",
  16. password: "gjaldon",
  17. database: "reporting_test",
  18. hostname: "localhost",
  19. pool: Ecto.Adapters.SQL.Sandbox
  20.  
  21. config :profilix, Profilix.RepoWrite,
  22. adapter: Ecto.Adapters.MySQL,
  23. username: "gjaldon",
  24. password: "gjaldon",
  25. database: "profilix_test",
  26. hostname: "localhost",
  27. pool: Ecto.Adapters.SQL.Sandbox
  28.  
  29. config :profilix, Profilix.RepoRead,
  30. adapter: Ecto.Adapters.MySQL,
  31. username: "gjaldon",
  32. password: "gjaldon",
  33. database: "profilix_test",
  34. hostname: "localhost",
  35. pool: Ecto.Adapters.SQL.Sandbox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement