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.

131 lines
3.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. 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, :console,
  16. level: :warn,
  17. format: "\n[$level] $message\n"
  18. config :pleroma, :auth, oauth_consumer_strategies: []
  19. config :pleroma, Pleroma.Upload,
  20. filters: [],
  21. link_name: false,
  22. default_description: :filename
  23. config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads"
  24. config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Test, enabled: true
  25. config :pleroma, :instance,
  26. email: "admin@example.com",
  27. notify_email: "noreply@example.com",
  28. skip_thread_containment: false,
  29. federating: false,
  30. external_user_synchronization: false,
  31. static_dir: "test/instance_static/"
  32. config :pleroma, :activitypub, sign_object_fetches: false
  33. # Configure your database
  34. config :pleroma, Pleroma.Repo,
  35. adapter: Ecto.Adapters.Postgres,
  36. username: "postgres",
  37. password: "postgres",
  38. database: "pleroma_test",
  39. hostname: System.get_env("DB_HOST") || "localhost",
  40. pool: Ecto.Adapters.SQL.Sandbox
  41. # Reduce hash rounds for testing
  42. config :pbkdf2_elixir, rounds: 1
  43. config :tesla, adapter: Tesla.Mock
  44. config :pleroma, :rich_media,
  45. enabled: false,
  46. ignore_hosts: [],
  47. ignore_tld: ["local", "localdomain", "lan"]
  48. config :pleroma, :instance,
  49. multi_factor_authentication: [
  50. totp: [
  51. # digits 6 or 8
  52. digits: 6,
  53. period: 30
  54. ],
  55. backup_codes: [
  56. number: 2,
  57. length: 6
  58. ]
  59. ]
  60. config :web_push_encryption, :vapid_details,
  61. subject: "mailto:administrator@example.com",
  62. public_key:
  63. "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
  64. private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
  65. config :pleroma, Oban,
  66. queues: false,
  67. crontab: false,
  68. plugins: false
  69. config :pleroma, Pleroma.ScheduledActivity,
  70. daily_user_limit: 2,
  71. total_user_limit: 3,
  72. enabled: false
  73. config :pleroma, :rate_limit, %{}
  74. config :pleroma, :http_security, report_uri: "https://endpoint.com"
  75. config :pleroma, :http, send_user_agent: false
  76. rum_enabled = System.get_env("RUM_ENABLED") == "true"
  77. config :pleroma, :database, rum_enabled: rum_enabled
  78. IO.puts("RUM enabled: #{rum_enabled}")
  79. config :joken, default_signer: "yU8uHKq+yyAkZ11Hx//jcdacWc8yQ1bxAAGrplzB0Zwwjkp35v0RK9SO8WTPr6QZ"
  80. config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock
  81. config :pleroma, :modules, runtime_dir: "test/fixtures/modules"
  82. config :pleroma, Pleroma.Gun, Pleroma.GunMock
  83. config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: true
  84. config :pleroma, Pleroma.Web.Plugs.RemoteIp, enabled: false
  85. config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: true
  86. config :pleroma, Pleroma.Uploaders.S3,
  87. bucket: nil,
  88. streaming_enabled: true,
  89. public_endpoint: nil
  90. config :tzdata, :autoupdate, :disabled
  91. config :pleroma, :mrf, policies: []
  92. if File.exists?("./config/test.secret.exs") do
  93. import_config "test.secret.exs"
  94. else
  95. IO.puts(
  96. "You may want to create test.secret.exs to declare custom database connection parameters."
  97. )
  98. end