mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-29 12:01:32 +02:00
Merge pull request #20698 from overleaf/jpa-texlive-check-pro
[web] exit early from check-texlive-images when running in CE GitOrigin-RevId: 7266203715b24ea957662647a90638e9198bc6c1
This commit is contained in:
@@ -524,6 +524,7 @@ describe('ServerCEScripts', function () {
|
||||
SANDBOXED_COMPILES,
|
||||
TEX_LIVE_DOCKER_IMAGE,
|
||||
ALL_TEX_LIVE_DOCKER_IMAGES,
|
||||
OVERLEAF_IS_SERVER_PRO = true,
|
||||
}) {
|
||||
let cmd = `SANDBOXED_COMPILES=${SANDBOXED_COMPILES ? 'true' : 'false'}`
|
||||
if (TEX_LIVE_DOCKER_IMAGE) {
|
||||
@@ -532,6 +533,9 @@ describe('ServerCEScripts', function () {
|
||||
if (ALL_TEX_LIVE_DOCKER_IMAGES) {
|
||||
cmd += ` ALL_TEX_LIVE_DOCKER_IMAGES='${ALL_TEX_LIVE_DOCKER_IMAGES}'`
|
||||
}
|
||||
if (OVERLEAF_IS_SERVER_PRO === true) {
|
||||
cmd += ` OVERLEAF_IS_SERVER_PRO=${OVERLEAF_IS_SERVER_PRO}`
|
||||
}
|
||||
return (
|
||||
cmd + ' node modules/server-ce-scripts/scripts/check-texlive-images'
|
||||
)
|
||||
@@ -544,6 +548,18 @@ describe('ServerCEScripts', function () {
|
||||
await user.createProject('test-project')
|
||||
})
|
||||
|
||||
describe('when running in CE', function () {
|
||||
beforeEach('run script', function () {
|
||||
output = run(buildCheckTexLiveCmd({ OVERLEAF_IS_SERVER_PRO: false }))
|
||||
})
|
||||
|
||||
it('should skip checks', function () {
|
||||
expect(output).to.include(
|
||||
'Running Overleaf Community Edition, skipping TexLive checks'
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
describe('when sandboxed compiles are disabled', function () {
|
||||
beforeEach('run script', function () {
|
||||
output = run(buildCheckTexLiveCmd({ SANDBOXED_COMPILES: false }))
|
||||
|
||||
Reference in New Issue
Block a user