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