Skip to content

Commit

Permalink
remove Ec2Service placementStrategies test
Browse files Browse the repository at this point in the history
  • Loading branch information
123MwanjeMike committed Oct 17, 2023
1 parent 19e1f8c commit f09e815
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions packages/aws-cdk-lib/aws-ecs/test/ec2/ec2-service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2098,32 +2098,6 @@ describe('ec2 service', () => {
}).toThrow();
});

test('with an empty list in placement strategies', () => {
// GIVEN
const stack = new cdk.Stack();
const vpc = new ec2.Vpc(stack, 'MyVpc', {});
const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc });
addDefaultCapacityProvider(cluster, stack, vpc);
const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'Ec2TaskDef');

taskDefinition.addContainer('web', {
image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
memoryLimitMiB: 512,
});

new ecs.Ec2Service(stack, 'Ec2Service', {
cluster,
taskDefinition,
placementStrategies: [],
});

// THEN
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
PlacementStrategies: Match.arrayEquals([]),
});

});

test('throws an exception if non-DAEMON service is added but no EC2 capacity is associated with the cluster', () => {
// GIVEN
const stack = new cdk.Stack();
Expand Down

0 comments on commit f09e815

Please sign in to comment.