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

Function getMetadataToPut

tests/multipleBackend/routes/routeBackbeat.js:245–257  ·  view source on GitHub ↗
(putDataResponse)

Source from the content-addressed store, hash-verified

243});
244
245function getMetadataToPut(putDataResponse) {
246 const mdToPut = Object.assign({}, testMd);
247 // Reproduce what backbeat does to update target metadata
248 mdToPut.location = JSON.parse(putDataResponse.body);
249 ['x-amz-server-side-encryption',
250 'x-amz-server-side-encryption-aws-kms-key-id',
251 'x-amz-server-side-encryption-customer-algorithm'].forEach(headerName => {
252 if (putDataResponse.headers[headerName]) {
253 mdToPut[headerName] = putDataResponse.headers[headerName];
254 }
255 });
256 return mdToPut;
257}
258
259describe('backbeat routes', () => {
260 let bucketUtil;

Callers 1

routeBackbeat.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected