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

Function preparePutMetadataRequest

tests/unit/routes/routeBackbeat.js:190–204  ·  view source on GitHub ↗
(body = {})

Source from the content-addressed store, hash-verified

188 let dataDeleteSpy;
189
190 function preparePutMetadataRequest(body = {}) {
191 const req = prepareDummyRequest(
192 {
193 'x-scal-versioning-required': 'true',
194 },
195 JSON.stringify({
196 replicationInfo: {},
197 ...body,
198 }),
199 );
200 req.method = 'PUT';
201 req.url = '/_/backbeat/metadata/bucket0/key0';
202 req.destroy = () => {};
203 return req;
204 }
205
206 beforeEach(() => {
207 mockRequest = preparePutMetadataRequest();

Callers 1

routeBackbeat.jsFile · 0.85

Calls 1

prepareDummyRequestFunction · 0.70

Tested by

no test coverage detected