From 14cbf4f1c86d4423f41bed7ae4f79989cc9d29f6 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Thu, 2 Jun 2016 13:11:20 +0100 Subject: [PATCH] removed priority url from proxy to clsi --- .../Features/Compile/CompileController.coffee | 5 +-- .../Compile/CompileControllerTests.coffee | 42 ------------------- 2 files changed, 1 insertion(+), 46 deletions(-) diff --git a/services/web/app/coffee/Features/Compile/CompileController.coffee b/services/web/app/coffee/Features/Compile/CompileController.coffee index 5e06af927f..ed6f5f56cd 100755 --- a/services/web/app/coffee/Features/Compile/CompileController.coffee +++ b/services/web/app/coffee/Features/Compile/CompileController.coffee @@ -115,10 +115,7 @@ module.exports = CompileController = if err? logger.err err:err, "error getting cookie jar for clsi request" return callback(err) - if limits.compileGroup == "priority" - compilerUrl = Settings.apis.clsi_priority.url - else - compilerUrl = Settings.apis.clsi.url + compilerUrl = Settings.apis.clsi.url url = "#{compilerUrl}#{url}" logger.log url: url, "proxying to CLSI" oneMinute = 60 * 1000 diff --git a/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee b/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee index 6bae5803c4..c724798a3e 100644 --- a/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee +++ b/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee @@ -206,16 +206,6 @@ describe "CompileController", -> @CompileManager.getProjectCompileLimits = sinon.stub().callsArgWith(1, null, {compileGroup: "priority"}) @CompileController.proxyToClsi(@project_id, @url = "/test", @req, @res, @next) - it "should proxy to the priority url if the user has the feature", ()-> - @request - .calledWith( - jar:@jar - method: @req.method - url: "#{@settings.apis.clsi_priority.url}#{@url}", - timeout: 60 * 1000 - ) - .should.equal true - describe "user with standard priority via query string", -> beforeEach -> @req.query = {compileGroup: 'standard'} @@ -239,20 +229,6 @@ describe "CompileController", -> it "should bind an error handle to the request proxy", -> @proxy.on.calledWith("error").should.equal true - describe "user with priority compile via query string", -> - beforeEach -> - @req.query = {compileGroup: 'priority'} - @CompileController.proxyToClsi(@project_id, @url = "/test", @req, @res, @next) - - it "should proxy to the priority url if the user has the feature", ()-> - @request - .calledWith( - jar:@jar - method: @req.method - url: "#{@settings.apis.clsi_priority.url}#{@url}", - timeout: 60 * 1000 - ) - .should.equal true describe "user with non-existent priority via query string", -> beforeEach -> @@ -316,25 +292,7 @@ describe "CompileController", -> it "should bind an error handle to the request proxy", -> @proxy.on.calledWith("error").should.equal true - describe "user with priority compile", -> - beforeEach -> - @CompileManager.getProjectCompileLimits = sinon.stub().callsArgWith(1, null, {compileGroup: "priority"}) - @CompileController.proxyToClsi(@project_id, @url = "/test", @req, @res, @next) - it "should proxy to the priority url if the user has the feature", ()-> - @request - .calledWith( - jar:@jar - method: @req.method - url: "#{@settings.apis.clsi_priority.url}#{@url}", - timeout: 60 * 1000 - headers: { - 'Range': '123-456' - 'If-Range': 'abcdef' - 'If-Modified-Since': 'Mon, 15 Dec 2014 15:23:56 GMT' - } - ) - .should.equal true describe "user with build parameter via query string", -> beforeEach ->