From a9fe91fc23928ab15cf6f45e11dafd27efb1c76e Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 14 Jan 2018 00:03:04 +0100 Subject: [PATCH] use own pg config Signed-off-by: Thomas Citharel --- .gitlab-ci.yml | 4 ++++ config/test.exs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 154e7f454..5e1714383 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,10 @@ services: variables: MIX_ENV: "test" + POSTGRES_DB: eventos_test + POSTGRES_USER: ci + POSTGRES_PASSWORD: test + cache: key: "$CI_JOB_NAME" diff --git a/config/test.exs b/config/test.exs index 9ef5cbbdb..ce69acbdb 100644 --- a/config/test.exs +++ b/config/test.exs @@ -15,8 +15,8 @@ config :logger, # Configure your database config :eventos, Eventos.Repo, adapter: Ecto.Adapters.Postgres, - username: if(System.get_env("CI"), do: "postgres", else: "elixir"), - password: if(System.get_env("CI"), do: "", else: "elixir"), + username: if(System.get_env("CI"), do: System.get_env("POSTGRES_USER"), else: "elixir"), + password: if(System.get_env("CI"), do: System.get_env("POSTGRES_PASSWORD"), else: "elixir"), database: "eventos_test", hostname: if(System.get_env("CI"), do: "postgres", else: "localhost"), pool: Ecto.Adapters.SQL.Sandbox,