MCPcopy Index your code
hub / github.com/scality/cloudserver / copyObject

Function copyObject

tests/unit/api/objectReplicationMD.js:207–223  ·  view source on GitHub ↗
(sourceObjectKey, copyObjectKey, hasContent, cb)

Source from the content-addressed store, hash-verified

205
206// Copy an object where replication does not apply.
207function copyObject(sourceObjectKey, copyObjectKey, hasContent, cb) {
208 const req = getObjectPutReq(sourceObjectKey, hasContent);
209 return objectPut(authInfo, req, undefined, log, err => {
210 if (err) {
211 return cb(err);
212 }
213 const req = new DummyRequest({
214 bucketName,
215 namespace,
216 objectKey: copyObjectKey,
217 headers: {},
218 url: `/${bucketName}/${sourceObjectKey}`,
219 });
220 return objectCopy(authInfo, req, bucketName, sourceObjectKey, undefined,
221 log, cb);
222 });
223}
224
225describe('Replication object MD without bucket replication config', () => {
226 beforeEach(() => {

Callers 1

Calls 3

getObjectPutReqFunction · 0.85
objectPutFunction · 0.85
objectCopyFunction · 0.85

Tested by

no test coverage detected