settings.test.saas.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 = 'sharelatex'
  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. overleaf: {
  46. oauth: undefined,
  47. },
  48. saml: undefined,
  49. // Disable contentful module.
  50. contentful: undefined,
  51. }
  52. module.exports = baseApp.mergeWith(baseTest.mergeWith(overrides))
  53. for (const redisKey of Object.keys(module.exports.redis)) {
  54. module.exports.redis[redisKey].host = process.env.REDIS_HOST || 'localhost'
  55. }
  56. module.exports.mergeWith = function (overrides) {
  57. return merge(overrides, module.exports)
  58. }