MCPcopy Create free account
hub / github.com/scality/cloudserver / _makeRequest

Function _makeRequest

tests/unit/api/bucketDeleteLifecycle.js:17–33  ·  view source on GitHub ↗
(includeXml)

Source from the content-addressed store, hash-verified

15const bucketName = 'bucketname';
16
17function _makeRequest(includeXml) {
18 const request = {
19 bucketName,
20 headers: { host: `${bucketName}.s3.amazonaws.com` },
21 url: '/',
22 actionImplicitDenies: false,
23 };
24 if (includeXml) {
25 request.post = '<LifecycleConfiguration ' +
26 'xmlns="http://s3.amazonaws.com/doc/2006-03-01/">' +
27 '<Rule><ID></ID><Filter></Filter>' +
28 '<Status>Enabled</Status>' +
29 '<Expiration><Days>1</Days></Expiration>' +
30 '</Rule></LifecycleConfiguration>';
31 }
32 return request;
33}
34
35describe('deleteBucketLifecycle API', () => {
36 before(() => cleanup());

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected