Skip to content

Commit

Permalink
run prettify for new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoe Zhang committed Sep 19, 2020
1 parent e1ca63c commit 86a573b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/plugins/aws/package/compile/events/sns/index.js
Expand Up @@ -118,9 +118,11 @@ class AwsCompileSNSEvents {
targetUrl = {
'Fn::Join': [
'',
`https://sqs.${deRegion}.`,
{ Ref: 'AWS::URLSuffix' },
`/${deAccount}/${deQueueName}`,
[
`https://sqs.${deRegion}.`,
{ Ref: 'AWS::URLSuffix' },
`/${deAccount}/${deQueueName}`,
],
],
};
} else if (deadLetterTargetRef) {
Expand Down
17 changes: 17 additions & 0 deletions lib/plugins/aws/package/compile/events/sns/index.test.js
Expand Up @@ -591,6 +591,23 @@ describe('AwsCompileSNSEvents', () => {
awsCompileSNSEvents.serverless.service.provider.compiledCloudFormationTemplate.Resources
.Topic1ToFirstDLQPolicy.Type
).to.equal('AWS::SQS::QueuePolicy');
expect(
awsCompileSNSEvents.serverless.service.provider.compiledCloudFormationTemplate.Resources
.Topic1ToFirstDLQPolicy.Properties.Queues
).to.deep.equal([
{
'Fn::Join': [
'',
[
'https://sqs.us-east-1.',
{
Ref: 'AWS::URLSuffix',
},
'/11111111111/myDLQ',
],
],
},
]);
});

it('should link topic to corresponding dlq when redrivePolicy is defined with resource ref', () => {
Expand Down

0 comments on commit 86a573b

Please sign in to comment.