mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-06 15:49:01 +02:00
Merge pull request #30813 from overleaf/bg-fix-compile-from-redis
exclude buildId from project state hash GitOrigin-RevId: da7424378422bec348adeaa5da0fe2d3581744d9
This commit is contained in:
@@ -47,7 +47,7 @@ export default {
|
||||
const object = options || {}
|
||||
for (const key in object) {
|
||||
const value = object[key]
|
||||
if (!['isAutoCompile'].includes(key)) {
|
||||
if (!['isAutoCompile', 'buildId'].includes(key)) {
|
||||
result.push(`option ${key}:${value}`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,11 @@ describe('ClsiStateManager', function () {
|
||||
|
||||
ctx.ClsiStateManager = (await import(modulePath)).default
|
||||
ctx.project = 'project'
|
||||
ctx.options = { draft: true, isAutoCompile: false }
|
||||
ctx.options = {
|
||||
draft: true,
|
||||
isAutoCompile: false,
|
||||
buildId: 'original-build-id',
|
||||
}
|
||||
ctx.callback = sinon.stub()
|
||||
})
|
||||
|
||||
@@ -189,5 +193,17 @@ describe('ClsiStateManager', function () {
|
||||
).to.equal(ctx.hash0)
|
||||
})
|
||||
})
|
||||
|
||||
describe('when the buildId option is changed', function () {
|
||||
beforeEach(function (ctx) {
|
||||
ctx.options.buildId = 'new-build-id'
|
||||
})
|
||||
|
||||
it('should return the same hash value', function (ctx) {
|
||||
expect(
|
||||
ctx.ClsiStateManager.computeHash(ctx.project, ctx.options)
|
||||
).to.equal(ctx.hash0)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user