change override to leave image name so it works for wl_texlive
This commit is contained in:
@@ -39,8 +39,8 @@ module.exports = DockerRunner =
|
|||||||
image = Settings.clsi.docker.image
|
image = Settings.clsi.docker.image
|
||||||
|
|
||||||
if Settings.texliveImageNameOveride?
|
if Settings.texliveImageNameOveride?
|
||||||
tag = image.split(":")[1]
|
img = image.split("/")
|
||||||
image = "#{Settings.texliveImageNameOveride}:#{tag}"
|
image = "#{Settings.texliveImageNameOveride}/#{img[2]}"
|
||||||
|
|
||||||
options = DockerRunner._getContainerOptions(command, image, volumes, timeout, environment)
|
options = DockerRunner._getContainerOptions(command, image, volumes, timeout, environment)
|
||||||
fingerprint = DockerRunner._fingerprintContainer(options)
|
fingerprint = DockerRunner._fingerprintContainer(options)
|
||||||
|
|||||||
@@ -138,13 +138,13 @@ describe "DockerRunner", ->
|
|||||||
|
|
||||||
describe "with image override", ->
|
describe "with image override", ->
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
@Settings.texliveImageNameOveride = "overrideimage/here"
|
@Settings.texliveImageNameOveride = "overrideimage.com/something"
|
||||||
@DockerRunner._runAndWaitForContainer = sinon.stub().callsArgWith(3, null, @output = "mock-output")
|
@DockerRunner._runAndWaitForContainer = sinon.stub().callsArgWith(3, null, @output = "mock-output")
|
||||||
@DockerRunner.run @project_id, @command, @directory, @image, @timeout, @env, @callback
|
@DockerRunner.run @project_id, @command, @directory, @image, @timeout, @env, @callback
|
||||||
|
|
||||||
it "should use the override and keep the tag", ->
|
it "should use the override and keep the tag", ->
|
||||||
image = @DockerRunner._getContainerOptions.args[0][1]
|
image = @DockerRunner._getContainerOptions.args[0][1]
|
||||||
image.should.equal "overrideimage/here:2016.2"
|
image.should.equal "overrideimage.com/something/image:2016.2"
|
||||||
|
|
||||||
describe "_runAndWaitForContainer", ->
|
describe "_runAndWaitForContainer", ->
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
|
|||||||
Reference in New Issue
Block a user