Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[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 # It should not be enabled for automatic tests
13 enabled: false,
14 # A fake captcha service for tests
15 method: Pleroma.Captcha.Mock
16
17 # Print only warnings and errors during test
18 config :logger, level: :warn
19
20 config :pleroma, Pleroma.Upload, filters: [], link_name: false
21
22 config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads"
23
24 config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Test
25
26 # Configure your database
27 config :pleroma, Pleroma.Repo,
28 adapter: Ecto.Adapters.Postgres,
29 username: "postgres",
30 password: "postgres",
31 database: "pleroma_test",
32 hostname: System.get_env("DB_HOST") || "localhost",
33 pool: Ecto.Adapters.SQL.Sandbox
34
35 # Reduce hash rounds for testing
36 config :pbkdf2_elixir, rounds: 1
37
38 config :pleroma, :websub, Pleroma.Web.WebsubMock
39 config :pleroma, :ostatus, Pleroma.Web.OStatusMock
40 config :tesla, adapter: Tesla.Mock
41 config :pleroma, :rich_media, enabled: false
42
43 config :web_push_encryption, :vapid_details,
44 subject: "mailto:administrator@example.com",
45 public_key:
46 "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
47 private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
48
49 config :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock
50
51 config :pleroma_job_queue, disabled: true
52
53 config :pleroma, Pleroma.ScheduledActivity,
54 daily_user_limit: 2,
55 total_user_limit: 3,
56 enabled: false
57
58 try do
59 import_config "test.secret.exs"
60 rescue
61 _ ->
62 IO.puts(
63 "You may want to create test.secret.exs to declare custom database connection parameters."
64 )
65 end