Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template should be merged into multiple Records #15

Open
brettstack opened this issue Jan 25, 2020 · 0 comments
Open

Template should be merged into multiple Records #15

brettstack opened this issue Jan 25, 2020 · 0 comments

Comments

@brettstack
Copy link

brettstack commented Jan 25, 2020

const event = eventMocks(
      'aws:sqs',
      {
        Records: [{
          messageAttributes: {
            resolveOrReject: {
              stringValue: 'resolve',
            },
          },
          body: '',
        }, {
          messageAttributes: {
            resolveOrReject: {
              stringValue: 'reject',
            },
          },
          body: '',
        }],
      },
    )

Expected console.log(event.Records[1]):

{
  messageId: '059f36b4-87a3-44ab-83d2-661975830a7d',
  receiptHandle: 'failingReceiptHandle',
  body: '',
  attributes: [Object],
  messageAttributes: { resolveOrReject: { stringValue: 'reject' } },
  md5OfBody: '098f6bcd4621d373cade4e832627b4f6',
  eventSource: 'aws:sqs',
  eventSourceARN: 'arn:aws:sqs:us-east-2:123456789012:my-queue',
  awsRegion: 'us-east-2',
  ReceiptHandle: 'failingReceiptHandle'
}

Actual:

{
  messageAttributes: { resolveOrReject: { stringValue: 'reject' } },
  body: ''
}
@brettstack brettstack changed the title Specifying multiple Records should merge template also Template should be merged into multiple Records Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant