diff --git a/services/clsi/app/coffee/RequestParser.coffee b/services/clsi/app/coffee/RequestParser.coffee index 78246169cb..cabbac38a4 100644 --- a/services/clsi/app/coffee/RequestParser.coffee +++ b/services/clsi/app/coffee/RequestParser.coffee @@ -69,10 +69,6 @@ module.exports = RequestParser = sanitizedRootResourcePath = RequestParser._sanitizePath(rootResourcePath) response.rootResourcePath = RequestParser._checkPath(sanitizedRootResourcePath) - if settings.texliveImageNameOveride? and compile.options?.imageName? - tag = compile.options.imageName.split(":")[1] - response.imageName = "#{settings.texliveImageNameOveride}:#{tag}" - for resource in response.resources if resource.path == originalRootResourcePath resource.path = sanitizedRootResourcePath diff --git a/services/clsi/test/unit/coffee/DockerRunnerTests.coffee b/services/clsi/test/unit/coffee/DockerRunnerTests.coffee index 5a697e2b8c..456f52b4b9 100644 --- a/services/clsi/test/unit/coffee/DockerRunnerTests.coffee +++ b/services/clsi/test/unit/coffee/DockerRunnerTests.coffee @@ -135,6 +135,16 @@ describe "DockerRunner", -> @DockerRunner._getContainerOptions .calledWith(@command_with_dir, @defaultImage, @volumes, @timeout) .should.equal true + + describe "with image override", -> + beforeEach -> + @Settings.texliveImageNameOveride = "overrideimage/here" + @DockerRunner._runAndWaitForContainer = sinon.stub().callsArgWith(3, null, @output = "mock-output") + @DockerRunner.run @project_id, @command, @directory, @image, @timeout, @env, @callback + + it "should use the override and keep the tag", -> + image = @DockerRunner._getContainerOptions.args[0][1] + image.should.equal "overrideimage/here:2016.2" describe "_runAndWaitForContainer", -> beforeEach -> diff --git a/services/clsi/test/unit/coffee/RequestParserTests.coffee b/services/clsi/test/unit/coffee/RequestParserTests.coffee index 04405ac6a3..f63bc55e3d 100644 --- a/services/clsi/test/unit/coffee/RequestParserTests.coffee +++ b/services/clsi/test/unit/coffee/RequestParserTests.coffee @@ -66,14 +66,6 @@ describe "RequestParser", -> it "should set the imageName", -> @data.imageName.should.equal "basicImageName/here:2017-1" - describe "with texliveImageNameOveride set", -> - beforeEach -> - @settings.texliveImageNameOveride = "usethisoveride/overhere" - @RequestParser.parse @validRequest, (error, @data) => - - it "should override the image path", -> - @data.imageName.should.equal "usethisoveride/overhere:2017-1" - describe "without a timeout specified", -> beforeEach -> delete @validRequest.compile.options.timeout