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.

46 lines
1.3KB

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