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.

135 lines
3.5KB

  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 :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock
  66. config :pleroma, Oban,
  67. queues: false,
  68. crontab: false,
  69. plugins: false
  70. config :pleroma, Pleroma.ScheduledActivity,
  71. daily_user_limit: 2,
  72. total_user_limit: 3,
  73. enabled: false
  74. config :pleroma, :rate_limit, %{}
  75. config :pleroma, :http_security, report_uri: "https://endpoint.com"
  76. config :pleroma, :http, send_user_agent: false
  77. rum_enabled = System.get_env("RUM_ENABLED") == "true"
  78. config :pleroma, :database, rum_enabled: rum_enabled
  79. IO.puts("RUM enabled: #{rum_enabled}")
  80. config :joken, default_signer: "yU8uHKq+yyAkZ11Hx//jcdacWc8yQ1bxAAGrplzB0Zwwjkp35v0RK9SO8WTPr6QZ"
  81. config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock
  82. config :pleroma, :modules, runtime_dir: "test/fixtures/modules"
  83. config :pleroma, Pleroma.Gun, Pleroma.GunMock
  84. config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: true
  85. config :pleroma, Pleroma.Plugs.RemoteIp, enabled: false
  86. config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: true
  87. config :pleroma, :instances_favicons, enabled: false
  88. config :pleroma, Pleroma.Uploaders.S3,
  89. bucket: nil,
  90. streaming_enabled: true,
  91. public_endpoint: nil
  92. config :tzdata, :autoupdate, :disabled
  93. config :pleroma, :mrf, policies: []
  94. if File.exists?("./config/test.secret.exs") do
  95. import_config "test.secret.exs"
  96. else
  97. IO.puts(
  98. "You may want to create test.secret.exs to declare custom database connection parameters."
  99. )
  100. end