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.

66 lines
1.8KB

  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, Pleroma.Upload, filters: [], link_name: false
  17. config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads"
  18. config :pleroma, Pleroma.Mailer, adapter: Swoosh.Adapters.Test
  19. # Configure your database
  20. config :pleroma, Pleroma.Repo,
  21. adapter: Ecto.Adapters.Postgres,
  22. username: "postgres",
  23. password: "postgres",
  24. database: "pleroma_test",
  25. hostname: System.get_env("DB_HOST") || "localhost",
  26. pool: Ecto.Adapters.SQL.Sandbox
  27. # Reduce hash rounds for testing
  28. config :pbkdf2_elixir, rounds: 1
  29. config :pleroma, :websub, Pleroma.Web.WebsubMock
  30. config :pleroma, :ostatus, Pleroma.Web.OStatusMock
  31. config :tesla, adapter: Tesla.Mock
  32. config :pleroma, :rich_media, enabled: false
  33. config :web_push_encryption, :vapid_details,
  34. subject: "mailto:administrator@example.com",
  35. public_key:
  36. "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
  37. private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
  38. config :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock
  39. config :pleroma_job_queue, disabled: true
  40. config :pleroma, Pleroma.ScheduledActivity,
  41. daily_user_limit: 2,
  42. total_user_limit: 3,
  43. enabled: false
  44. try do
  45. import_config "test.secret.exs"
  46. rescue
  47. _ ->
  48. IO.puts(
  49. "You may want to create test.secret.exs to declare custom database connection parameters."
  50. )
  51. end