fix tests for redis cluster

This commit is contained in:
Brian Gough 2017-05-08 16:02:40 +01:00
parent 79d8fced49
commit e2f70aca1a
2 changed files with 12 additions and 0 deletions

View file

@ -19,6 +19,12 @@ describe 'LockManager - releasing the lock', ()->
error:->
"redis-sharelatex":
createClient : () => @client
"settings-sharelatex": {
redis:
lock:
key_schema:
blockingKey: ({doc_id}) -> "Blocking:#{doc_id}"
}
"./Metrics": {inc: () ->}
@LockManager = SandboxedModule.require(modulePath, requires: mocks)
@lockValue = "lock-value-stub"

View file

@ -13,6 +13,12 @@ describe 'LockManager - trying the lock', ->
auth:->
set: @set = sinon.stub()
"./Metrics": {inc: () ->}
"settings-sharelatex": {
redis:
lock:
key_schema:
blockingKey: ({doc_id}) -> "Blocking:#{doc_id}"
}
@callback = sinon.stub()
@doc_id = "doc-id-123"