Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strict construct testing #39

Merged
merged 6 commits into from
Sep 16, 2024
Merged

strict construct testing #39

merged 6 commits into from
Sep 16, 2024

Conversation

jfrconley
Copy link
Contributor

Problem

Current testing of constructs has significant gaps, allowing for unmapped properties, overly broad unsupported properties, and untested properties

Solution

New access tracker class has been added so that we can deeply test property usage.
Updates to the testing helpers to verify that unsupported properties do what you expect.
Required implementation of every single property for all constructs.

Additionally, bugs discovered by these new measures have been fixed in several constructs.

Test Plan:

  • Covered by existing tests
  • New coverage added
  • Special instructions for testing described below

Documentation:

  • No documentation required
  • Additional documentation required below

Additional Notes:

N/A

Copy link

changeset-bot bot commented Sep 16, 2024

🦋 Changeset detected

Latest commit: d8a7549

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@nrfcloud/cdktf-aws-adaptor Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jfrconley jfrconley requested a review from semcc September 16, 2024 20:26
Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 72.27% 4340 / 6005
🔵 Statements 72.27% 4340 / 6005
🔵 Functions 71.03% 260 / 366
🔵 Branches 79.85% 555 / 695
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/lib/stack-provider-singletons.ts 100% 100% 100% 100%
src/lib/core/cdk-adaptor-stack.ts 62.75% 77.77% 76.47% 62.75% 70-72, 95-96, 103-104, 116-117, 133-134, 301-302, 307-308, 317-318, 331-335, 371-376, 393-398, 400-412, 422-423, 456-460, 462-465, 468-473, 479-483, 486-495, 498-511, 517, 520-523, 525-527, 529-531, 533-534, 562-564, 567-570, 572-574, 576, 601-604, 622-625, 633-636, 642-645, 657-658, 661-662, 665-666, 669-670, 673-674, 677-678, 705-709, 712, 715-719, 722-724, 729-732, 734-736, 739-750, 753-758, 761, 766, 769-780, 782-787, 791-795, 798-799, 802-804, 807-809, 811-815, 818-820, 822-826, 829, 834-839, 842-845, 847-848, 852-855, 859-860, 863-870
src/lib/core/terraform-synthesizer.ts 83.33% 54.54% 83.33% 83.33% 17-18, 25-26, 28-29, 32-33, 61-62
src/lib/core/type-utils.ts 0% 0% 0% 0%
src/lib/core/awscc/supported-types.ts 100% 100% 100% 100%
src/mappings/access-tracker.ts 98.54% 98.36% 100% 98.54% 26-27
src/mappings/helper.ts 10.22% 100% 0% 10.22% 16-21, 23-31, 33-35, 37-39, 41, 44-45, 74-82, 86, 88, 91-93, 96-116, 119-124, 126, 130-131, 133-139, 141-144
src/mappings/index.ts 95.45% 100% 50% 95.45% 23-24
src/mappings/utils.ts 90.8% 92% 100% 90.8% 48-51, 84-87
src/mappings/services/apigateway.ts 98.12% 78.57% 67.85% 98.12% 65, 93, 159-160, 213
src/mappings/services/appsync.ts 98.79% 94.64% 84.21% 98.79% 161-162, 188, 191
src/mappings/services/cloudfront.ts 99.37% 65.38% 80% 99.37% 113
src/mappings/services/cognito.ts 99.25% 62.85% 78.94% 99.25% 261, 263
src/mappings/services/dynamodb.ts 98.58% 68.42% 80% 98.58% 83-84
src/mappings/services/ec2-vpc.ts 93.46% 97.29% 72.22% 93.46% 44-52, 146-149, 151-154
src/mappings/services/eks.ts 100% 100% 100% 100%
src/mappings/services/events.ts 96.92% 76.92% 75% 96.92% 59-62
src/mappings/services/iam.ts 100% 95.65% 83.33% 100%
src/mappings/services/lambda.ts 98.93% 90.9% 78.94% 98.93% 252, 291, 298
src/mappings/services/logs.ts 100% 75% 50% 100%
src/mappings/services/rds.ts 0% 0% 0% 0%
src/mappings/services/s3.ts 19.66% 18.18% 40% 19.66% 58-59, 66-76, 79-93, 96-113, 116-130, 133-144, 147-157, 160-183, 186-218, 221-242, 245-262, 265-287, 290-314, 317-336, 339-353, 356-415, 424-426, 428-431
src/mappings/services/sns.ts 96.59% 59.09% 77.77% 96.59% 72, 84, 96, 110, 122
src/mappings/services/sqs.ts 100% 100% 75% 100%
src/mappings/services/stepfunctions.ts 97.14% 91.66% 83.33% 97.14% 26-27
Generated in workflow #70

@jfrconley jfrconley merged commit a8d4064 into main Sep 16, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant