update pleroma-fe
[akkoma] / config / test.exs
1 import 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,
25 filters: [],
26 link_name: false,
27 default_description: :filename
28
29 config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads"
30
31 config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Test, enabled: true
32
33 config :pleroma, :instance,
34 email: "admin@example.com",
35 notify_email: "noreply@example.com",
36 skip_thread_containment: false,
37 federating: false,
38 external_user_synchronization: false,
39 static_dir: "test/instance_static/"
40
41 config :pleroma, :activitypub, sign_object_fetches: false, follow_handshake_timeout: 0
42
43 # Configure your database
44 config :pleroma, Pleroma.Repo,
45 adapter: Ecto.Adapters.Postgres,
46 username: "postgres",
47 password: "postgres",
48 database: "pleroma_test",
49 hostname: System.get_env("DB_HOST") || "localhost",
50 pool: Ecto.Adapters.SQL.Sandbox,
51 pool_size: 50,
52 queue_target: 5000
53
54 config :pleroma, :dangerzone, override_repo_pool_size: true
55
56 # Reduce hash rounds for testing
57 config :pleroma, :password, iterations: 1
58
59 config :tesla, adapter: Tesla.Mock
60
61 config :pleroma, :rich_media,
62 enabled: false,
63 ignore_hosts: [],
64 ignore_tld: ["local", "localdomain", "lan"]
65
66 config :pleroma, :instance,
67 multi_factor_authentication: [
68 totp: [
69 # digits 6 or 8
70 digits: 6,
71 period: 30
72 ],
73 backup_codes: [
74 number: 2,
75 length: 6
76 ]
77 ]
78
79 config :web_push_encryption, :vapid_details,
80 subject: "mailto:administrator@example.com",
81 public_key:
82 "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
83 private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
84
85 config :pleroma, Oban,
86 queues: false,
87 crontab: false,
88 plugins: false
89
90 config :pleroma, Pleroma.ScheduledActivity,
91 daily_user_limit: 2,
92 total_user_limit: 3,
93 enabled: false
94
95 config :pleroma, :rate_limit, %{}
96
97 config :pleroma, :http_security, report_uri: "https://endpoint.com"
98
99 config :pleroma, :http, send_user_agent: false
100
101 rum_enabled = System.get_env("RUM_ENABLED") == "true"
102 config :pleroma, :database, rum_enabled: rum_enabled
103 IO.puts("RUM enabled: #{rum_enabled}")
104
105 config :joken, default_signer: "yU8uHKq+yyAkZ11Hx//jcdacWc8yQ1bxAAGrplzB0Zwwjkp35v0RK9SO8WTPr6QZ"
106
107 config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock
108
109 config :pleroma, :modules, runtime_dir: "test/fixtures/modules"
110
111 config :pleroma, Pleroma.Gun, Pleroma.GunMock
112
113 config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: true
114
115 config :pleroma, Pleroma.Web.Plugs.RemoteIp, enabled: false
116
117 config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: true
118
119 config :tzdata, :autoupdate, :disabled
120
121 config :pleroma, :mrf, policies: []
122
123 config :pleroma, :pipeline,
124 object_validator: Pleroma.Web.ActivityPub.ObjectValidatorMock,
125 mrf: Pleroma.Web.ActivityPub.MRFMock,
126 activity_pub: Pleroma.Web.ActivityPub.ActivityPubMock,
127 side_effects: Pleroma.Web.ActivityPub.SideEffectsMock,
128 federator: Pleroma.Web.FederatorMock,
129 config: Pleroma.ConfigMock
130
131 config :pleroma, :cachex, provider: Pleroma.CachexMock
132
133 config :pleroma, :side_effects,
134 ap_streamer: Pleroma.Web.ActivityPub.ActivityPubMock,
135 logger: Pleroma.LoggerMock
136
137 # Reduce recompilation time
138 # https://dashbit.co/blog/speeding-up-re-compilation-of-elixir-projects
139 config :phoenix, :plug_init_mode, :runtime
140
141 if File.exists?("./config/test.secret.exs") do
142 import_config "test.secret.exs"
143 else
144 IO.puts(
145 "You may want to create test.secret.exs to declare custom database connection parameters."
146 )
147 end