mirror of
https://github.com/overleaf/overleaf.git
synced 2024-09-16 02:52:31 -04:00
don't make request to google cloud clsi if there is no url
This commit is contained in:
parent
5f8985811d
commit
ab0f258c03
1 changed files with 9 additions and 3 deletions
|
@ -493,16 +493,22 @@ describe "ClsiManager", ->
|
||||||
url : "https://compiles.googlecloud.test"
|
url : "https://compiles.googlecloud.test"
|
||||||
@response = {there:"something"}
|
@response = {there:"something"}
|
||||||
@request.callsArgWith(1, null, @response)
|
@request.callsArgWith(1, null, @response)
|
||||||
|
|
||||||
it "should change the domain on the url", (done)->
|
|
||||||
@opts =
|
@opts =
|
||||||
url: @ClsiManager._getCompilerUrl(null, @project_id)
|
url: @ClsiManager._getCompilerUrl(null, @project_id)
|
||||||
|
|
||||||
|
it "should change the domain on the url", (done)->
|
||||||
@ClsiManager._makeGoogleCloudRequest @project_id, @opts, =>
|
@ClsiManager._makeGoogleCloudRequest @project_id, @opts, =>
|
||||||
args = @request.args[0]
|
args = @request.args[0]
|
||||||
args[0].url.should.equal "https://compiles.googlecloud.test/project/#{@project_id}"
|
args[0].url.should.equal "https://compiles.googlecloud.test/project/#{@project_id}"
|
||||||
done()
|
done()
|
||||||
|
|
||||||
|
it "should not make a request if there is not clsigc url", (done)->
|
||||||
|
@settings.apis.clsigc = undefined
|
||||||
|
@ClsiManager._makeGoogleCloudRequest @project_id, @opts, (err)=>
|
||||||
|
expect(err).to.equal undefined
|
||||||
|
@request.callCount.should.equal 0
|
||||||
|
done()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue