settings.test.saas.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. const { merge } = require('@overleaf/settings/merge')
  2. const baseApp = require('../../../config/settings.overrides.saas')
  3. const baseTest = require('./settings.test.defaults')
  4. const httpAuthUser = 'overleaf'
  5. const httpAuthPass = 'password'
  6. const httpAuthUsers = {}
  7. httpAuthUsers[httpAuthUser] = httpAuthPass
  8. const overrides = {
  9. enableSubscriptions: true,
  10. apis: {
  11. thirdPartyDataStore: {
  12. url: `http://localhost:23002`,
  13. },
  14. analytics: {
  15. url: `http://localhost:23050`,
  16. },
  17. recurly: {
  18. url: 'http://localhost:26034',
  19. subdomain: 'test',
  20. apiKey: 'private-nonsense',
  21. webhookUser: 'recurly',
  22. webhookPass: 'webhook',
  23. },
  24. tpdsworker: {
  25. // Disable tpdsworker in CI.
  26. url: undefined,
  27. },
  28. v1: {
  29. url: `http://localhost:25000`,
  30. user: 'overleaf',
  31. pass: 'password',
  32. },
  33. },
  34. oauthProviders: {
  35. provider: {
  36. name: 'provider',
  37. },
  38. collabratec: {
  39. name: 'collabratec',
  40. },
  41. google: {
  42. name: 'google',
  43. },
  44. },
  45. saml: undefined,
  46. // Disable contentful module.
  47. contentful: undefined,
  48. twoFactorAuthentication: {
  49. accessTokenEncryptorOptions: {
  50. cipherPasswords: {
  51. '2023.1-v3': 'this-is-a-weak-secret-for-tests-web-2023.1-v3',
  52. },
  53. },
  54. },
  55. }
  56. module.exports = baseApp.mergeWith(baseTest.mergeWith(overrides))
  57. for (const redisKey of Object.keys(module.exports.redis)) {
  58. module.exports.redis[redisKey].host = process.env.REDIS_HOST || 'localhost'
  59. }
  60. module.exports.mergeWith = function (overrides) {
  61. return merge(overrides, module.exports)
  62. }