@@ -66,7 +66,7 @@ describe('Deploy to ECS', () => {
66
66
mockEcsRegisterTaskDef . mockImplementation ( ( ) => {
67
67
return {
68
68
promise ( ) {
69
- return Promise . resolve ( { taskDefinition : { taskDefinitionArn : 'task:def:arn' } } ) ;
69
+ return Promise . resolve ( { taskDefinition : { taskDefinitionArn : 'task:def:arn:task-definition/task-def-family:1 ' } } ) ;
70
70
}
71
71
} ;
72
72
} ) ;
@@ -135,10 +135,11 @@ describe('Deploy to ECS', () => {
135
135
await run ( ) ;
136
136
expect ( core . setFailed ) . toHaveBeenCalledTimes ( 0 ) ;
137
137
expect ( mockEcsRegisterTaskDef ) . toHaveBeenNthCalledWith ( 1 , { family : 'task-def-family' } ) ;
138
- expect ( core . setOutput ) . toHaveBeenNthCalledWith ( 1 , 'task-definition-arn' , 'task:def:arn' ) ;
138
+ expect ( core . setOutput ) . toBeCalledWith ( 'task-definition-arn' , 'task:def:arn:task-definition/task-def-family:1' ) ;
139
+ expect ( core . setOutput ) . toBeCalledWith ( 'task-definition-family-and-revision' , 'task-def-family:1' ) ;
139
140
expect ( mockRunTasks ) . toHaveBeenNthCalledWith ( 1 , {
140
141
cluster : 'cluster-789' ,
141
- taskDefinition : 'task:def:arn' ,
142
+ taskDefinition : 'task:def:arn:task-definition/task-def-family:1 ' ,
142
143
count : '1' ,
143
144
startedBy : 'amazon-ecs-run-task-for-github-actions' ,
144
145
networkConfiguration : {
@@ -169,13 +170,15 @@ describe('Deploy to ECS', () => {
169
170
expect ( core . setFailed ) . toHaveBeenCalledTimes ( 0 ) ;
170
171
171
172
expect ( mockEcsRegisterTaskDef ) . toHaveBeenNthCalledWith ( 1 , { family : 'task-def-family' } ) ;
172
- expect ( core . setOutput ) . toHaveBeenNthCalledWith ( 1 , 'task-definition-arn' , 'task:def:arn' ) ;
173
+ expect ( core . setOutput ) . toBeCalledWith ( 'task-definition-arn' , 'task:def:arn:task-definition/task-def-family:1' ) ;
174
+ expect ( core . setOutput ) . toBeCalledWith ( 'task-definition-family-and-revision' , 'task-def-family:1' ) ;
173
175
expect ( mockEcsDescribeTasks ) . toHaveBeenNthCalledWith ( 1 , {
174
176
cluster : 'cluster-789' ,
175
177
tasks : [ 'arn:aws:ecs:fake-region:account_id:task/arn' ]
176
178
} ) ;
177
179
178
180
expect ( mockEcsWaiter ) . toHaveBeenCalledTimes ( 1 ) ;
181
+ expect ( core . setOutput ) . toBeCalledWith ( 'task-arn' , [ 'arn:aws:ecs:fake-region:account_id:task/arn' ] ) ;
179
182
180
183
expect ( core . info ) . toBeCalledWith ( "All tasks have exited successfully." ) ;
181
184
} ) ;
0 commit comments