@@ -1121,9 +1121,9 @@ describe('Deploy to ECS', () => {
1121
1121
. mockReturnValueOnce ( '' ) // cluster
1122
1122
. mockReturnValueOnce ( '' ) // wait-for-service-stability
1123
1123
. mockReturnValueOnce ( '' ) // wait-for-minutes
1124
+ . mockReturnValueOnce ( '' ) // enable-ecs-managed-tags
1124
1125
. mockReturnValueOnce ( '' ) // force-new-deployment
1125
1126
. mockReturnValueOnce ( '' ) // desired-count
1126
- . mockReturnValueOnce ( '' ) // enable-ecs-managed-tags
1127
1127
. mockReturnValueOnce ( 'true' ) ; // run-task
1128
1128
1129
1129
await run ( ) ;
@@ -1138,7 +1138,8 @@ describe('Deploy to ECS', () => {
1138
1138
launchType : 'FARGATE' ,
1139
1139
taskDefinition : 'task:def:arn' ,
1140
1140
overrides : { "containerOverrides" : [ ] } ,
1141
- networkConfiguration : null
1141
+ networkConfiguration : null ,
1142
+ enableECSManagedTags : false
1142
1143
} ) ;
1143
1144
1144
1145
expect ( core . setOutput ) . toHaveBeenNthCalledWith ( 2 , 'run-task-arn' , [ "arn:aws:ecs:fake-region:account_id:task/arn" ] ) ;
@@ -1154,7 +1155,7 @@ describe('Deploy to ECS', () => {
1154
1155
. mockReturnValueOnce ( '' ) // wait-for-minutes
1155
1156
. mockReturnValueOnce ( '' ) // force-new-deployment
1156
1157
. mockReturnValueOnce ( '' ) // desired-count
1157
- . mockReturnValueOnce ( '' ) // enable-ecs-managed-tags
1158
+ . mockReturnValueOnce ( 'true' ) // enable-ecs-managed-tags
1158
1159
. mockReturnValueOnce ( 'true' ) // run-task
1159
1160
. mockReturnValueOnce ( 'false' ) // wait-for-task-stopped
1160
1161
. mockReturnValueOnce ( 'someJoe' ) // run-task-started-by
@@ -1174,7 +1175,8 @@ describe('Deploy to ECS', () => {
1174
1175
launchType : 'EC2' ,
1175
1176
taskDefinition : 'task:def:arn' ,
1176
1177
overrides : { containerOverrides : [ { name : 'someapp' , command : 'somecmd' } ] } ,
1177
- networkConfiguration : { awsvpcConfiguration : { subnets : [ 'a' , 'b' ] , securityGroups : [ 'c' , 'd' ] , assignPublicIp : "DISABLED" } }
1178
+ networkConfiguration : { awsvpcConfiguration : { subnets : [ 'a' , 'b' ] , securityGroups : [ 'c' , 'd' ] , assignPublicIp : "DISABLED" } } ,
1179
+ enableECSManagedTags : true
1178
1180
} ) ;
1179
1181
expect ( core . setOutput ) . toHaveBeenNthCalledWith ( 2 , 'run-task-arn' , [ "arn:aws:ecs:fake-region:account_id:task/arn" ] ) ;
1180
1182
} ) ;
@@ -1220,7 +1222,8 @@ describe('Deploy to ECS', () => {
1220
1222
taskDefinition : 'task:def:arn' ,
1221
1223
launchType : 'EC2' ,
1222
1224
overrides : { containerOverrides : [ { name : 'someapp' , command : 'somecmd' } ] } ,
1223
- networkConfiguration : { awsvpcConfiguration : { subnets : [ 'a' , 'b' ] , securityGroups : [ 'c' , 'd' ] , assignPublicIp : "DISABLED" } }
1225
+ networkConfiguration : { awsvpcConfiguration : { subnets : [ 'a' , 'b' ] , securityGroups : [ 'c' , 'd' ] , assignPublicIp : "DISABLED" } } ,
1226
+ enableECSManagedTags : false
1224
1227
} ) ;
1225
1228
expect ( core . setOutput ) . toHaveBeenNthCalledWith ( 2 , 'run-task-arn' , [ "arn:aws:ecs:fake-region:account_id:task/arn" ] ) ;
1226
1229
} ) ;
@@ -1276,7 +1279,8 @@ describe('Deploy to ECS', () => {
1276
1279
taskDefinition : 'task:def:arn' ,
1277
1280
launchType : 'EC2' ,
1278
1281
overrides : { containerOverrides : [ ] } ,
1279
- networkConfiguration : null
1282
+ networkConfiguration : null ,
1283
+ enableECSManagedTags : false
1280
1284
} ) ;
1281
1285
} ) ;
1282
1286
@@ -1443,7 +1447,7 @@ describe('Deploy to ECS', () => {
1443
1447
expect ( core . setFailed ) . toHaveBeenNthCalledWith ( 2 , 'Could not parse' ) ;
1444
1448
} ) ;
1445
1449
1446
- test ( 'deployment with enable- ecs- managed- tags' , async ( ) => {
1450
+ test ( 'enable ecs managed tags on deployment ' , async ( ) => {
1447
1451
core . getInput = jest
1448
1452
. fn ( )
1449
1453
. mockReturnValueOnce ( 'task-definition.json' ) // task-definition
@@ -1452,7 +1456,7 @@ describe('Deploy to ECS', () => {
1452
1456
. mockReturnValueOnce ( 'false' ) // wait-for-service-stability
1453
1457
. mockReturnValueOnce ( '' ) // wait-for-minutes
1454
1458
. mockReturnValueOnce ( '' ) // force-new-deployment
1455
- . mockReturnValueOnce ( '1 ' ) // desired count is number
1459
+ . mockReturnValueOnce ( '' ) // desired count
1456
1460
. mockReturnValueOnce ( 'true' ) ; // enable-ecs-managed-tags
1457
1461
1458
1462
await run ( ) ;
@@ -1466,7 +1470,6 @@ describe('Deploy to ECS', () => {
1466
1470
} ) ;
1467
1471
expect ( mockEcsUpdateService ) . toHaveBeenNthCalledWith ( 1 , {
1468
1472
cluster : 'cluster-789' ,
1469
- desiredCount : 1 ,
1470
1473
service : 'service-456' ,
1471
1474
taskDefinition : 'task:def:arn' ,
1472
1475
forceNewDeployment : false ,
0 commit comments