-
Notifications
You must be signed in to change notification settings - Fork 139
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
test(idempotency): add e2e tests for idempotency #1442
test(idempotency): add e2e tests for idempotency #1442
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR and for the hard work, I can see (and I know) you've put a lot of effort into this - I appreciate it.
Overall it's looking good - I have left some comments that I'd like to discuss before moving forward.
packages/idempotency/tests/e2e/makeFunctionIdempotent.test.FunctionCode.ts
Outdated
Show resolved
Hide resolved
packages/idempotency/tests/e2e/makeFunctionIdempotent.test.FunctionCode.ts
Outdated
Show resolved
Hide resolved
packages/idempotency/tests/e2e/idempotencyDecorator.test.FunctionCode.ts
Outdated
Show resolved
Hide resolved
You can run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this, I've run the integration tests on this branch and it's passing.
I'm gonna fix the linting in a subsequent PR and also open an issue to remember ourselves to go back to the types once we are done with the main implementation.
Thank you again Alex, enjoy the weekend!
Description of your changes
This PR introduces e2e tests for idempotency using decorator and function wrapper. Several changes were also introduced to the interface and options type, here is the breakdown.
IdempotencyOptions
First, we have unwrapped the options object before passing it to the
IdempotencyHandler
, this helps to keep it generic and decide which parameters we should pass from decorator or wrapper. We also expanded the type to containdataKeywordArgument
andconfig
as optional parameters. This enables us to apply decorator to lambda handler or any other method. In addition, we can use the same interface for decorator and wrapper.Test cases
The test cases should help to test basic functionality. We have much more possible tests with permutations of input, config, persistence layer options and sdk options. Not all of them are covered yet and I suggest to use the beta phase to add more tests down the road. The current test cases are:
Related issues, RFCs
Issue number: #447
Checklist
Breaking change checklist
Is it a breaking change?: NO
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.