Merge branch 'admin-logo-upload' 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, :console,
19 level: :warn,
20 format: "\n[$level] $message\n"
21
22 config :pleroma, :auth, oauth_consumer_strategies: []
23
24 config :pleroma, Pleroma.Upload, filters: [], link_name: false
25
26 config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads"
27
28 config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Test, enabled: true
29
30 config :pleroma, :instance,
31 email: "admin@example.com",
32 notify_email: "noreply@example.com",
33 skip_thread_containment: false,
34 federating: false,
35 external_user_synchronization: false,
36 static_dir: "test/instance_static/"
37
38 config :pleroma, :activitypub, sign_object_fetches: false
39
40 # Configure your database
41 config :pleroma, Pleroma.Repo,
42 adapter: Ecto.Adapters.Postgres,
43 username: "postgres",
44 password: "postgres",
45 database: "pleroma_test",
46 hostname: System.get_env("DB_HOST") || "localhost",
47 pool: Ecto.Adapters.SQL.Sandbox
48
49 # Reduce hash rounds for testing
50 config :pbkdf2_elixir, rounds: 1
51
52 config :tesla, adapter: Tesla.Mock
53
54 config :pleroma, :rich_media,
55 enabled: false,
56 ignore_hosts: [],
57 ignore_tld: ["local", "localdomain", "lan"]
58
59 config :pleroma, :instance,
60 multi_factor_authentication: [
61 totp: [
62 # digits 6 or 8
63 digits: 6,
64 period: 30
65 ],
66 backup_codes: [
67 number: 2,
68 length: 6
69 ]
70 ]
71
72 config :web_push_encryption, :vapid_details,
73 subject: "mailto:administrator@example.com",
74 public_key:
75 "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
76 private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
77
78 config :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock
79
80 config :pleroma, Oban,
81 queues: false,
82 prune: :disabled,
83 crontab: false
84
85 config :pleroma, Pleroma.ScheduledActivity,
86 daily_user_limit: 2,
87 total_user_limit: 3,
88 enabled: false
89
90 config :pleroma, :rate_limit, %{}
91
92 config :pleroma, :http_security, report_uri: "https://endpoint.com"
93
94 config :pleroma, :http, send_user_agent: false
95
96 rum_enabled = System.get_env("RUM_ENABLED") == "true"
97 config :pleroma, :database, rum_enabled: rum_enabled
98 IO.puts("RUM enabled: #{rum_enabled}")
99
100 config :joken, default_signer: "yU8uHKq+yyAkZ11Hx//jcdacWc8yQ1bxAAGrplzB0Zwwjkp35v0RK9SO8WTPr6QZ"
101
102 config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock
103
104 config :pleroma, :modules, runtime_dir: "test/fixtures/modules"
105
106 config :pleroma, Pleroma.Gun, Pleroma.GunMock
107
108 config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: true
109
110 config :pleroma, Pleroma.Plugs.RemoteIp, enabled: false
111
112 config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: true
113
114 if File.exists?("./config/test.secret.exs") do
115 import_config "test.secret.exs"
116 else
117 IO.puts(
118 "You may want to create test.secret.exs to declare custom database connection parameters."
119 )
120 end