From 57eb0e2006daf8347c3ecc058a97d4c6afd691c6 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Tue, 20 May 2014 13:19:02 +0100 Subject: [PATCH] Revert "Revert "changed docstore url to /raw for tpds updates"" This reverts commit 4af4ff34b0ebad0ce9056a1c1dd5e20f12f6096d. --- .../Features/ThirdPartyDataStore/TpdsUpdateSender.coffee | 2 +- .../coffee/ThirdPartyDataStore/TpdsUpdateSenderTests.coffee | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/app/coffee/Features/ThirdPartyDataStore/TpdsUpdateSender.coffee b/services/web/app/coffee/Features/ThirdPartyDataStore/TpdsUpdateSender.coffee index b79ba52ced..97da0d44df 100644 --- a/services/web/app/coffee/Features/ThirdPartyDataStore/TpdsUpdateSender.coffee +++ b/services/web/app/coffee/Features/ThirdPartyDataStore/TpdsUpdateSender.coffee @@ -42,7 +42,7 @@ module.exports = addDoc : (options, sl_req_id, callback = (err)->)-> metrics.inc("tpds.add-doc") {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}") + options.streamOrigin = settings.apis.docstore.url + path.join("/project/#{options.project_id}/doc/","#{options.doc_id}/raw") @_addEntity(options, sl_req_id, callback)    diff --git a/services/web/test/UnitTests/coffee/ThirdPartyDataStore/TpdsUpdateSenderTests.coffee b/services/web/test/UnitTests/coffee/ThirdPartyDataStore/TpdsUpdateSenderTests.coffee index e476bac634..d54c8d2847 100644 --- a/services/web/test/UnitTests/coffee/ThirdPartyDataStore/TpdsUpdateSenderTests.coffee +++ b/services/web/test/UnitTests/coffee/ThirdPartyDataStore/TpdsUpdateSenderTests.coffee @@ -54,7 +54,7 @@ describe 'TpdsUpdateSender', -> done() @updateSender.addFile {project_id:project_id, file_id:file_id, path:path, project_name:project_name}, -> - it 'post doc with path and lines', (done)-> + it 'post doc with stream origin of docstore', (done)-> doc_id = "4545345" path = "/some/path/here.tex" lines = ["line1", "line2", "line3"] @@ -64,7 +64,7 @@ describe 'TpdsUpdateSender', -> job.method.should.equal "post" expectedUrl = "#{thirdPartyDataStoreApiUrl}/user/#{user_id}/entity/#{encodeURIComponent(project_name)}#{encodeURIComponent(path)}" job.uri.should.equal expectedUrl - job.streamOrigin.should.equal "#{@docstoreUrl}/project/#{project_id}/doc/#{doc_id}" + job.streamOrigin.should.equal "#{@docstoreUrl}/project/#{project_id}/doc/#{doc_id}/raw" job.headers.sl_all_user_ids.should.eql(JSON.stringify([collaberator_ref_1, read_only_ref_1, user_id])) done() @updateSender.addDoc {project_id:project_id, doc_id:doc_id, path:path, docLines:lines,project_name:project_name}