Skip to content

Commit

Permalink
fix integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendan Doyle committed Jan 15, 2025
1 parent 66b4a0a commit a118489
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const app = new App();
const stack = new Stack(app, 'batch-stack');
const vpc = new ec2.Vpc(stack, 'vpc', { restrictDefaultSecurityGroup: false });

const spotFleetRole = new Role(stack, 'SpotFleetRole', {
assumedBy: new ServicePrincipal('batch.amazonaws.com'),
});

new FargateComputeEnvironment(stack, 'minimalPropsFargate', {
vpc,
maxvCpus: 512,
Expand Down Expand Up @@ -54,9 +58,7 @@ new ManagedEc2EcsComputeEnvironment(stack, 'SpotEc2', {
}],
spot: true,
spotBidPercentage: 95,
spotFleetRole: new Role(stack, 'SpotFleetRole', {
assumedBy: new ServicePrincipal('batch.amazonaws.com'),
}),
spotFleetRole: spotFleetRole,
});

new ManagedEc2EcsComputeEnvironment(stack, 'AllocationStrategySPOT_CAPACITY', {
Expand Down Expand Up @@ -94,21 +96,20 @@ new ManagedEc2EcsComputeEnvironment(stack, 'ParamertizedManagedCE', {
minvCpus: new CfnParameter(stack, 'MinVCpuParameter', {
default: 512,
minValue: 0,
type: 'Number'
type: 'Number',
}).valueAsNumber,
maxvCpus: new CfnParameter(stack, 'MaxVCpuParameter', {
default: 512,
minValue: 1,
type: 'Number',
}).valueAsNumber,
spot: true,
spotBidPercentage: new CfnParameter(stack, 'SpotBidPercentageParameter', {
default: 100,
minValue: 1,
type: 'Number',
}).valueAsNumber,
spotFleetRole: new Role(stack, 'SpotFleetRole', {
assumedBy: new ServicePrincipal('batch.amazonaws.com'),
}),
spotFleetRole: spotFleetRole,
});

new integ.IntegTest(app, 'BatchManagedComputeEnvironmentTest', {
Expand Down

0 comments on commit a118489

Please sign in to comment.