added texliveImageNameOveride

This commit is contained in:
Henry Oswald
2018-07-13 10:37:22 +01:00
parent a75cec7d52
commit a960614eb4
3 changed files with 25 additions and 1 deletions

View File

@@ -16,10 +16,12 @@ describe "RequestParser", ->
compile:
token: "token-123"
options:
imageName: "basicImageName/here:2017-1"
compiler: "pdflatex"
timeout: 42
resources: []
@RequestParser = SandboxedModule.require modulePath
@RequestParser = SandboxedModule.require modulePath, requires:
"settings-sharelatex": @settings = {}
afterEach ->
tk.reset()
@@ -57,6 +59,21 @@ describe "RequestParser", ->
it "should set the compiler to pdflatex by default", ->
@data.compiler.should.equal "pdflatex"
describe "with imageName set", ->
beforeEach ->
@RequestParser.parse @validRequest, (error, @data) =>
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