settings.test.saas.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. project_history: {
  18. sendProjectStructureOps: true,
  19. initializeHistoryForNewProjects: true,
  20. displayHistoryForNewProjects: true,
  21. url: `http://localhost:23054`,
  22. },
  23. recurly: {
  24. url: 'http://localhost:26034',
  25. subdomain: 'test',
  26. apiKey: 'private-nonsense',
  27. webhookUser: 'recurly',
  28. webhookPass: 'webhook',
  29. },
  30. tpdsworker: {
  31. // Disable tpdsworker in CI.
  32. url: undefined,
  33. },
  34. v1: {
  35. url: `http://localhost:25000`,
  36. user: 'overleaf',
  37. pass: 'password',
  38. },
  39. v1_history: {
  40. url: `http://localhost:23100/api`,
  41. user: 'overleaf',
  42. pass: 'password',
  43. },
  44. },
  45. oauthProviders: {
  46. provider: {
  47. name: 'provider',
  48. },
  49. collabratec: {
  50. name: 'collabratec',
  51. },
  52. google: {
  53. name: 'google',
  54. },
  55. },
  56. overleaf: {
  57. oauth: undefined,
  58. },
  59. saml: undefined,
  60. // Disable contentful module.
  61. contentful: undefined,
  62. }
  63. module.exports = baseApp.mergeWith(baseTest.mergeWith(overrides))
  64. for (const redisKey of Object.keys(module.exports.redis)) {
  65. module.exports.redis[redisKey].host = process.env.REDIS_HOST || 'localhost'
  66. }
  67. module.exports.mergeWith = function (overrides) {
  68. return merge(overrides, module.exports)
  69. }