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

Function getNotificationXml

tests/unit/api/bucketGetNotification.js:35–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33}
34
35function getNotificationXml() {
36 const id = 'queue1';
37 const event = 's3:ObjectCreated:Put';
38 const event2 = 's3:ObjectCreated:CompleteMultipartUpload';
39 const queueArn = 'arn:scality:bucketnotif:::target1';
40 const filterName = 'Prefix';
41 const filterValue = 'logs/';
42
43 return '<NotificationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">' +
44 '<QueueConfiguration>' +
45 `<Id>${id}</Id>` +
46 `<Queue>${queueArn}</Queue>` +
47 `<Event>${event}</Event>` +
48 `<Event>${event2}</Event>` +
49 '<Filter><S3Key>' +
50 `<FilterRule><Name>${filterName}</Name>` +
51 `<Value>${filterValue}</Value></FilterRule>` +
52 '</S3Key></Filter>' +
53 '</QueueConfiguration>' +
54 '</NotificationConfiguration>';
55}
56
57
58describe('getBucketNotification API', () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected