MCPcopy
hub / github.com/scality/cloudserver / newPutObjectRequest

Function newPutObjectRequest

tests/unit/api/objectPut.js:1108–1119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1106 });
1107
1108 const newPutObjectRequest = params => {
1109 const { location, versionID } = params || {};
1110 const r = versioningTestUtils
1111 .createPutObjectRequest(bucketName, objectName, Buffer.from('I am another body', 'utf8'));
1112 if (location) {
1113 r.headers[objectLocationConstraintHeader] = location;
1114 }
1115 if (versionID) {
1116 r.headers['x-scal-s3-version-id'] = versionID;
1117 }
1118 return r;
1119 };
1120 const newPutIngestBucketRequest = location => new DummyRequest({
1121 bucketName,
1122 namespace,

Callers 1

objectPut.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected