LINT FOR THE LINTING GODS

This commit is contained in:
Ryan S. Brown 2017-03-01 21:52:30 -05:00
parent 9ca9baabfa
commit 2c01c06d6d

View File

@ -346,13 +346,13 @@ describe('AwsCompileStreamEvents', () => {
events: [
{
stream: {
arn: {'Fn::GetAtt': ['SomeDdbTable', 'StreamArn']},
arn: { 'Fn::GetAtt': ['SomeDdbTable', 'StreamArn'] },
type: 'dynamodb',
},
},
{
stream: {
arn: {'Fn::ImportValue': 'ForeignKinesis'},
arn: { 'Fn::ImportValue': 'ForeignKinesis' },
type: 'kinesis',
},
},
@ -364,39 +364,39 @@ describe('AwsCompileStreamEvents', () => {
// dynamodb version
expect(awsCompileStreamEvents.serverless.service
.provider.compiledCloudFormationTemplate.Resources.FirstEventSourceMappingDynamodbSomeDdbTable
.Properties.EventSourceArn
.provider.compiledCloudFormationTemplate.Resources
.FirstEventSourceMappingDynamodbSomeDdbTable.Properties.EventSourceArn
).to.deep.equal(
{'Fn::GetAtt': ['SomeDdbTable', 'StreamArn']}
{ 'Fn::GetAtt': ['SomeDdbTable', 'StreamArn'] }
);
expect(awsCompileStreamEvents.serverless.service
.provider.compiledCloudFormationTemplate.Resources.IamRoleLambdaExecution
.Properties.Policies[0].PolicyDocument.Statement[0]
).to.deep.equal(
{
"Action": [
"dynamodb:GetRecords",
"dynamodb:GetShardIterator",
"dynamodb:DescribeStream",
"dynamodb:ListStreams"
Action: [
'dynamodb:GetRecords',
'dynamodb:GetShardIterator',
'dynamodb:DescribeStream',
'dynamodb:ListStreams',
],
"Effect": "Allow",
"Resource": [
Effect: 'Allow',
Resource: [
{
"Fn::GetAtt": [
"SomeDdbTable",
"StreamArn"
]
}
]
'Fn::GetAtt': [
'SomeDdbTable',
'StreamArn',
],
},
],
}
);
// and now kinesis
expect(awsCompileStreamEvents.serverless.service
.provider.compiledCloudFormationTemplate.Resources.FirstEventSourceMappingKinesisForeignKinesis
.Properties.EventSourceArn
.provider.compiledCloudFormationTemplate.Resources
.FirstEventSourceMappingKinesisForeignKinesis.Properties.EventSourceArn
).to.deep.equal(
{'Fn::ImportValue': 'ForeignKinesis'}
{ 'Fn::ImportValue': 'ForeignKinesis' }
);
});
@ -406,7 +406,7 @@ describe('AwsCompileStreamEvents', () => {
events: [
{
stream: {
arn: {'Fn::GetAtt': ['SomeDdbTable', 'StreamArn']},
arn: { 'Fn::GetAtt': ['SomeDdbTable', 'StreamArn'] },
},
},
],