Created
April 7, 2017 08:33
-
-
Save gjaldon/3bc745ff71bf7a3fe3077b8d2a4403bc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment