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.

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