mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 20:13:46 -05:00
b75d183cfc
[server-pro] add tests for upgrade process GitOrigin-RevId: eaa1486688cb2fa544adaaee16da04fd757a1b65
23 lines
509 B
TypeScript
23 lines
509 B
TypeScript
import { reconfigure } from './hostAdminClient'
|
|
|
|
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(100 * 1000)
|
|
await reconfigure({ pro, version, vars, withDataDir })
|
|
lastConfig = cfg
|
|
})
|
|
}
|
|
|
|
export { reconfigure }
|