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