Skip to content

Commit

Permalink
refactor(ecs-patterns): organize tests (#29170)
Browse files Browse the repository at this point in the history
### Issue # (if applicable)

part of #29041, #29039
continuation of #29153

Closes #<issue number here>.

### Reason for this change

tests in `packages/aws-cdk-lib/aws-ecs-patterns/test/ec2/l3s.test.ts` was disorganized.


### Description of changes

- No logical change.
- Organized tests in `packages/aws-cdk-lib/aws-ecs-patterns/test/ec2/l3s.test.ts` as below.

```ts
describe('ApplicationLoadBalancedEc2Service', () => {
...
})

describe('NetworkLoadBalancedEc2Service', () => {
...
})
```

- move tests of `ApplicationLoadBalancedFargateService`, `NetworkLoadBalancedFargateService` in `packages/aws-cdk-lib/aws-ecs-patterns/test/ec2/l3s.test.ts` to `packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/load-balanced-fargate-service.test.ts`.



### Description of how you validated changes

Pass unit tests


### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
wafuwafu13 authored and GavinZZ committed Feb 22, 2024
1 parent 1b878ce commit 5d5bee4
Show file tree
Hide file tree
Showing 4 changed files with 1,709 additions and 1,707 deletions.
4 changes: 2 additions & 2 deletions packages/aws-cdk-lib/aws-ecs-patterns/test/ec2/l3s-v2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { NamespaceType } from '../../../aws-servicediscovery';
import { Duration, Stack } from '../../../core';
import { ApplicationMultipleTargetGroupsEc2Service, NetworkMultipleTargetGroupsEc2Service } from '../../lib';

describe('When Application Load Balancer', () => {
describe('ApplicationMultipleTargetGroupsEc2Service', () => {
test('test ECS ALB construct with default settings', () => {
// GIVEN
const stack = new Stack();
Expand Down Expand Up @@ -893,7 +893,7 @@ describe('When Application Load Balancer', () => {
});
});

describe('When Network Load Balancer', () => {
describe('NetworkMultipleTargetGroupsEc2Service', () => {
test('test ECS NLB construct with default settings', () => {
// GIVEN
const stack = new Stack();
Expand Down
Loading

0 comments on commit 5d5bee4

Please sign in to comment.