diff --git a/services/web/test/UnitTests/coffee/Compile/CompileManagerTests.coffee b/services/web/test/UnitTests/coffee/Compile/CompileManagerTests.coffee index c284341bf2..8b6149eaa8 100644 --- a/services/web/test/UnitTests/coffee/Compile/CompileManagerTests.coffee +++ b/services/web/test/UnitTests/coffee/Compile/CompileManagerTests.coffee @@ -15,7 +15,7 @@ describe "CompileManager", -> @CompileManager = SandboxedModule.require modulePath, requires: "settings-sharelatex": @settings = redis: web: {host: "localhost", port: 42} - "redis": + "redis-sharelatex": createClient: () => @rclient = { auth: () -> } "../DocumentUpdater/DocumentUpdaterHandler": @DocumentUpdaterHandler = {} "../Project/ProjectRootDocManager": @ProjectRootDocManager = {} diff --git a/services/web/test/UnitTests/coffee/ConnectedUsers/ConnectedUsersManagerTests.coffee b/services/web/test/UnitTests/coffee/ConnectedUsers/ConnectedUsersManagerTests.coffee index 762aaa520d..365034645d 100644 --- a/services/web/test/UnitTests/coffee/ConnectedUsers/ConnectedUsersManagerTests.coffee +++ b/services/web/test/UnitTests/coffee/ConnectedUsers/ConnectedUsersManagerTests.coffee @@ -34,7 +34,7 @@ describe "ConnectedUsersManager", -> @ConnectedUsersManager = SandboxedModule.require modulePath, requires: "settings-sharelatex":@settings "logger-sharelatex": log:-> - "redis": createClient:=> + "redis-sharelatex": createClient:=> return @rClient @client_id = "32132132" @project_id = "dskjh2u21321" diff --git a/services/web/test/UnitTests/coffee/DocumentUpdater/DocumentUpdaterHandlerTests.coffee b/services/web/test/UnitTests/coffee/DocumentUpdater/DocumentUpdaterHandlerTests.coffee index f0bd52f03e..484c78b6ad 100644 --- a/services/web/test/UnitTests/coffee/DocumentUpdater/DocumentUpdaterHandlerTests.coffee +++ b/services/web/test/UnitTests/coffee/DocumentUpdater/DocumentUpdaterHandlerTests.coffee @@ -31,7 +31,7 @@ describe 'Flushing documents :', -> '../Project/ProjectEntityHandler':@projectEntityHandler "../../models/Project": Project: @Project={} '../../Features/Project/ProjectLocator':{} - 'redis' : createClient: () => @rclient + 'redis-sharelatex' : createClient: () => @rclient describe 'queueChange', -> beforeEach -> diff --git a/services/web/test/UnitTests/coffee/DocumentUpdater/GetNumberOfDocsInMemoryTests.coffee b/services/web/test/UnitTests/coffee/DocumentUpdater/GetNumberOfDocsInMemoryTests.coffee index 57657a6e0e..213fd2257b 100644 --- a/services/web/test/UnitTests/coffee/DocumentUpdater/GetNumberOfDocsInMemoryTests.coffee +++ b/services/web/test/UnitTests/coffee/DocumentUpdater/GetNumberOfDocsInMemoryTests.coffee @@ -10,7 +10,7 @@ describe "getNumberOfDocsInMemory", -> @noOfDocs = 42 @callback = sinon.stub() @DocumentUpdateHandler = SandboxedModule.require modulePath, requires: - "redis" : + "redis-sharelatex" : createClient: () -> auth:-> "soa-req-id": null diff --git a/services/web/test/UnitTests/coffee/Dropbox/DropboxWebhookHandlerTests.coffee b/services/web/test/UnitTests/coffee/Dropbox/DropboxWebhookHandlerTests.coffee index 60519532e2..7c6530961c 100644 --- a/services/web/test/UnitTests/coffee/Dropbox/DropboxWebhookHandlerTests.coffee +++ b/services/web/test/UnitTests/coffee/Dropbox/DropboxWebhookHandlerTests.coffee @@ -10,7 +10,7 @@ describe 'DropboxWebhookHandler', -> @DropboxWebhookHandler = SandboxedModule.require modulePath, requires: "../../models/User": User: @User = {} "../ThirdPartyDataStore/TpdsUpdateSender": @TpdsUpdateSender = {} - "redis": + "redis-sharelatex": createClient: () => @rclient = auth: sinon.stub() 'settings-sharelatex': redis: web: {} diff --git a/services/web/test/UnitTests/coffee/Editor/EditorControllerTests.coffee b/services/web/test/UnitTests/coffee/Editor/EditorControllerTests.coffee index d9c7f3ae73..50f65f054b 100644 --- a/services/web/test/UnitTests/coffee/Editor/EditorControllerTests.coffee +++ b/services/web/test/UnitTests/coffee/Editor/EditorControllerTests.coffee @@ -75,7 +75,7 @@ describe "EditorController", -> "../../infrastructure/Metrics": @Metrics = { inc: sinon.stub() } "../TrackChanges/TrackChangesManager": @TrackChangesManager = {} "../ConnectedUsers/ConnectedUsersManager":@ConnectedUsersManager - 'redis':createClient:-> auth:-> + 'redis-sharelatex':createClient:-> auth:-> "logger-sharelatex": @logger = log: sinon.stub() err: sinon.stub() diff --git a/services/web/test/UnitTests/coffee/Editor/EditorRealTimeControllerTests.coffee b/services/web/test/UnitTests/coffee/Editor/EditorRealTimeControllerTests.coffee index ef66601b3d..9bb1fb3a04 100644 --- a/services/web/test/UnitTests/coffee/Editor/EditorRealTimeControllerTests.coffee +++ b/services/web/test/UnitTests/coffee/Editor/EditorRealTimeControllerTests.coffee @@ -6,7 +6,7 @@ modulePath = require('path').join __dirname, '../../../../app/js/Features/Editor describe "EditorRealTimeController", -> beforeEach -> @EditorRealTimeController = SandboxedModule.require modulePath, requires: - "redis": + "redis-sharelatex": createClient: () -> auth:-> "../../infrastructure/Server" : io: @io = {} diff --git a/services/web/test/UnitTests/coffee/Editor/EditorUpdatesControllerTests.coffee b/services/web/test/UnitTests/coffee/Editor/EditorUpdatesControllerTests.coffee index befc9a2c0a..74d6807bb5 100644 --- a/services/web/test/UnitTests/coffee/Editor/EditorUpdatesControllerTests.coffee +++ b/services/web/test/UnitTests/coffee/Editor/EditorUpdatesControllerTests.coffee @@ -17,7 +17,7 @@ describe "EditorUpdatesController", -> "../DocumentUpdater/DocumentUpdaterHandler" : @DocumentUpdaterHandler = {} "../../infrastructure/Metrics" : @metrics = { set: sinon.stub(), inc: sinon.stub() } "../../infrastructure/Server" : io: @io = {} - "redis" : + "redis-sharelatex" : createClient: ()=> @rclient = {auth:->} diff --git a/services/web/test/UnitTests/coffee/PasswordReset/PasswordResetTokenHandlerTests.coffee b/services/web/test/UnitTests/coffee/PasswordReset/PasswordResetTokenHandlerTests.coffee index 1cbbe7938c..bbc9ff9ea6 100644 --- a/services/web/test/UnitTests/coffee/PasswordReset/PasswordResetTokenHandlerTests.coffee +++ b/services/web/test/UnitTests/coffee/PasswordReset/PasswordResetTokenHandlerTests.coffee @@ -23,7 +23,7 @@ describe "PasswordResetTokenHandler", -> exec:sinon.stub() self = @ @PasswordResetTokenHandler = SandboxedModule.require modulePath, requires: - "redis" : + "redis-sharelatex" : createClient: => auth:-> multi: -> return self.redisMulti diff --git a/services/web/test/UnitTests/coffee/Security/LoginRateLimiter.coffee b/services/web/test/UnitTests/coffee/Security/LoginRateLimiter.coffee index 2d2be90126..19823030b8 100644 --- a/services/web/test/UnitTests/coffee/Security/LoginRateLimiter.coffee +++ b/services/web/test/UnitTests/coffee/Security/LoginRateLimiter.coffee @@ -25,7 +25,7 @@ describe "LoginRateLimiter", -> exec: @execStub @LoginRateLimiter = SandboxedModule.require modulePath, requires: - 'redis' : createClient: () => @rclient + 'redis-sharelatex' : createClient: () => @rclient describe "processLoginRequest", -> diff --git a/services/web/test/UnitTests/coffee/infrastructure/RateLimterTests.coffee b/services/web/test/UnitTests/coffee/infrastructure/RateLimterTests.coffee index adbedd8c86..21c0d96f4f 100644 --- a/services/web/test/UnitTests/coffee/infrastructure/RateLimterTests.coffee +++ b/services/web/test/UnitTests/coffee/infrastructure/RateLimterTests.coffee @@ -27,7 +27,7 @@ describe "FileStoreHandler", -> @limiter = SandboxedModule.require modulePath, requires: "settings-sharelatex":@settings "logger-sharelatex" : @logger = {log:sinon.stub(), err:sinon.stub()} - "redis": @redis + "redis-sharelatex": @redis "redback": use: => @redback @endpointName = "compiles"