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.

80 lines
2.2KB

  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
  20. config :pleroma, :instance,
  21. email: "admin@example.com",
  22. notify_email: "noreply@example.com"
  23. # Configure your database
  24. config :pleroma, Pleroma.Repo,
  25. adapter: Ecto.Adapters.Postgres,
  26. username: "postgres",
  27. password: "postgres",
  28. database: "pleroma_test",
  29. hostname: System.get_env("DB_HOST") || "localhost",
  30. pool: Ecto.Adapters.SQL.Sandbox
  31. # Reduce hash rounds for testing
  32. config :pbkdf2_elixir, rounds: 1
  33. config :tesla, adapter: Tesla.Mock
  34. config :pleroma, :rich_media, enabled: false
  35. config :web_push_encryption, :vapid_details,
  36. subject: "mailto:administrator@example.com",
  37. public_key:
  38. "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
  39. private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
  40. config :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock
  41. config :pleroma_job_queue, disabled: true
  42. config :pleroma, Pleroma.ScheduledActivity,
  43. daily_user_limit: 2,
  44. total_user_limit: 3,
  45. enabled: false
  46. config :pleroma, :app_account_creation, max_requests: 5
  47. config :pleroma, :http_security, report_uri: "https://endpoint.com"
  48. config :pleroma, :http, send_user_agent: false
  49. rum_enabled = System.get_env("RUM_ENABLED") == "true"
  50. config :pleroma, :database, rum_enabled: rum_enabled
  51. IO.puts("RUM enabled: #{rum_enabled}")
  52. try do
  53. import_config "test.secret.exs"
  54. rescue
  55. _ ->
  56. IO.puts(
  57. "You may want to create test.secret.exs to declare custom database connection parameters."
  58. )
  59. end