Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.5KB

  1. use Mix.Config
  2. # We don't run a server during test. If one is required,
  3. # you can enable the server option below.
  4. config :pleroma, Pleroma.Web.Endpoint,
  5. http: [port: 4001],
  6. url: [port: 4001],
  7. server: true
  8. # Disable captha for tests
  9. config :pleroma, Pleroma.Captcha,
  10. # It should not be enabled for automatic tests
  11. enabled: false,
  12. # A fake captcha service for tests
  13. method: Pleroma.Captcha.Mock
  14. # Print only warnings and errors during test
  15. config :logger, level: :warn
  16. config :pleroma, :auth, oauth_consumer_strategies: []
  17. config :pleroma, Pleroma.Upload, filters: [], link_name: false
  18. config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads"
  19. config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Test, enabled: true
  20. config :pleroma, :instance,
  21. email: "admin@example.com",
  22. notify_email: "noreply@example.com",
  23. skip_thread_containment: false,
  24. federating: false
  25. config :pleroma, :activitypub, sign_object_fetches: false
  26. # Configure your database
  27. config :pleroma, Pleroma.Repo,
  28. adapter: Ecto.Adapters.Postgres,
  29. username: "postgres",
  30. password: "postgres",
  31. database: "pleroma_test",
  32. hostname: System.get_env("DB_HOST") || "localhost",
  33. pool: Ecto.Adapters.SQL.Sandbox
  34. # Reduce hash rounds for testing
  35. config :pbkdf2_elixir, rounds: 1
  36. config :tesla, adapter: Tesla.Mock
  37. config :pleroma, :rich_media,
  38. enabled: false,
  39. ignore_hosts: [],
  40. ignore_tld: ["local", "localdomain", "lan"]
  41. config :web_push_encryption, :vapid_details,
  42. subject: "mailto:administrator@example.com",
  43. public_key:
  44. "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
  45. private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
  46. config :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock
  47. config :pleroma_job_queue, disabled: true
  48. config :pleroma, Pleroma.ScheduledActivity,
  49. daily_user_limit: 2,
  50. total_user_limit: 3,
  51. enabled: false
  52. config :pleroma, :rate_limit,
  53. search: [{1000, 30}, {1000, 30}],
  54. app_account_creation: {10_000, 5},
  55. password_reset: {1000, 30}
  56. config :pleroma, :http_security, report_uri: "https://endpoint.com"
  57. config :pleroma, :http, send_user_agent: false
  58. rum_enabled = System.get_env("RUM_ENABLED") == "true"
  59. config :pleroma, :database, rum_enabled: rum_enabled
  60. IO.puts("RUM enabled: #{rum_enabled}")
  61. config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock
  62. try do
  63. import_config "test.secret.exs"
  64. rescue
  65. _ ->
  66. IO.puts(
  67. "You may want to create test.secret.exs to declare custom database connection parameters."
  68. )
  69. end