Skip to content

Commit

Permalink
add DB_PASSWORD env for test database password
Browse files Browse the repository at this point in the history
  • Loading branch information
smpallen99 committed May 20, 2018
1 parent f86c319 commit 306f649
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ config :logger, :console,
format: "\n$time [$level]$levelpad$metadata$message\n",
metadata: [:module, :function, :line]

# config :infinity_one, InfinityOne.Repo,
# adapter: Ecto.Adapters.Postgres,
# username: "postgres",
# password: "postgres",
# database: "infinity_one_test3",
# hostname: "localhost",
# pool: Ecto.Adapters.SQL.Sandbox
config :infinity_one, InfinityOne.Repo,
adapter: Ecto.Adapters.MySQL,
username: "root",
password: System.get_env("DB_PASSWORD") || "password",
database: "infinity_one_test3",
timeout: 60_000,
ownership_timeout: 60_000,
pool_timeout: 60_000,
pool: Ecto.Adapters.SQL.Sandbox

if File.exists? "config/test.secret.exs" do
import_config "test.secret.exs"
Expand Down

0 comments on commit 306f649

Please sign in to comment.