2019-10-05 19:07:50 +02:00
|
|
|
import Config
|
2017-12-08 09:58:14 +01:00
|
|
|
|
2019-03-22 13:58:19 +01:00
|
|
|
config :mobilizon, :instance,
|
|
|
|
name: "Test instance",
|
|
|
|
registrations_open: true
|
|
|
|
|
2017-12-08 09:58:14 +01:00
|
|
|
# We don't run a server during test. If one is required,
|
|
|
|
# you can enable the server option below.
|
2020-01-26 21:36:50 +01:00
|
|
|
config :mobilizon, Mobilizon.Web.Endpoint,
|
2019-01-03 11:33:52 +01:00
|
|
|
http: [
|
2020-01-30 20:27:25 +01:00
|
|
|
port: 80
|
2019-01-03 11:33:52 +01:00
|
|
|
],
|
|
|
|
url: [
|
2020-01-30 20:27:25 +01:00
|
|
|
host: "mobilizon.test",
|
|
|
|
scheme: "http"
|
2019-01-03 11:33:52 +01:00
|
|
|
],
|
2020-01-30 20:27:25 +01:00
|
|
|
secret_key_base: "some secret",
|
2017-12-08 09:58:14 +01:00
|
|
|
server: false
|
|
|
|
|
|
|
|
# Print only warnings and errors during test
|
2018-01-13 23:33:03 +01:00
|
|
|
config :logger,
|
2018-07-27 10:45:35 +02:00
|
|
|
backends: [:console],
|
2019-12-20 13:04:34 +01:00
|
|
|
compile_time_purge_matching: [
|
|
|
|
[level_lower_than: :debug]
|
|
|
|
],
|
2018-07-27 10:45:35 +02:00
|
|
|
level: :info
|
2017-12-08 09:58:14 +01:00
|
|
|
|
|
|
|
# Configure your database
|
2019-09-08 01:49:56 +02:00
|
|
|
config :mobilizon, Mobilizon.Storage.Repo,
|
|
|
|
types: Mobilizon.Storage.PostgresTypes,
|
2020-01-30 20:27:25 +01:00
|
|
|
username: System.get_env("MOBILIZON_DATABASE_USERNAME") || "mobilizon_test",
|
2020-01-23 21:59:50 +01:00
|
|
|
password: System.get_env("MOBILIZON_DATABASE_PASSWORD") || "mobilizon",
|
2019-01-03 11:33:52 +01:00
|
|
|
database: System.get_env("MOBILIZON_DATABASE_DBNAME") || "mobilizon_test",
|
|
|
|
hostname: System.get_env("MOBILIZON_DATABASE_HOST") || "localhost",
|
2020-06-01 22:34:16 +02:00
|
|
|
port: System.get_env("MOBILIZON_DATABASE_PORT") || "5432",
|
2019-09-08 01:49:56 +02:00
|
|
|
pool: Ecto.Adapters.SQL.Sandbox
|
2018-07-04 16:23:52 +02:00
|
|
|
|
2020-01-26 21:36:50 +01:00
|
|
|
config :mobilizon, Mobilizon.Web.Email.Mailer, adapter: Bamboo.TestAdapter
|
2018-11-13 12:23:37 +01:00
|
|
|
|
2020-01-26 21:36:50 +01:00
|
|
|
config :mobilizon, Mobilizon.Web.Upload, filters: [], link_name: false
|
2019-05-22 14:12:11 +02:00
|
|
|
|
2020-01-26 21:36:50 +01:00
|
|
|
config :mobilizon, Mobilizon.Web.Upload.Uploader.Local, uploads: "test/uploads"
|
2019-05-22 14:12:11 +02:00
|
|
|
|
2018-11-13 12:23:37 +01:00
|
|
|
config :exvcr,
|
|
|
|
vcr_cassette_library_dir: "test/fixtures/vcr_cassettes"
|
2019-03-12 11:52:28 +01:00
|
|
|
|
2020-07-09 17:24:28 +02:00
|
|
|
config :tesla, Mobilizon.Service.HTTP.ActivityPub,
|
|
|
|
adapter: Mobilizon.Service.HTTP.ActivityPub.Mock
|
|
|
|
|
2020-08-30 23:29:56 +02:00
|
|
|
config :tesla, Mobilizon.Service.HTTP.GeospatialClient,
|
|
|
|
adapter: Mobilizon.Service.HTTP.GeospatialClient.Mock
|
2020-07-09 17:24:28 +02:00
|
|
|
|
2019-03-12 11:52:28 +01:00
|
|
|
config :mobilizon, Mobilizon.Service.Geospatial, service: Mobilizon.Service.Geospatial.Mock
|
2019-11-04 15:10:58 +01:00
|
|
|
|
2020-08-12 14:34:19 +02:00
|
|
|
config :mobilizon, Oban, queues: false, crontab: false, plugins: false
|
2020-01-30 20:27:25 +01:00
|
|
|
|
|
|
|
config :mobilizon, Mobilizon.Web.Auth.Guardian, secret_key: "some secret"
|
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
config :mobilizon, :activitypub, sign_object_fetches: false
|
|
|
|
|
2020-01-30 20:27:25 +01:00
|
|
|
if System.get_env("DOCKER", "false") == "false" && File.exists?("./config/test.secret.exs") do
|
|
|
|
import_config "test.secret.exs"
|
|
|
|
end
|