Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

101 lines
2.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, :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, enabled: true
  20. config :pleroma, :instance,
  21. email: "admin@example.com",
  22. notify_email: "noreply@example.com",
  23. skip_thread_containment: false,
  24. federating: false,
  25. external_user_synchronization: false,
  26. static_dir: "test/instance_static/"
  27. config :pleroma, :activitypub, sign_object_fetches: false
  28. # Configure your database
  29. config :pleroma, Pleroma.Repo,
  30. adapter: Ecto.Adapters.Postgres,
  31. username: "postgres",
  32. password: "postgres",
  33. database: "pleroma_test",
  34. hostname: System.get_env("DB_HOST") || "localhost",
  35. pool: Ecto.Adapters.SQL.Sandbox
  36. # Reduce hash rounds for testing
  37. config :pbkdf2_elixir, rounds: 1
  38. config :tesla, adapter: Tesla.Mock
  39. config :pleroma, :rich_media,
  40. enabled: false,
  41. ignore_hosts: [],
  42. ignore_tld: ["local", "localdomain", "lan"]
  43. config :web_push_encryption, :vapid_details,
  44. subject: "mailto:administrator@example.com",
  45. public_key:
  46. "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
  47. private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
  48. config :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock
  49. config :pleroma, Oban,
  50. queues: false,
  51. prune: :disabled
  52. config :pleroma, Pleroma.Scheduler, jobs: []
  53. config :pleroma, Pleroma.ScheduledActivity,
  54. daily_user_limit: 2,
  55. total_user_limit: 3,
  56. enabled: false
  57. config :pleroma, :rate_limit,
  58. search: [{1000, 30}, {1000, 30}],
  59. app_account_creation: {10_000, 5},
  60. password_reset: {1000, 30},
  61. ap_routes: nil
  62. config :pleroma, :http_security, report_uri: "https://endpoint.com"
  63. config :pleroma, :http, send_user_agent: false
  64. rum_enabled = System.get_env("RUM_ENABLED") == "true"
  65. config :pleroma, :database, rum_enabled: rum_enabled
  66. IO.puts("RUM enabled: #{rum_enabled}")
  67. config :joken, default_signer: "yU8uHKq+yyAkZ11Hx//jcdacWc8yQ1bxAAGrplzB0Zwwjkp35v0RK9SO8WTPr6QZ"
  68. config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock
  69. if File.exists?("./config/test.secret.exs") do
  70. import_config "test.secret.exs"
  71. else
  72. IO.puts(
  73. "You may want to create test.secret.exs to declare custom database connection parameters."
  74. )
  75. end