logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

benchmark.exs (2669B)


  1. import 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. # Disable captha for tests
  8. config :pleroma, Pleroma.Captcha,
  9. # It should not be enabled for automatic tests
  10. enabled: false,
  11. # A fake captcha service for tests
  12. method: Pleroma.Captcha.Mock
  13. # Print only warnings and errors during test
  14. config :logger, level: :warning
  15. config :pleroma, :auth, oauth_consumer_strategies: []
  16. config :pleroma, Pleroma.Upload, filters: [], link_name: false
  17. config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads"
  18. config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Test, enabled: true
  19. config :pleroma, :instance,
  20. email: "admin@example.com",
  21. notify_email: "noreply@example.com",
  22. skip_thread_containment: false,
  23. federating: false,
  24. external_user_synchronization: false
  25. config :pleroma, :activitypub, sign_object_fetches: false
  26. # Configure your database
  27. config :pleroma, Pleroma.Repo,
  28. adapter: Ecto.Adapters.Postgres,
  29. username: "postgres",
  30. password: "postgres",
  31. database: "pleroma_benchmark",
  32. hostname: System.get_env("DB_HOST") || "localhost",
  33. port: System.get_env("DB_PORT") || "5432",
  34. pool_size: 10
  35. # Reduce hash rounds for testing
  36. config :pleroma, :password, iterations: 1
  37. config :tesla, adapter: Tesla.Mock
  38. config :pleroma, :rich_media,
  39. enabled: false,
  40. ignore_hosts: [],
  41. ignore_tld: ["local", "localdomain", "lan"]
  42. config :web_push_encryption, :vapid_details,
  43. subject: "mailto:administrator@example.com",
  44. public_key:
  45. "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
  46. private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
  47. config :pleroma, Pleroma.ScheduledActivity,
  48. daily_user_limit: 2,
  49. total_user_limit: 3,
  50. enabled: false
  51. config :pleroma, :rate_limit,
  52. search: [{1000, 30}, {1000, 30}],
  53. app_account_creation: {10_000, 5},
  54. password_reset: {1000, 30}
  55. config :pleroma, :http_security, report_uri: "https://endpoint.com"
  56. config :pleroma, :http, send_user_agent: false
  57. rum_enabled = System.get_env("RUM_ENABLED") == "true"
  58. config :pleroma, :database, rum_enabled: rum_enabled
  59. IO.puts("RUM enabled: #{rum_enabled}")
  60. config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock
  61. config :pleroma, Pleroma.Application,
  62. background_migrators: false,
  63. streamer_registry: false
  64. if File.exists?("./config/benchmark.secret.exs") do
  65. import_config "benchmark.secret.exs"
  66. else
  67. IO.puts(
  68. "You may want to create benchmark.secret.exs to declare custom database connection parameters."
  69. )
  70. end