mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
fix tests for redis cluster
This commit is contained in:
parent
79d8fced49
commit
e2f70aca1a
2 changed files with 12 additions and 0 deletions
|
@ -19,6 +19,12 @@ describe 'LockManager - releasing the lock', ()->
|
||||||
error:->
|
error:->
|
||||||
"redis-sharelatex":
|
"redis-sharelatex":
|
||||||
createClient : () => @client
|
createClient : () => @client
|
||||||
|
"settings-sharelatex": {
|
||||||
|
redis:
|
||||||
|
lock:
|
||||||
|
key_schema:
|
||||||
|
blockingKey: ({doc_id}) -> "Blocking:#{doc_id}"
|
||||||
|
}
|
||||||
"./Metrics": {inc: () ->}
|
"./Metrics": {inc: () ->}
|
||||||
@LockManager = SandboxedModule.require(modulePath, requires: mocks)
|
@LockManager = SandboxedModule.require(modulePath, requires: mocks)
|
||||||
@lockValue = "lock-value-stub"
|
@lockValue = "lock-value-stub"
|
||||||
|
|
|
@ -13,6 +13,12 @@ describe 'LockManager - trying the lock', ->
|
||||||
auth:->
|
auth:->
|
||||||
set: @set = sinon.stub()
|
set: @set = sinon.stub()
|
||||||
"./Metrics": {inc: () ->}
|
"./Metrics": {inc: () ->}
|
||||||
|
"settings-sharelatex": {
|
||||||
|
redis:
|
||||||
|
lock:
|
||||||
|
key_schema:
|
||||||
|
blockingKey: ({doc_id}) -> "Blocking:#{doc_id}"
|
||||||
|
}
|
||||||
|
|
||||||
@callback = sinon.stub()
|
@callback = sinon.stub()
|
||||||
@doc_id = "doc-id-123"
|
@doc_id = "doc-id-123"
|
||||||
|
|
Loading…
Reference in a new issue