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