overleaf/services/web/test/acceptance/config/settings.test.saas.js
Simon Detheridge 9953822175 Merge pull request #6661 from overleaf/spd-local-tests
Move acceptance test mocks to nonstandard ports and add options for running locally

GitOrigin-RevId: bd8f70ac8d80599daccc51cfe7b90a2ad8d8c3d8
2022-08-10 08:03:45 +00:00

82 lines
1.7 KiB
JavaScript

const { merge } = require('@overleaf/settings/merge')
const baseApp = require('../../../config/settings.overrides.saas')
const baseTest = require('./settings.test.defaults')
const httpAuthUser = 'sharelatex'
const httpAuthPass = 'password'
const httpAuthUsers = {}
httpAuthUsers[httpAuthUser] = httpAuthPass
const overrides = {
enableSubscriptions: true,
apis: {
thirdPartyDataStore: {
url: `http://localhost:23002`,
},
analytics: {
url: `http://localhost:23050`,
},
project_history: {
sendProjectStructureOps: true,
initializeHistoryForNewProjects: true,
displayHistoryForNewProjects: true,
url: `http://localhost:23054`,
},
recurly: {
url: 'http://localhost:26034',
subdomain: 'test',
apiKey: 'private-nonsense',
webhookUser: 'recurly',
webhookPass: 'webhook',
},
tpdsworker: {
// Disable tpdsworker in CI.
url: undefined,
},
v1: {
url: `http://localhost:25000`,
user: 'overleaf',
pass: 'password',
},
v1_history: {
url: `http://localhost:23100/api`,
user: 'overleaf',
pass: 'password',
},
},
oauthProviders: {
provider: {
name: 'provider',
},
collabratec: {
name: 'collabratec',
},
google: {
name: 'google',
},
},
overleaf: {
oauth: undefined,
},
saml: undefined,
// Disable contentful module.
contentful: undefined,
}
module.exports = baseApp.mergeWith(baseTest.mergeWith(overrides))
for (const redisKey of Object.keys(module.exports.redis)) {
module.exports.redis[redisKey].host = process.env.REDIS_HOST || 'localhost'
}
module.exports.mergeWith = function (overrides) {
return merge(overrides, module.exports)
}