@@ -1129,7 +1129,7 @@ describe('Deploy to ECS', () => {
1129
1129
launchType : 'FARGATE' ,
1130
1130
taskDefinition : 'task:def:arn' ,
1131
1131
overrides : { "containerOverrides" : [ ] } ,
1132
- networkConfiguration : { awsvpcConfiguration : { assignPublicIp : "DISABLED" } }
1132
+ networkConfiguration : null
1133
1133
} ) ;
1134
1134
1135
1135
expect ( core . setOutput ) . toHaveBeenNthCalledWith ( 2 , 'run-task-arn' , [ "arn:aws:ecs:fake-region:account_id:task/arn" ] ) ;
@@ -1236,6 +1236,36 @@ describe('Deploy to ECS', () => {
1236
1236
expect ( waitUntilTasksStopped ) . toHaveBeenCalledTimes ( 1 ) ;
1237
1237
} ) ;
1238
1238
1239
+ test ( 'run task in bridge network mode' , async ( ) => {
1240
+ core . getInput = jest
1241
+ . fn ( )
1242
+ . mockReturnValueOnce ( 'task-definition.json' ) // task-definition
1243
+ . mockReturnValueOnce ( 'service-456' ) // service
1244
+ . mockReturnValueOnce ( 'somecluster' ) // cluster
1245
+ . mockReturnValueOnce ( 'true' ) // wait-for-service-stability
1246
+ . mockReturnValueOnce ( '' ) // wait-for-minutes
1247
+ . mockReturnValueOnce ( '' ) // force-new-deployment
1248
+ . mockReturnValueOnce ( '' ) // desired-count
1249
+ . mockReturnValueOnce ( 'true' ) // run-task
1250
+ . mockReturnValueOnce ( 'true' ) // wait-for-task-stopped
1251
+ . mockReturnValueOnce ( 'someJoe' ) // run-task-started-by
1252
+ . mockReturnValueOnce ( 'EC2' ) // run-task-launch-type
1253
+ . mockReturnValueOnce ( '' ) // run-task-subnet-ids
1254
+ . mockReturnValueOnce ( '' ) // run-task-security-group-ids
1255
+ . mockReturnValueOnce ( '' ) // run-task-container-overrides
1256
+ . mockReturnValueOnce ( '' ) // run-task-assign-public-IP
1257
+
1258
+ await run ( ) ;
1259
+ expect ( mockRunTask ) . toHaveBeenCalledWith ( {
1260
+ startedBy : 'someJoe' ,
1261
+ cluster : 'somecluster' ,
1262
+ taskDefinition : 'task:def:arn' ,
1263
+ launchType : 'EC2' ,
1264
+ overrides : { containerOverrides : [ ] } ,
1265
+ networkConfiguration : null
1266
+ } ) ;
1267
+ } ) ;
1268
+
1239
1269
test ( 'error is caught if run task fails with (wait-for-task-stopped: true)' , async ( ) => {
1240
1270
core . getInput = jest
1241
1271
. fn ( )
0 commit comments