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.

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