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.

57 lines
1.6KB

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