MCPcopy Index your code
hub / github.com/scality/cloudserver / getNotifRequest

Function getNotifRequest

tests/unit/api/bucketPutNotification.js:36–59  ·  view source on GitHub ↗
(empty)

Source from the content-addressed store, hash-verified

34};
35
36function getNotifRequest(empty) {
37 const queueConfig = empty ? '' :
38 '<QueueConfiguration>' +
39 '<Id>notification-id</Id>' +
40 '<Queue>arn:scality:bucketnotif:::target1</Queue>' +
41 '<Event>s3:ObjectCreated:*</Event>' +
42 '<Event>s3:ObjectTagging:*</Event>' +
43 '<Event>s3:ObjectAcl:Put</Event>' +
44 '</QueueConfiguration>';
45
46 const notifXml = '<NotificationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">' +
47 `${queueConfig}` +
48 '</NotificationConfiguration>';
49
50 const putNotifConfigRequest = {
51 bucketName,
52 headers: {
53 host: `${bucketName}.s3.amazonaws.com`,
54 },
55 post: notifXml,
56 actionImplicitDenies: false,
57 };
58 return putNotifConfigRequest;
59}
60
61describe('putBucketNotification API', () => {
62 before(cleanup);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected