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

Function prepareBatchDeleteRequest

tests/unit/routes/routeBackbeat.js:669–688  ·  view source on GitHub ↗
(locations = undefined)

Source from the content-addressed store, hash-verified

667 let validateQuotasSpy;
668
669 const prepareBatchDeleteRequest = (locations = undefined) => {
670 const mockRequest = prepareDummyRequest(
671 {
672 'x-scal-versioning-required': 'true',
673 },
674 JSON.stringify({
675 Locations: locations || [
676 {
677 key: 'key0',
678 bucket: 'bucket0',
679 size: 100,
680 },
681 ],
682 }),
683 );
684 mockRequest.method = 'POST';
685 mockRequest.url = '/_/backbeat/batchdelete/bucket0/key0';
686 mockRequest.destroy = () => {};
687 return mockRequest;
688 };
689
690 beforeEach(() => {
691 validateQuotasSpy = sandbox.spy(quotaUtils, 'validateQuotas');

Callers 1

routeBackbeat.jsFile · 0.85

Calls 1

prepareDummyRequestFunction · 0.70

Tested by

no test coverage detected