Merge pull request #509 from sharelatex/ja-fix-clsi-cookie-cluster
Don't try to set the server id if it isn't returned in the response
This commit is contained in:
@@ -105,13 +105,18 @@ describe "ClsiCookieManager", ->
|
||||
serverId.should.equal "clsi-8"
|
||||
done()
|
||||
|
||||
|
||||
it "should not set the server id if clsiCookies are not enabled", (done)->
|
||||
delete @settings.clsiCookie.key
|
||||
@ClsiCookieManager = SandboxedModule.require modulePath, requires:@requires
|
||||
@ClsiCookieManager.setServerId @project_id, @response, (err, serverId)=>
|
||||
@redisMulti.exec.called.should.equal false
|
||||
done()
|
||||
|
||||
it "should not set the server id there is no server id in the response", (done)->
|
||||
@ClsiCookieManager._parseServerIdFromResponse = sinon.stub().returns(null)
|
||||
@ClsiCookieManager.setServerId @project_id, @response, (err, serverId)=>
|
||||
@redisMulti.exec.called.should.equal false
|
||||
done()
|
||||
|
||||
it "should also set in the secondary if secondary redis is enabled", (done) ->
|
||||
@redisSecondaryMulti =
|
||||
|
||||
Reference in New Issue
Block a user