@@ -55,16 +55,16 @@ describe('#compileStateMachines', () => {
5555 . StateMachineBeta2 . Properties . DefinitionString ) . to . equal ( '"definition2"' ) ;
5656 expect ( serverlessStepFunctions . serverless . service
5757 . provider . compiledCloudFormationTemplate . Resources
58- . StateMachineBeta1 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
58+ . StateMachineBeta1 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'StateMachineBeta1Role ' ) ;
5959 expect ( serverlessStepFunctions . serverless . service
6060 . provider . compiledCloudFormationTemplate . Resources
61- . StateMachineBeta2 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
61+ . StateMachineBeta2 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'StateMachineBeta2Role ' ) ;
6262 expect ( serverlessStepFunctions . serverless . service
6363 . provider . compiledCloudFormationTemplate . Resources
64- . StateMachineBeta1 . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' ] ) ;
64+ . StateMachineBeta1 . DependsOn ) . to . deep . eq ( [ 'StateMachineBeta1Role ' ] ) ;
6565 expect ( serverlessStepFunctions . serverless . service
6666 . provider . compiledCloudFormationTemplate . Resources
67- . StateMachineBeta2 . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' ] ) ;
67+ . StateMachineBeta2 . DependsOn ) . to . deep . eq ( [ 'StateMachineBeta2Role ' ] ) ;
6868 expect ( serverlessStepFunctions . serverless . service
6969 . provider . compiledCloudFormationTemplate . Outputs
7070 . StateMachineBeta1Arn . Value . Ref ) . to . equal ( 'StateMachineBeta1' ) ;
@@ -100,16 +100,16 @@ describe('#compileStateMachines', () => {
100100 . MyStateMachine2StepFunctionsStateMachine . Properties . DefinitionString ) . to . equal ( '"definition2"' ) ;
101101 expect ( serverlessStepFunctions . serverless . service
102102 . provider . compiledCloudFormationTemplate . Resources
103- . MyStateMachine1StepFunctionsStateMachine . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
103+ . MyStateMachine1StepFunctionsStateMachine . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'MyStateMachine1StepFunctionsStateMachineRole ' ) ;
104104 expect ( serverlessStepFunctions . serverless . service
105105 . provider . compiledCloudFormationTemplate . Resources
106- . MyStateMachine2StepFunctionsStateMachine . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
106+ . MyStateMachine2StepFunctionsStateMachine . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'MyStateMachine2StepFunctionsStateMachineRole ' ) ;
107107 expect ( serverlessStepFunctions . serverless . service
108108 . provider . compiledCloudFormationTemplate . Resources
109- . MyStateMachine1StepFunctionsStateMachine . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' ] ) ;
109+ . MyStateMachine1StepFunctionsStateMachine . DependsOn ) . to . deep . eq ( [ 'MyStateMachine1StepFunctionsStateMachineRole ' ] ) ;
110110 expect ( serverlessStepFunctions . serverless . service
111111 . provider . compiledCloudFormationTemplate . Resources
112- . MyStateMachine2StepFunctionsStateMachine . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' ] ) ;
112+ . MyStateMachine2StepFunctionsStateMachine . DependsOn ) . to . deep . eq ( [ 'MyStateMachine2StepFunctionsStateMachineRole ' ] ) ;
113113 expect ( serverlessStepFunctions . serverless . service
114114 . provider . compiledCloudFormationTemplate . Outputs
115115 . MyStateMachine1StepFunctionsStateMachineArn . Value . Ref ) . to . equal ( 'MyStateMachine1StepFunctionsStateMachine' ) ;
@@ -147,16 +147,16 @@ describe('#compileStateMachines', () => {
147147 . StateMachineBeta2 . Properties . DefinitionString ) . to . equal ( '"definition2"' ) ;
148148 expect ( serverlessStepFunctions . serverless . service
149149 . provider . compiledCloudFormationTemplate . Resources
150- . StateMachineBeta1 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
150+ . StateMachineBeta1 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'StateMachineBeta1Role ' ) ;
151151 expect ( serverlessStepFunctions . serverless . service
152152 . provider . compiledCloudFormationTemplate . Resources
153- . StateMachineBeta2 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
153+ . StateMachineBeta2 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'StateMachineBeta2Role ' ) ;
154154 expect ( serverlessStepFunctions . serverless . service
155155 . provider . compiledCloudFormationTemplate . Resources
156- . StateMachineBeta1 . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' ] ) ;
156+ . StateMachineBeta1 . DependsOn ) . to . deep . eq ( [ 'StateMachineBeta1Role ' ] ) ;
157157 expect ( serverlessStepFunctions . serverless . service
158158 . provider . compiledCloudFormationTemplate . Resources
159- . StateMachineBeta2 . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' ] ) ;
159+ . StateMachineBeta2 . DependsOn ) . to . deep . eq ( [ 'StateMachineBeta2Role ' ] ) ;
160160 } ) ;
161161
162162 it ( 'should create corresponding resources when definition and role property are given' , ( ) => {
@@ -400,16 +400,16 @@ describe('#compileStateMachines', () => {
400400 . StateMachineBeta2 . Properties . DefinitionString ) . to . equal ( '"definition2"' ) ;
401401 expect ( serverlessStepFunctions . serverless . service
402402 . provider . compiledCloudFormationTemplate . Resources
403- . StateMachineBeta1 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
403+ . StateMachineBeta1 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'StateMachineBeta1Role ' ) ;
404404 expect ( serverlessStepFunctions . serverless . service
405405 . provider . compiledCloudFormationTemplate . Resources
406- . StateMachineBeta2 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'IamRoleStateMachineExecution ' ) ;
406+ . StateMachineBeta2 . Properties . RoleArn [ 'Fn::GetAtt' ] [ 0 ] ) . to . equal ( 'StateMachineBeta2Role ' ) ;
407407 expect ( serverlessStepFunctions . serverless . service
408408 . provider . compiledCloudFormationTemplate . Resources
409- . StateMachineBeta1 . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' , 'DynamoDBTable' ] ) ;
409+ . StateMachineBeta1 . DependsOn ) . to . deep . eq ( [ 'StateMachineBeta1Role ' , 'DynamoDBTable' ] ) ;
410410 expect ( serverlessStepFunctions . serverless . service
411411 . provider . compiledCloudFormationTemplate . Resources
412- . StateMachineBeta2 . DependsOn ) . to . deep . eq ( [ 'IamRoleStateMachineExecution ' , 'DynamoDBTable' , 'KinesisStream' ] ) ;
412+ . StateMachineBeta2 . DependsOn ) . to . deep . eq ( [ 'StateMachineBeta2Role ' , 'DynamoDBTable' , 'KinesisStream' ] ) ;
413413 } ) ;
414414
415415 it ( 'should throw error when dependsOn property is neither string nor [string]' , ( ) => {
0 commit comments