@@ -55,16 +55,16 @@ describe('#compileStateMachines', () => {
55
55
. StateMachineBeta2 . Properties . DefinitionString ) . to . equal ( '"definition2"' ) ;
56
56
expect ( serverlessStepFunctions . serverless . service
57
57
. provider . compiledCloudFormationTemplate . Resources
58
- . StateMachineBeta1 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
58
+ . StateMachineBeta1 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'StateMachineBeta1Role ' ) ;
59
59
expect ( serverlessStepFunctions . serverless . service
60
60
. provider . compiledCloudFormationTemplate . Resources
61
- . StateMachineBeta2 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
61
+ . StateMachineBeta2 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'StateMachineBeta2Role ' ) ;
62
62
expect ( serverlessStepFunctions . serverless . service
63
63
. provider . compiledCloudFormationTemplate . Resources
64
- . StateMachineBeta1 . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' ] ) ;
64
+ . StateMachineBeta1 . DependsOn ) . to . deep . eq ( [ 'StateMachineBeta1Role ' ] ) ;
65
65
expect ( serverlessStepFunctions . serverless . service
66
66
. provider . compiledCloudFormationTemplate . Resources
67
- . StateMachineBeta2 . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' ] ) ;
67
+ . StateMachineBeta2 . DependsOn ) . to . deep . eq ( [ 'StateMachineBeta2Role ' ] ) ;
68
68
expect ( serverlessStepFunctions . serverless . service
69
69
. provider . compiledCloudFormationTemplate . Outputs
70
70
. StateMachineBeta1Arn . Value . Ref ) . to . equal ( 'StateMachineBeta1' ) ;
@@ -100,16 +100,16 @@ describe('#compileStateMachines', () => {
100
100
. MyStateMachine2StepFunctionsStateMachine . Properties . DefinitionString ) . to . equal ( '"definition2"' ) ;
101
101
expect ( serverlessStepFunctions . serverless . service
102
102
. provider . compiledCloudFormationTemplate . Resources
103
- . MyStateMachine1StepFunctionsStateMachine . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
103
+ . MyStateMachine1StepFunctionsStateMachine . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'MyStateMachine1StepFunctionsStateMachineRole ' ) ;
104
104
expect ( serverlessStepFunctions . serverless . service
105
105
. provider . compiledCloudFormationTemplate . Resources
106
- . MyStateMachine2StepFunctionsStateMachine . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
106
+ . MyStateMachine2StepFunctionsStateMachine . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'MyStateMachine2StepFunctionsStateMachineRole ' ) ;
107
107
expect ( serverlessStepFunctions . serverless . service
108
108
. provider . compiledCloudFormationTemplate . Resources
109
- . MyStateMachine1StepFunctionsStateMachine . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' ] ) ;
109
+ . MyStateMachine1StepFunctionsStateMachine . DependsOn ) . to . deep . eq ( [ 'MyStateMachine1StepFunctionsStateMachineRole ' ] ) ;
110
110
expect ( serverlessStepFunctions . serverless . service
111
111
. provider . compiledCloudFormationTemplate . Resources
112
- . MyStateMachine2StepFunctionsStateMachine . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' ] ) ;
112
+ . MyStateMachine2StepFunctionsStateMachine . DependsOn ) . to . deep . eq ( [ 'MyStateMachine2StepFunctionsStateMachineRole ' ] ) ;
113
113
expect ( serverlessStepFunctions . serverless . service
114
114
. provider . compiledCloudFormationTemplate . Outputs
115
115
. MyStateMachine1StepFunctionsStateMachineArn . Value . Ref ) . to . equal ( 'MyStateMachine1StepFunctionsStateMachine' ) ;
@@ -147,16 +147,16 @@ describe('#compileStateMachines', () => {
147
147
. StateMachineBeta2 . Properties . DefinitionString ) . to . equal ( '"definition2"' ) ;
148
148
expect ( serverlessStepFunctions . serverless . service
149
149
. provider . compiledCloudFormationTemplate . Resources
150
- . StateMachineBeta1 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
150
+ . StateMachineBeta1 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'StateMachineBeta1Role ' ) ;
151
151
expect ( serverlessStepFunctions . serverless . service
152
152
. provider . compiledCloudFormationTemplate . Resources
153
- . StateMachineBeta2 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
153
+ . StateMachineBeta2 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'StateMachineBeta2Role ' ) ;
154
154
expect ( serverlessStepFunctions . serverless . service
155
155
. provider . compiledCloudFormationTemplate . Resources
156
- . StateMachineBeta1 . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' ] ) ;
156
+ . StateMachineBeta1 . DependsOn ) . to . deep . eq ( [ 'StateMachineBeta1Role ' ] ) ;
157
157
expect ( serverlessStepFunctions . serverless . service
158
158
. provider . compiledCloudFormationTemplate . Resources
159
- . StateMachineBeta2 . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' ] ) ;
159
+ . StateMachineBeta2 . DependsOn ) . to . deep . eq ( [ 'StateMachineBeta2Role ' ] ) ;
160
160
} ) ;
161
161
162
162
it ( 'should create corresponding resources when definition and role property are given' , ( ) => {
@@ -400,16 +400,16 @@ describe('#compileStateMachines', () => {
400
400
. StateMachineBeta2 . Properties . DefinitionString ) . to . equal ( '"definition2"' ) ;
401
401
expect ( serverlessStepFunctions . serverless . service
402
402
. provider . compiledCloudFormationTemplate . Resources
403
- . StateMachineBeta1 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
403
+ . StateMachineBeta1 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'StateMachineBeta1Role ' ) ;
404
404
expect ( serverlessStepFunctions . serverless . service
405
405
. provider . compiledCloudFormationTemplate . Resources
406
- . StateMachineBeta2 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
406
+ . StateMachineBeta2 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'StateMachineBeta2Role ' ) ;
407
407
expect ( serverlessStepFunctions . serverless . service
408
408
. provider . compiledCloudFormationTemplate . Resources
409
- . StateMachineBeta1 . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' , 'DynamoDBTable' ] ) ;
409
+ . StateMachineBeta1 . DependsOn ) . to . deep . eq ( [ 'StateMachineBeta1Role ' , 'DynamoDBTable' ] ) ;
410
410
expect ( serverlessStepFunctions . serverless . service
411
411
. provider . compiledCloudFormationTemplate . Resources
412
- . StateMachineBeta2 . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' , 'DynamoDBTable' , 'KinesisStream' ] ) ;
412
+ . StateMachineBeta2 . DependsOn ) . to . deep . eq ( [ 'StateMachineBeta2Role ' , 'DynamoDBTable' , 'KinesisStream' ] ) ;
413
413
} ) ;
414
414
415
415
it ( 'should throw error when dependsOn property is neither string nor [string]' , ( ) => {
0 commit comments