Revert "changed docstore url to /raw for tpds updates"

This reverts commit f9e60db892d270811c5e38f273d8a1b62b86eeb2.
This commit is contained in:
James Allen 2014-05-20 11:13:57 +01:00
parent 2398b34f28
commit 22c577f9b5
2 changed files with 3 additions and 3 deletions

View file

@ -42,7 +42,7 @@ module.exports =
addDoc : (options, sl_req_id, callback = (err)->)-> addDoc : (options, sl_req_id, callback = (err)->)->
metrics.inc("tpds.add-doc") metrics.inc("tpds.add-doc")
{callback, sl_req_id} = slReqIdHelper.getCallbackAndReqId(callback, sl_req_id) {callback, sl_req_id} = slReqIdHelper.getCallbackAndReqId(callback, sl_req_id)
options.streamOrigin = settings.apis.docstore.url + path.join("/project/#{options.project_id}/doc/","#{options.doc_id}/raw") options.streamOrigin = settings.apis.docstore.url + path.join("/project/#{options.project_id}/doc/","#{options.doc_id}")
@_addEntity(options, sl_req_id, callback) @_addEntity(options, sl_req_id, callback)
     

View file

@ -54,7 +54,7 @@ describe 'TpdsUpdateSender', ->
done() done()
@updateSender.addFile {project_id:project_id, file_id:file_id, path:path, project_name:project_name}, -> @updateSender.addFile {project_id:project_id, file_id:file_id, path:path, project_name:project_name}, ->
it 'post doc with stream origin of docstore', (done)-> it 'post doc with path and lines', (done)->
doc_id = "4545345" doc_id = "4545345"
path = "/some/path/here.tex" path = "/some/path/here.tex"
lines = ["line1", "line2", "line3"] lines = ["line1", "line2", "line3"]
@ -64,7 +64,7 @@ describe 'TpdsUpdateSender', ->
job.method.should.equal "post" job.method.should.equal "post"
expectedUrl = "#{thirdPartyDataStoreApiUrl}/user/#{user_id}/entity/#{encodeURIComponent(project_name)}#{encodeURIComponent(path)}" expectedUrl = "#{thirdPartyDataStoreApiUrl}/user/#{user_id}/entity/#{encodeURIComponent(project_name)}#{encodeURIComponent(path)}"
job.uri.should.equal expectedUrl job.uri.should.equal expectedUrl
job.streamOrigin.should.equal "#{@docstoreUrl}/project/#{project_id}/doc/#{doc_id}/raw" job.streamOrigin.should.equal "#{@docstoreUrl}/project/#{project_id}/doc/#{doc_id}"
job.headers.sl_all_user_ids.should.eql(JSON.stringify([collaberator_ref_1, read_only_ref_1, user_id])) job.headers.sl_all_user_ids.should.eql(JSON.stringify([collaberator_ref_1, read_only_ref_1, user_id]))
done() done()
@updateSender.addDoc {project_id:project_id, doc_id:doc_id, path:path, docLines:lines,project_name:project_name} @updateSender.addDoc {project_id:project_id, doc_id:doc_id, path:path, docLines:lines,project_name:project_name}