41cddb9bd8938b52b7d1f4c70e1fae552cb2b2a6
[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 config :pleroma, :instance,
27 email: "admin@example.com",
28 notify_email: "noreply@example.com"
29
30 # Configure your database
31 config :pleroma, Pleroma.Repo,
32 adapter: Ecto.Adapters.Postgres,
33 username: "postgres",
34 password: "postgres",
35 database: "pleroma_test",
36 hostname: System.get_env("DB_HOST") || "localhost",
37 pool: Ecto.Adapters.SQL.Sandbox
38
39 # Reduce hash rounds for testing
40 config :pbkdf2_elixir, rounds: 1
41
42 config :tesla, adapter: Tesla.Mock
43 config :pleroma, :rich_media, enabled: false
44
45 config :web_push_encryption, :vapid_details,
46 subject: "mailto:administrator@example.com",
47 public_key:
48 "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
49 private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
50
51 config :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock
52
53 config :pleroma_job_queue, disabled: true
54
55 config :pleroma, Pleroma.ScheduledActivity,
56 daily_user_limit: 2,
57 total_user_limit: 3,
58 enabled: false
59
60 config :pleroma, :app_account_creation, max_requests: 5
61
62 config :pleroma, :http_security, report_uri: "https://endpoint.com"
63
64 config :pleroma, :http, send_user_agent: false
65
66 rum_enabled = System.get_env("RUM_ENABLED") == "true"
67 config :pleroma, :database, rum_enabled: rum_enabled
68 IO.puts("RUM enabled: #{rum_enabled}")
69
70 try do
71 import_config "test.secret.exs"
72 rescue
73 _ ->
74 IO.puts(
75 "You may want to create test.secret.exs to declare custom database connection parameters."
76 )
77 end