2021-10-19 19:28:25 +00:00
|
|
|
import Config
|
2020-07-05 17:26:26 +00:00
|
|
|
|
2020-07-29 17:07:36 +00:00
|
|
|
# We don't run a server during test. If one is required,
|
|
|
|
# you can enable the server option below.
|
2020-09-30 21:31:03 +00:00
|
|
|
[
|
2021-03-19 19:32:18 +00:00
|
|
|
{:admin, Legendary.Admin},
|
2020-09-30 21:31:03 +00:00
|
|
|
{:app, AppWeb},
|
2021-03-19 19:32:18 +00:00
|
|
|
{:core, Legendary.AuthWeb},
|
|
|
|
{:content, Legendary.Content},
|
|
|
|
{:core, Legendary.CoreWeb},
|
2021-10-19 19:28:25 +00:00
|
|
|
{:object_storage, Legendary.ObjectStorageWeb}
|
2020-09-30 21:31:03 +00:00
|
|
|
]
|
|
|
|
|> Enum.map(fn {otp_app, module} ->
|
|
|
|
config otp_app, Module.concat(module, "Endpoint"),
|
|
|
|
http: [port: 4002],
|
|
|
|
server: false
|
|
|
|
end)
|
2020-07-24 22:10:50 +00:00
|
|
|
|
2020-07-17 23:30:31 +00:00
|
|
|
# Configure your database
|
|
|
|
#
|
|
|
|
# The MIX_TEST_PARTITION environment variable can be used
|
|
|
|
# to provide built-in test partitioning in CI environment.
|
|
|
|
# Run `mix help test` for more information.
|
2020-08-13 20:21:43 +00:00
|
|
|
|
2020-09-30 21:31:03 +00:00
|
|
|
[
|
2021-03-19 19:32:18 +00:00
|
|
|
{:admin, Legendary.Admin.Repo},
|
2020-09-30 21:31:03 +00:00
|
|
|
{:app, App.Repo},
|
2021-03-19 19:32:18 +00:00
|
|
|
{:content, Legendary.Content.Repo},
|
2021-10-19 19:28:25 +00:00
|
|
|
{:core, Legendary.Core.Repo},
|
|
|
|
{:object_storage, Legendary.ObjectStorage.Repo}
|
2020-09-30 21:31:03 +00:00
|
|
|
]
|
|
|
|
|> Enum.map(fn {otp_app, repo} ->
|
|
|
|
config otp_app, repo,
|
|
|
|
username: "postgres",
|
|
|
|
password: "postgres",
|
|
|
|
database: "legendary_test#{System.get_env("MIX_TEST_PARTITION")}",
|
|
|
|
hostname: System.get_env("DATABASE_URL") || "localhost",
|
|
|
|
pool: Ecto.Adapters.SQL.Sandbox
|
|
|
|
end)
|
2020-08-13 20:21:43 +00:00
|
|
|
|
2021-03-19 19:32:18 +00:00
|
|
|
config :core, Legendary.CoreMailer, adapter: Bamboo.TestAdapter
|
2020-09-30 20:56:22 +00:00
|
|
|
|
2020-10-09 19:32:53 +00:00
|
|
|
config :content, Oban, crontab: false, queues: false, plugins: false
|
|
|
|
|
2020-09-30 20:56:22 +00:00
|
|
|
config :logger, level: :warn
|
2021-05-28 17:38:37 +00:00
|
|
|
|
2021-09-06 19:43:16 +00:00
|
|
|
config :libcluster, topologies: []
|
2021-10-19 19:28:25 +00:00
|
|
|
|
|
|
|
config :waffle,
|
|
|
|
storage: Waffle.Storage.Local,
|
|
|
|
storage_dir_prefix: "priv/test/static/",
|
|
|
|
asset_host: "http://localhost:4000"
|
|
|
|
|
|
|
|
config :object_storage,
|
|
|
|
bucket_name: "uploads"
|
|
|
|
|
|
|
|
config :ex_aws,
|
|
|
|
access_key_id: "test-access-key-id",
|
|
|
|
secret_access_key: "test-secret-access-key"
|
|
|
|
|
|
|
|
config :ex_aws, :s3,
|
|
|
|
scheme: "http://",
|
|
|
|
host: "localhost",
|
|
|
|
port: 4000
|
|
|
|
|
|
|
|
config :object_storage, :signature_generator, Legendary.ObjectStorageWeb.CheckSignatures.MockSignatureGenerator
|