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

(cloudfront): create unit tests for edge function handler #27724

Closed
2 tasks
colifran opened this issue Oct 27, 2023 · 1 comment · Fixed by #27768
Closed
2 tasks

(cloudfront): create unit tests for edge function handler #27724

colifran opened this issue Oct 27, 2023 · 1 comment · Fixed by #27768
Assignees
Labels
@aws-cdk/aws-cloudfront Related to Amazon CloudFront feature-request A feature should be added or improved. p2

Comments

@colifran
Copy link
Contributor

Describe the feature

We need to improve testing coverage of our Lambda handlers. The Lambda handler for edge functions does not have corresponding unit tests. Unit tests should be created specifically for this handler.

Use Case

Unit tests for the edge function Lambda handler would improve test coverage and help us find bugs and prevent breaking changes.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.103.1

Environment details (OS name and version, etc.)

MacOS

@colifran colifran added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. p2 @aws-cdk/aws-cloudfront Related to Amazon CloudFront and removed needs-triage This issue or PR still needs to be triaged. labels Oct 27, 2023
@colifran colifran self-assigned this Oct 30, 2023
@mergify mergify bot closed this as completed in #27768 Oct 31, 2023
mergify bot pushed a commit that referenced this issue Oct 31, 2023
…27768)

This PR adds three unit tests that mock functionality found in the Lambda handler for edge functions. Specifically, this PR is adding one unit test for a create event, one unit test for an update event, and one unit test for a delete event to verify that the handler only executes for create and update events.

Closes #27724

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-cloudfront Related to Amazon CloudFront feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant