-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ec2-alpha): readme updates, new unit tests, logic update (#33086)
### Issue # (if applicable) Closes #30762 . ### Reason for this change Adding more unit tests to meet the global coverage before module graduation to `developer-preview`. ### Description of changes - Add more unit test case to cover all `if branches` test cases. - As per the discussion with service team, added optional field under IGW to allow users to choose the subnets for gateway routing, as there can be Public Subnet without an IGW attached( eg. using VPNGW to access internet). - Update IPAM README to higlight the problem of IPAM pool deletion as discussed with service team. - Update SubnetV2 README to higlight that a custom route table is being created through CDK. ### Describe any new or updated permissions being added No changes to IAM permissions. ### Description of how you validated changes `yarn build` `yarn test` ``` yarn run v1.22.21 $ cdk-test PASS test/ipam.test.ts PASS test/subnet-v2.test.ts PASS test/vpc-tagging.test.ts PASS test/util.test.ts PASS test/route.test.ts PASS test/vpc-add-method.test.ts PASS test/vpcv2-import.test.ts PASS test/vpc-v2.test.ts =============================== Coverage summary =============================== Statements : 89.88% ( 640/712 ) Branches : 81.68% ( 223/273 ) Functions : 82.6% ( 133/161 ) Lines : 89.89% ( 614/683 ) ================================================================================ Test Suites: 8 passed, 8 total Tests: 126 passed, 126 total Snapshots: 0 total Time: 2.244 s Ran all test suites. Verifying integration test snapshots... UNCHANGED integ.byoip-ipv6 0.888s UNCHANGED integ.ipam 0.928s UNCHANGED integ.subnet-v2 1.036s UNCHANGED integ.vpc-v2-alpha 1.047s UNCHANGED integ.test-import 1.053s UNCHANGED integ.peering-cross-account 1.101s UNCHANGED integ.vpc-v2-tagging 1.264s UNCHANGED integ.route-v2 1.29s Snapshot Results: Tests: 8 passed, 8 total Tests successful. Total time (4.5s) | /Users/shikagg/vpc_peering/aws-cdk/node_modules/jest/bin/jest.js (2.7s) | integ-runner (1.8s) ✨ Done in 4.87s. ``` ### 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) BREAKING CHANGE: `operatingRegion` property under IPAM class is now renamed to `operatingRegions`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
16 changed files
with
675 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,4 @@ | ||
const baseConfig = require('@aws-cdk/cdk-build-tools/config/jest.config'); | ||
module.exports = { | ||
...baseConfig, | ||
coverageThreshold: { | ||
global: { | ||
statements: 75, | ||
branches: 63, | ||
}, | ||
}, | ||
};; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.