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.

53 lines
1.4KB

  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. enabled: true,
  11. # A fake captcha service for tests
  12. method: Pleroma.Captcha.Mock
  13. # Print only warnings and errors during test
  14. config :logger, level: :warn
  15. config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads"
  16. config :pleroma, Pleroma.Mailer, adapter: Swoosh.Adapters.Test
  17. # Configure your database
  18. config :pleroma, Pleroma.Repo,
  19. adapter: Ecto.Adapters.Postgres,
  20. username: "postgres",
  21. password: "postgres",
  22. database: "pleroma_test",
  23. hostname: System.get_env("DB_HOST") || "localhost",
  24. pool: Ecto.Adapters.SQL.Sandbox
  25. # Reduce hash rounds for testing
  26. config :pbkdf2_elixir, rounds: 1
  27. config :pleroma, :websub, Pleroma.Web.WebsubMock
  28. config :pleroma, :ostatus, Pleroma.Web.OStatusMock
  29. config :tesla, adapter: Tesla.Mock
  30. config :web_push_encryption, :vapid_details,
  31. subject: "mailto:administrator@example.com",
  32. public_key:
  33. "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
  34. private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
  35. try do
  36. import_config "test.secret.exs"
  37. rescue
  38. _ ->
  39. IO.puts(
  40. "You may want to create test.secret.exs to declare custom database connection parameters."
  41. )
  42. end