2019-10-05 17:07:50 +00:00
|
|
|
import Config
|
2017-12-08 08:58:14 +00:00
|
|
|
|
2019-03-22 12:58:19 +00:00
|
|
|
config :mobilizon, :instance,
|
|
|
|
name: "Test instance",
|
|
|
|
registrations_open: true
|
|
|
|
|
2017-12-08 08:58:14 +00:00
|
|
|
# We don't run a server during test. If one is required,
|
|
|
|
# you can enable the server option below.
|
2020-01-26 20:36:50 +00:00
|
|
|
config :mobilizon, Mobilizon.Web.Endpoint,
|
2019-01-03 10:33:52 +00:00
|
|
|
http: [
|
2020-01-30 19:27:25 +00:00
|
|
|
port: 80
|
2019-01-03 10:33:52 +00:00
|
|
|
],
|
|
|
|
url: [
|
2020-01-30 19:27:25 +00:00
|
|
|
host: "mobilizon.test",
|
|
|
|
scheme: "http"
|
2019-01-03 10:33:52 +00:00
|
|
|
],
|
2020-10-13 13:06:00 +00:00
|
|
|
debug_errors: true,
|
2020-01-30 19:27:25 +00:00
|
|
|
secret_key_base: "some secret",
|
2017-12-08 08:58:14 +00:00
|
|
|
server: false
|
|
|
|
|
|
|
|
# Print only warnings and errors during test
|
2018-01-13 22:33:03 +00:00
|
|
|
config :logger,
|
2018-07-27 08:45:35 +00:00
|
|
|
backends: [:console],
|
2019-12-20 12:04:34 +00:00
|
|
|
compile_time_purge_matching: [
|
|
|
|
[level_lower_than: :debug]
|
|
|
|
],
|
2018-07-27 08:45:35 +00:00
|
|
|
level: :info
|
2017-12-08 08:58:14 +00:00
|
|
|
|
|
|
|
# Configure your database
|
2019-09-07 23:49:56 +00:00
|
|
|
config :mobilizon, Mobilizon.Storage.Repo,
|
|
|
|
types: Mobilizon.Storage.PostgresTypes,
|
2020-01-30 19:27:25 +00:00
|
|
|
username: System.get_env("MOBILIZON_DATABASE_USERNAME") || "mobilizon_test",
|
2020-01-23 20:59:50 +00:00
|
|
|
password: System.get_env("MOBILIZON_DATABASE_PASSWORD") || "mobilizon",
|
2019-01-03 10:33:52 +00:00
|
|
|
database: System.get_env("MOBILIZON_DATABASE_DBNAME") || "mobilizon_test",
|
|
|
|
hostname: System.get_env("MOBILIZON_DATABASE_HOST") || "localhost",
|
2020-06-01 20:34:16 +00:00
|
|
|
port: System.get_env("MOBILIZON_DATABASE_PORT") || "5432",
|
2019-09-07 23:49:56 +00:00
|
|
|
pool: Ecto.Adapters.SQL.Sandbox
|
2018-07-04 14:23:52 +00:00
|
|
|
|
2021-02-01 13:57:58 +00:00
|
|
|
config :mobilizon, :ldap,
|
|
|
|
enabled: System.get_env("LDAP_ENABLED") == "true",
|
|
|
|
host: System.get_env("LDAP_HOST") || "localhost",
|
|
|
|
port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
|
|
|
|
ssl: System.get_env("LDAP_SSL") == "true",
|
|
|
|
sslopts: [],
|
|
|
|
tls: System.get_env("LDAP_TLS") == "true",
|
|
|
|
tlsopts: [],
|
|
|
|
base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
|
|
|
|
uid: System.get_env("LDAP_UID") || "cn",
|
|
|
|
require_bind_for_search: !(System.get_env("LDAP_REQUIRE_BIND_FOR_SEARCH") == "false"),
|
|
|
|
# The full CN to filter by `memberOf`, or `false` if disabled
|
|
|
|
group: false,
|
|
|
|
# Either the admin UID matching the field in `uid`,
|
|
|
|
# Either a tuple with the fully qualified DN: {:full, uid=admin,dc=example.com,dc=local}
|
|
|
|
bind_uid: System.get_env("LDAP_BIND_UID"),
|
|
|
|
bind_password: System.get_env("LDAP_BIND_PASSWORD")
|
|
|
|
|
2022-04-05 10:16:22 +00:00
|
|
|
config :mobilizon, Mobilizon.Web.Email.Mailer, adapter: Swoosh.Adapters.Test
|
2018-11-13 11:23:37 +00:00
|
|
|
|
2020-01-26 20:36:50 +00:00
|
|
|
config :mobilizon, Mobilizon.Web.Upload, filters: [], link_name: false
|
2019-05-22 12:12:11 +00:00
|
|
|
|
2020-01-26 20:36:50 +00:00
|
|
|
config :mobilizon, Mobilizon.Web.Upload.Uploader.Local, uploads: "test/uploads"
|
2019-05-22 12:12:11 +00:00
|
|
|
|
2021-11-22 17:43:59 +00:00
|
|
|
config :mobilizon, :exports, path: "test/uploads/exports"
|
|
|
|
|
2023-09-05 18:04:26 +00:00
|
|
|
config :mobilizon, Mobilizon.Service.SiteMap,
|
|
|
|
path: System.get_env("MOBILIZON_SITEMAP_PATH", "test/sitemap")
|
|
|
|
|
2021-11-08 19:27:13 +00:00
|
|
|
config :tz_world, data_dir: "_build/test/lib/tz_world/priv"
|
|
|
|
|
2020-07-09 15:24:28 +00:00
|
|
|
config :tesla, Mobilizon.Service.HTTP.ActivityPub,
|
|
|
|
adapter: Mobilizon.Service.HTTP.ActivityPub.Mock
|
|
|
|
|
2021-11-14 15:27:53 +00:00
|
|
|
config :tesla, Mobilizon.Service.HTTP.WebfingerClient,
|
|
|
|
adapter: Mobilizon.Service.HTTP.WebfingerClient.Mock
|
|
|
|
|
2020-08-30 21:29:56 +00:00
|
|
|
config :tesla, Mobilizon.Service.HTTP.GeospatialClient,
|
|
|
|
adapter: Mobilizon.Service.HTTP.GeospatialClient.Mock
|
2020-07-09 15:24:28 +00:00
|
|
|
|
2021-11-14 15:27:53 +00:00
|
|
|
config :tesla, Mobilizon.Service.HTTP.HostMetaClient,
|
|
|
|
adapter: Mobilizon.Service.HTTP.HostMetaClient.Mock
|
|
|
|
|
2019-03-12 10:52:28 +00:00
|
|
|
config :mobilizon, Mobilizon.Service.Geospatial, service: Mobilizon.Service.Geospatial.Mock
|
2019-11-04 14:10:58 +00:00
|
|
|
|
2023-03-17 17:10:59 +00:00
|
|
|
config :mobilizon, Oban, testing: :manual
|
2020-01-30 19:27:25 +00:00
|
|
|
|
|
|
|
config :mobilizon, Mobilizon.Web.Auth.Guardian, secret_key: "some secret"
|
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
config :mobilizon, :activitypub, sign_object_fetches: false
|
|
|
|
|
2021-09-24 14:46:57 +00:00
|
|
|
config :mobilizon, Mobilizon.Web.Gettext, allowed_locales: ["fr", "en", "es", "ru"]
|
2021-09-10 09:28:38 +00:00
|
|
|
|
2021-01-12 19:09:44 +00:00
|
|
|
config :junit_formatter, report_dir: "."
|
|
|
|
|
2022-11-04 09:55:26 +00:00
|
|
|
config :mobilizon, :http_security, report_uri: "https://endpoint.com"
|
|
|
|
|
2023-06-01 12:48:42 +00:00
|
|
|
config :mobilizon, Mobilizon.Service.AntiSpam, service: Mobilizon.Service.AntiSpam.Mock
|
|
|
|
|
2020-01-30 19:27:25 +00:00
|
|
|
if System.get_env("DOCKER", "false") == "false" && File.exists?("./config/test.secret.exs") do
|
|
|
|
import_config "test.secret.exs"
|
|
|
|
end
|