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, filters: [], link_name: false
26 config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads"
28 config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Test, enabled: true
30 config :pleroma, :instance,
31 email: "admin@example.com",
32 notify_email: "noreply@example.com",
33 skip_thread_containment: false,
35 external_user_synchronization: false,
36 static_dir: "test/instance_static/"
38 config :pleroma, :activitypub, sign_object_fetches: false
40 # Configure your database
41 config :pleroma, Pleroma.Repo,
42 adapter: Ecto.Adapters.Postgres,
45 database: "pleroma_test",
46 hostname: System.get_env("DB_HOST") || "localhost",
47 pool: Ecto.Adapters.SQL.Sandbox
49 # Reduce hash rounds for testing
50 config :pbkdf2_elixir, rounds: 1
52 config :tesla, adapter: Tesla.Mock
54 config :pleroma, :rich_media,
57 ignore_tld: ["local", "localdomain", "lan"]
59 config :web_push_encryption, :vapid_details,
60 subject: "mailto:administrator@example.com",
62 "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
63 private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
65 config :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock
67 config :pleroma, Oban,
72 config :pleroma, Pleroma.ScheduledActivity,
77 config :pleroma, :rate_limit, %{}
79 config :pleroma, :http_security, report_uri: "https://endpoint.com"
81 config :pleroma, :http, send_user_agent: false
83 rum_enabled = System.get_env("RUM_ENABLED") == "true"
84 config :pleroma, :database, rum_enabled: rum_enabled
85 IO.puts("RUM enabled: #{rum_enabled}")
87 config :joken, default_signer: "yU8uHKq+yyAkZ11Hx//jcdacWc8yQ1bxAAGrplzB0Zwwjkp35v0RK9SO8WTPr6QZ"
89 config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock
91 config :pleroma, :modules, runtime_dir: "test/fixtures/modules"
93 config :pleroma, Pleroma.Gun, Pleroma.GunMock
95 config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: true
97 config :pleroma, Pleroma.Plugs.RemoteIp, enabled: false
99 if File.exists?("./config/test.secret.exs") do
100 import_config "test.secret.exs"
103 "You may want to create test.secret.exs to declare custom database connection parameters."