mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
30a64401b2
* [SP] e2e tests for SAML/LDAP * [server-pro] tests: prefetch ldap and saml docker images --------- Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com> GitOrigin-RevId: 64298df3f3941a8267a8aacd431757d21b43c75b
31 lines
633 B
TypeScript
31 lines
633 B
TypeScript
import { reconfigure } from './hostAdminClient'
|
|
|
|
export const STARTUP_TIMEOUT =
|
|
parseInt(Cypress.env('STARTUP_TIMEOUT'), 10) || 120_000
|
|
|
|
let lastConfig: string
|
|
|
|
export function startWith({
|
|
pro = false,
|
|
version = 'latest',
|
|
vars = {},
|
|
varsFn = () => ({}),
|
|
withDataDir = false,
|
|
}) {
|
|
before(async function () {
|
|
Object.assign(vars, varsFn())
|
|
const cfg = JSON.stringify({
|
|
pro,
|
|
version,
|
|
vars,
|
|
withDataDir,
|
|
})
|
|
if (lastConfig === cfg) return
|
|
|
|
this.timeout(STARTUP_TIMEOUT)
|
|
await reconfigure({ pro, version, vars, withDataDir })
|
|
lastConfig = cfg
|
|
})
|
|
}
|
|
|
|
export { reconfigure }
|