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

Function copySetup

tests/multipleBackend/objectCopy.js:58–73  ·  view source on GitHub ↗
(params, cb)

Source from the content-addressed store, hash-verified

56}
57
58function copySetup(params, cb) {
59 const { sourceBucket, sourceLocation, sourceKey, destBucket,
60 destLocation, body } = params;
61 const putDestBucketRequest =
62 _createBucketPutRequest(destBucket, destLocation);
63 const putSourceBucketRequest =
64 _createBucketPutRequest(sourceBucket, sourceLocation);
65 const putSourceObjRequest = _createObjectPutRequest(sourceBucket,
66 sourceKey, body);
67 async.series([
68 callback => bucketPut(authInfo, putDestBucketRequest, log, callback),
69 callback => bucketPut(authInfo, putSourceBucketRequest, log, callback),
70 callback => objectPut(authInfo, putSourceObjRequest, undefined, log,
71 callback),
72 ], err => cb(err));
73}
74
75describe('ObjectCopy API with multiple backends', () => {
76 before(() => {

Callers 1

objectCopy.jsFile · 0.85

Calls 4

_createObjectPutRequestFunction · 0.85
bucketPutFunction · 0.85
objectPutFunction · 0.85
_createBucketPutRequestFunction · 0.70

Tested by

no test coverage detected