5670e11a0411b4de661a251baa06d8b06aea7b0f
[akkoma] / config / test.exs
1 use Mix.Config
2
3 # We don't run a server during test. If one is required,
4 # you can enable the server option below.
5 config :pleroma, Pleroma.Web.Endpoint,
6 http: [port: 4001],
7 server: false
8
9 # Disable captha for tests
10 config :pleroma, Pleroma.Captcha,
11 enabled: true,
12 # A fake captcha service for tests
13 method: Pleroma.Captcha.Mock
14
15 # Print only warnings and errors during test
16 config :logger, level: :warn
17
18 config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads"
19
20 config :pleroma, Pleroma.Mailer, adapter: Swoosh.Adapters.Test
21
22 # Configure your database
23 config :pleroma, Pleroma.Repo,
24 adapter: Ecto.Adapters.Postgres,
25 username: "postgres",
26 password: "postgres",
27 database: "pleroma_test",
28 hostname: System.get_env("DB_HOST") || "localhost",
29 pool: Ecto.Adapters.SQL.Sandbox
30
31 # Reduce hash rounds for testing
32 config :pbkdf2_elixir, rounds: 1
33
34 config :pleroma, :websub, Pleroma.Web.WebsubMock
35 config :pleroma, :ostatus, Pleroma.Web.OStatusMock
36 config :tesla, adapter: Tesla.Mock
37
38 config :web_push_encryption, :vapid_details,
39 subject: "mailto:administrator@example.com",
40 public_key:
41 "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
42 private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
43
44 try do
45 import_config "test.secret.exs"
46 rescue
47 _ ->
48 IO.puts(
49 "You may want to create test.secret.exs to declare custom database connection parameters."
50 )
51 end