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,
10 # Disable captha for tests
11 config :pleroma, Pleroma.Captcha,
12 # It should not be enabled for automatic tests
14 # A fake captcha service for tests
15 method: Pleroma.Captcha.Mock
17 # Print only warnings and errors during test
18 config :logger, :console,
20 format: "\n[$level] $message\n"
22 config :pleroma, :auth, oauth_consumer_strategies: []
24 config :pleroma, Pleroma.Upload,
27 default_description: :filename
29 config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads"
31 config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Test, enabled: true
33 config :pleroma, :instance,
34 email: "admin@example.com",
35 notify_email: "noreply@example.com",
36 skip_thread_containment: false,
38 external_user_synchronization: false,
39 static_dir: "test/instance_static/"
41 config :pleroma, :activitypub, sign_object_fetches: false
43 # Configure your database
44 config :pleroma, Pleroma.Repo,
45 adapter: Ecto.Adapters.Postgres,
48 database: "pleroma_test",
49 hostname: System.get_env("DB_HOST") || "localhost",
50 pool: Ecto.Adapters.SQL.Sandbox,
53 config :pleroma, :dangerzone, override_repo_pool_size: true
55 # Reduce hash rounds for testing
56 config :pleroma, :password, iterations: 1
58 config :tesla, adapter: Tesla.Mock
60 config :pleroma, :rich_media,
63 ignore_tld: ["local", "localdomain", "lan"]
65 config :pleroma, :instance,
66 multi_factor_authentication: [
78 config :web_push_encryption, :vapid_details,
79 subject: "mailto:administrator@example.com",
81 "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
82 private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
84 config :pleroma, Oban,
89 config :pleroma, Pleroma.ScheduledActivity,
94 config :pleroma, :rate_limit, %{}
96 config :pleroma, :http_security, report_uri: "https://endpoint.com"
98 config :pleroma, :http, send_user_agent: false
100 rum_enabled = System.get_env("RUM_ENABLED") == "true"
101 config :pleroma, :database, rum_enabled: rum_enabled
102 IO.puts("RUM enabled: #{rum_enabled}")
104 config :joken, default_signer: "yU8uHKq+yyAkZ11Hx//jcdacWc8yQ1bxAAGrplzB0Zwwjkp35v0RK9SO8WTPr6QZ"
106 config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock
108 config :pleroma, :modules, runtime_dir: "test/fixtures/modules"
110 config :pleroma, Pleroma.Gun, Pleroma.GunMock
112 config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: true
114 config :pleroma, Pleroma.Web.Plugs.RemoteIp, enabled: false
116 config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: true
118 config :tzdata, :autoupdate, :disabled
120 config :pleroma, :mrf, policies: []
122 config :pleroma, :pipeline,
123 object_validator: Pleroma.Web.ActivityPub.ObjectValidatorMock,
124 mrf: Pleroma.Web.ActivityPub.MRFMock,
125 activity_pub: Pleroma.Web.ActivityPub.ActivityPubMock,
126 side_effects: Pleroma.Web.ActivityPub.SideEffectsMock,
127 federator: Pleroma.Web.FederatorMock,
128 config: Pleroma.ConfigMock
130 config :pleroma, :cachex, provider: Pleroma.CachexMock
132 config :pleroma, :side_effects,
133 ap_streamer: Pleroma.Web.ActivityPub.ActivityPubMock,
134 logger: Pleroma.LoggerMock
136 if File.exists?("./config/test.secret.exs") do
137 import_config "test.secret.exs"
140 "You may want to create test.secret.exs to declare custom database connection parameters."