Browse Source

Fix unit test config

master^2
buttercat1791 2 months ago
parent
commit
f0041a5822
  1. 1
      config/config.exs
  2. 2
      config/runtime.exs
  3. 5
      config/test.exs

1
config/config.exs

@ -11,7 +11,6 @@ config :gc_index_relay, @@ -11,7 +11,6 @@ config :gc_index_relay,
ecto_repos: [GcIndexRelay.Repo],
generators: [timestamp_type: :utc_datetime]
# Configure the endpoint
config :gc_index_relay, GcIndexRelayWeb.Endpoint,
url: [host: "localhost"],

2
config/runtime.exs

@ -24,7 +24,7 @@ config :gc_index_relay, GcIndexRelayWeb.Endpoint, @@ -24,7 +24,7 @@ config :gc_index_relay, GcIndexRelayWeb.Endpoint,
http: [port: String.to_integer(System.get_env("PORT", "4000"))]
config :gc_index_relay, GcIndexRelay.Repo,
hostname: System.get_env("POSTGRES_HOST"),
hostname: System.get_env("POSTGRES_HOST") || "localhost",
port: String.to_integer(System.get_env("POSTGRES_PORT") || "5432"),
username: System.get_env("POSTGRES_USER"),
password: System.get_env("POSTGRES_PASSWORD"),

5
config/test.exs

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
import Config
config :gc_index_relay, :start_repo, true
config :gc_index_relay, :start_repo, System.get_env("REQUIRE_DB") == "true"
# Configure your database
#
@ -11,6 +11,9 @@ config :gc_index_relay, GcIndexRelay.Repo, @@ -11,6 +11,9 @@ config :gc_index_relay, GcIndexRelay.Repo,
username: System.get_env("POSTGRES_USER"),
password: System.get_env("POSTGRES_PASSWORD"),
database: "#{System.get_env("POSTGRES_DB")}#{System.get_env("MIX_TEST_PARTITION")}",
hostname: "localhost",
port: 5432,
show_sensitive_data_on_connection_error: true,
pool: Ecto.Adapters.SQL.Sandbox,
pool_size: System.schedulers_online() * 2

Loading…
Cancel
Save