Skip to content

Commit

Permalink
Test load balancer and VPC multi az config
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroDojkic committed Jan 19, 2025
1 parent 4dcfdd0 commit f7bd875
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/web-server/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,16 @@ describe('Web server component deployment', () => {
}
);
});

it('should have cross zone load balancing enabled', async () => {
const { lb } = outputs.project.value.services['web-server-example'];
assert.strictEqual(lb.enableCrossZoneLoadBalancing, true);
});

it('should have VPC with subnets in different availability zones', async () => {
const { subnets } = outputs.project.value.vpc;
assert.ok(subnets.length >= 2, 'Should have at least 2 subnets');
const azs = new Set(subnets.map((subnet: any) => subnet.availabilityZone));
assert.ok(azs.size >= 2, 'Subnets should be in different availability zones');
});
});

0 comments on commit f7bd875

Please sign in to comment.